Jump to content

A21 Dashboard Map


Hagi

Recommended Posts

Hello together,

 

i host a A21 B317 dedicated server, my question is, how can I setup the dashboard? The problem is that the players cannot see the Web Map, after they created an account ingame with createwebuser. When they login, they only have Console/Settings/Mods on the left side. The Map is not shown. I tried to solve the problem with the webpermissions.xml file, but I had no luck.

 

Thanks in advance for your help.

 

Greetings, Hagi

Link to comment
Share on other sites

You have to change the API permissions for the web map. 

 

webpermissions.xml is for the legacy version of Allocs. Your serveradmin file has the details for the new one.  

 

Edit the webmap section to appear like this...

<webmodules>
    <module name="webapi.Map" permission_level="2000">
      <method name="GET" permission_level="1000" />
      <method name="POST" permission_level="1000" />
      <method name="PUT" permission_level="1000" />
      <method name="DELETE" permission_level="1000" />
    </module>
</webmodules>

 

2000 is no account required.

1000 is Steam account on the server.

 

Link to comment
Share on other sites

Hello SylenThunder,

 

thank you for your help.

 

I genereated the serverpermissions.xml new and modified it:

 

Spoiler

<?xml version="1.0" encoding="UTF-8"?>
<!--
    This file holds the settings for who is banned, whitelisted,
    admins and server command permissions. The admin and whitelist sections can contain
    both individual Steam users as well as Steam groups.

    STEAM ID INSTRUCTIONS:
    ===============================================================
    You can find the SteamID64 of any user with one of the following pages:
   https://steamdb.info/calculator/, https://steamid.io/lookup, http://steamid.co/
   http://steamid.co/ instructions:
    Input the player's name in the search field. example: Kinyajuu
    If the name doesn't work, you can also use the url of their steam page.
    Also you may add/remove admins, mods, whitelist, blacklist using in game commands.
    You will want the STEAM64ID. example: 76561198021925107

    STEAM GROUP ID INSTRUCTIONS:
    ===============================================================
    You can find the SteamID64 of any group by taking its address and adding
      /memberslistxml/?xml=1
    to the end. You will get the XML information of the group which should have an entry
    memberList->groupID64.
    Example: The 'Steam Universe' group has the address
      https://steamcommunity.com/groups/steamuniverse
    So you point your browser to
      https://steamcommunity.com/groups/steamuniverse/memberslistxml/?xml=1
    And see that the groupID64 is 103582791434672565.

    XBOX LIVE ID INSTRUCTIONS:
    ===============================================================
    Check the client or server log for the PXUID of a player or use the console commands to add players
    to the list.

    PERMISSION LEVEL INSTRUCTIONS:
    ===============================================================
    permission level : 0-1000, a user may run any command equal to or above their permission level.
    Users not given a permission level in this file will have a default permission level of 1000!

    COMMAND PERMISSIONS INSTRUCTIONS:
    ===============================================================
    cmd : This is the command name, any command not in this list will not be usable by anyone but the server.
    permission level : 0-1000, a user may run any command equal to or above their permission level.
    Commands not specified in this file will have a default permission level of 0!

    EVERYTHING BETWEEN <!- - and - -> IS COMMENTED OUT! THE ENTRIES BELOW ARE EXAMPLES THAT ARE NOT ACTIVE!!!
-->
<adminTools>
  <!-- Name in any entries is optional for display purposes only -->
  <users>
     <user platform="Steam" userid="mySteamNumber" permission_level="0" />
  </users>
  <whitelist>
    <!-- ONLY PUT ITEMS IN WHITELIST IF YOU WANT WHITELIST ONLY ENABLED!!! -->
    <!-- If there are any items in the whitelist, the whitelist only mode is enabled -->
    <!-- Nobody can join that ISN'T in the whitelist or admins once whitelist only mode is enabled -->
    <!-- Name is optional for display purposes only -->
    <!-- <user platform="" userid="" name="" /> -->
    <!-- <group steamID="" name="" /> -->
  </whitelist>
  <blacklist>
    <!-- <blacklisted platform="" userid="" name="" unbandate="" reason="" /> -->
  </blacklist>
  <commands>
    <!-- <permission cmd="dm" permission_level="0" /> -->
    <!-- <permission cmd="kick" permission_level="1" /> -->
    <!-- <permission cmd="say" permission_level="1000" /> -->
    <permission cmd="chunkcache" permission_level="1000" />
    <permission cmd="createwebuser" permission_level="1000" />
    <permission cmd="debugshot" permission_level="1000" />
    <permission cmd="debugweather" permission_level="1000" />
    <permission cmd="decomgr" permission_level="1000" />
    <permission cmd="getgamepref" permission_level="1000" />
    <permission cmd="getgamestat" permission_level="1000" />
    <permission cmd="getlogpath" permission_level="1000" />
    <permission cmd="getoptions" permission_level="1000" />
    <permission cmd="gettime" permission_level="1000" />
    <permission cmd="gfx" permission_level="1000" />
    <permission cmd="graph" permission_level="1000" />
    <permission cmd="help" permission_level="1000" />
    <permission cmd="listplayerids" permission_level="1000" />
    <permission cmd="listthreads" permission_level="1000" />
    <permission cmd="memcl" permission_level="1000" />
    <permission cmd="settempunit" permission_level="1000" />
  </commands>
  <apitokens>
    <!-- <token name="adminuser1" secret="supersecrettoken" permission_level="0" /> -->
  </apitokens>
  <webmodules>
    <module name="webapi.Map" permission_level="2000">
      <method name="GET" permission_level="2000" />
      <method name="POST" permission_level="2000" />
      <method name="PUT" permission_level="1000" />
      <method name="DELETE" permission_level="1000" />
    </module>
  </webmodules>
  <webusers>
    <user name="Player1" pass="xyz" platform="Steam" userid="aSteamID" crossplatform="EOS" crossuserid="000..." />
    <user name="Player2" pass="xyz" platform="Steam" userid="aSteamID" crossplatform="EOS" crossuserid="000..." />
    <user name="Player3" pass="xyz" platform="Steam" userid="aSteamID" crossplatform="EOS" crossuserid="000..." />
  </webusers>
</adminTools>

 

I set the permission Level to 2000 - no account.

 

Then I restartet the server, but same problem:

 

Screenshot2023-06-17194012.thumb.jpg.f08be36fc9315a223be38ee865d98187.jpg

Link to comment
Share on other sites

Here the section out of the serverconfig.xml:

 

<property name="WebDashboardEnabled"        value="true"/>               
<property name="WebDashboardPort"               value="8084"/>               
<property name="WebDashboardUrl"                value=""/>                   
<property name="EnableMapRendering"           value="true"/>               

 

I tried it also with another browser and cache delete within Firefox.

 

Is the </adminTools>  correct there in the serverpermissions.xml? At the end? Or has it to be placed earlier?

 

Edited by Hagi (see edit history)
Link to comment
Share on other sites

5 hours ago, SylenThunder said:

Do you have the feature set to enabled in the server config?

 

 

5 hours ago, Hagi said:

Here the section out of the serverconfig.xml:

 

<property name="WebDashboardEnabled"        value="true"/>               
<property name="WebDashboardPort"               value="8084"/>               
<property name="WebDashboardUrl"                value=""/>                   
<property name="EnableMapRendering"           value="true"/>               

 

I tried it also with another browser and cache delete within Firefox.

 

Is the </adminTools>  correct there in the serverpermissions.xml? At the end? Or has it to be placed earlier?

You can do the 'webpermission' or modify the serveradmin file directly.  Didn't take a reboot of the server to kick out (for me?)

I'm working on noodling out how to remove the SETTINGS and CONSOLE from public (2000) access

5 hours ago, Hagi said:

 

 

Screenshot from 2023-06-17 19-31-39.png

Screenshot from 2023-06-17 19-27-46.png

Edited by i_robot73
Added more pics (see edit history)
Link to comment
Share on other sites

2 hours ago, i_robot73 said:

I'm working on noodling out how to remove the SETTINGS and CONSOLE from public (2000) access

 

For anyone wondering, to remove CONSOLE & SETTINGS it's the "webapi.Command" that needs tweaking

Still playing, but I think keeping the parent as 2000 & setting just the GET to 1000 (instead of INHERIT) would work better-er (does take a reboot of the server to kick in)

Screenshot from 2023-06-17 22-23-36.png

Edited by i_robot73
Verbiage fix (see edit history)
Link to comment
Share on other sites

On 6/17/2023 at 10:26 PM, i_robot73 said:

 

For anyone wondering, to remove CONSOLE & SETTINGS it's the "webapi.Command" that needs tweaking

Still playing, but I think keeping the parent as 2000 & setting just the GET to 1000 (instead of INHERIT) would work better-er (does take a reboot of the server to kick in)

Screenshot from 2023-06-17 22-23-36.png


Using 'webpermission list true' & noting the defaults provided, I settled on janking w/ the perms as little as possible

 

7d2d_web_dashboard_perms.png

Screenshot from 2023-06-23 09-58-28.png

Link to comment
Share on other sites

Hi.

 

I can't get the map to display on the Web Dashboard. I'm seasoned with configuring 7DtD DS. This I just can't find any official info on. The settings suggested above only makes my server echo:

 
INF Loading permissions file at '/AMP/seven-days-to-die/294420/7DaysToDieServer_Data/../User/Saves/serveradmin.xml'
ERR Failed loading permissions file: Root element is missing.
ERR Failed loading permissions file: The 'webmodules' start tag on line 96 position 4 does not match the end tag of 'module'. Line 98, position 7.
 

 

I've tried various variants of suggestions regarding this. Only one who has Permission 0 can ever see a map.

I'd like "normal" players to see it too.

Link to comment
Share on other sites

To clarify a few things:

- You do not *need* the WebDashboardUrl - as per comment in the config it's only if the webserver is not available through its public IP (e.g. because you have it firewalled and behind a reverse proxy, which is actually recommended)

- For the map to work at all it needs to be enabled in the serverconfig

- No need to restart the server for permission changes to apply (no matter if done manually in the file or through console commands)

- The default permissions allow users with permission level 0 full access to everything, other users (no matter if logged in or not) will not be able to do anything

- You should not touch the "webapi.map" permission. This is about the *API* providing the frontend information about the map setup, it's not the map

- If you want users with permission level > 0 see the map you need to change the permission level of the module "web.map". Either 2000 so it becomes visible even to users not logged in to the dashboard at all, 1000 so it becomes visible to those logged in only or any other value so it's only visible to those with that permission level (and above).

- The console API does not have to be protected any further, the actual console commands define who can access what

- If you do not *want* the console to show at all though you can set "webapi.command" method GET to level 0 (or 1000 if you want it to be available to all logged in users only). Currently this permission also controls the visibility of the settings page.

- "Mods" menu entry is controlled by "webapi.mods" method GET.

Link to comment
Share on other sites

Something appears to be not quite right about the serveradmin.xml file and/or the way its being read. I managed to get mine set up (through the web console) so that the map is available without a login, and the Console and Settings options don't appear unless you're logged into an admin account.

 

I then copied the serveradmin.xml file over to the directory for my second server, I see the second server reloading serveradmin.xml correctly. I am able to login (this is a brand-new server being stood up, no players have logged in, so I know it parsed the file since I can use the same login as the first server), but beyond being able to login and seeing a Map after logging in, none of the other changes work. Specifically, no public map, and Console/Settings are still visible.

 

The output of `webpermission list` on Server 1 shows the altered web.map and webapi.Command settings, but shows nothing changed on Server 2. As a matter of curiosity, I restarted both servers and it DID pick up the updated config information on both servers from the serveradmin.xml file on restart.

 

For those having problems getting public map set up and hiding the Console/Settings options, your best bet is to either issue the commands in game (`webpermission add web.map global 2000` and `webpermission add webapi.Command global 100` (change the 100 to whatever you want)), through the Web console interface, or through Telnet. I also had several issues related to formatting trying to edit the XML file directly, so that didn't help much either.

Edited by bobross (see edit history)
Link to comment
Share on other sites

On 6/30/2023 at 1:59 AM, fallonjeff said:

I can't get a webmap to show how I used to with your server mod. I just want a webmap to show publicly for anyone to see without any logon. Can an example permission file be given to do this please?

Set the permission for web.map to 2000 ("webpermission add web.map global 2000").

 

 

On 6/30/2023 at 5:08 PM, ZakRhyno said:

Same here I got the stuff working and I can login, just can't see any map loading, I do see myself on the map as an icon but no map loading at all.

See above and don't forget enabling the maprendering in the serverconfig.

 

 

On 7/1/2023 at 8:58 PM, bobross said:

The output of `webpermission list` on Server 1 shows the altered web.map and webapi.Command settings, but shows nothing changed on Server 2. As a matter of curiosity, I restarted both servers and it DID pick up the updated config information on both servers from the serveradmin.xml file on restart.

So you are saying you tried editing the file while the second server was *running* and it did not pick up until restarting it?

 

 

On 7/1/2023 at 10:14 PM, JaJe said:

Question,

Can we have HTTPS webui so I can open the port outside my network and be secured? 

No, webserver already is quite heavy on the .NET runtime, SSL/TLS would drastically increase this again. You are advised to run this behind a reverse proxy like Nginx or Apache.

Link to comment
Share on other sites

1 hour ago, Alloc said:

Set the permission for web.map to 2000 ("webpermission add web.map global 2000").

In the event someone created a login using command createwebuser, and then forgot their password, is there a method to create new account/reset it?

Link to comment
Share on other sites

1 hour ago, Alloc said:

Yes, no web module "web", but "web.map" (as you did in your sceenshot) should be just fine. This looks like you actually removed the MapRendering mod from your server.

I am actually having similar issues with setting up the web part of the server. I followed what you said so far and just for some reason can't connect to it. I have the settings setup to how I had it similarly before A21 (of course updated but similar information setup) and its just not working 😕

It may be something to deal with the WebDashboardUrl, I have been trying varying thing i use a no-ip address and honestly just don't know what to put as I followed the notated reference and nothing as well

Edited by B14d3r11 (see edit history)
Link to comment
Share on other sites

my server seems to be giving a warning on the permissions file... shows

 

Quote

2023-07-04T22:44:39 1.087 WRN Ignoring unknown section in permissions file: apitokens
2023-07-04T22:44:39 1.087 WRN Ignoring unknown section in permissions file: webmodules
2023-07-04T22:44:39 1.087 WRN Ignoring unknown section in permissions file: webusers

 

would this be a issue getting web dashboard to work?

Link to comment
Share on other sites

13 hours ago, GuberX said:

my server seems to be giving a warning on the permissions file... shows

 

 

would this be a issue getting web dashboard to work?

Yes, you have to add your token! add it in F1 it would look like this but the name and password you pick for it.    webtokens add your name your password 0

Make sure it is the same in webpermissions file.

mine looks like this but not my real one lol

webtokens add ZombieVirus This1isMypass 0

Link to comment
Share on other sites

17 hours ago, B14d3r11 said:

I am actually having similar issues with setting up the web part of the server. I followed what you said so far and just for some reason can't connect to it. I have the settings setup to how I had it similarly before A21 (of course updated but similar information setup) and its just not working 😕

It may be something to deal with the WebDashboardUrl, I have been trying varying thing i use a no-ip address and honestly just don't know what to put as I followed the notated reference and nothing as well

Well, "it's not working" is not going to get you help. We need more details, i.e. *what* is not working, logs?

 

14 hours ago, GuberX said:

my server seems to be giving a warning on the permissions file... shows

 

 

would this be a issue getting web dashboard to work?

That would happen if your server does not have the TFP mods available.

Link to comment
Share on other sites

When it comes to my issues, I have the ports forwarded added the permissions as you showed earlier in this thread. I have it setup to the correct ip address with the :8080 cause, I just cannot connect to the webserver part at all. I type in the no-ip address and it ends up timing out in the browser.

image.png

Edited by B14d3r11 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...