script-server
script-server copied to clipboard
Make first connected user to be an admin
At the moment, if you install a new copy of script server without any config, it will give admin rights to a localhost user However, if you start it from docker, then there is no localhost user, so there are no default admins
It would be helpful for new users of Script server to treat the very first connected user as an admin. So they would be able to make script configurations from UI This should be enabled, only if "auth" and "access" configs are missing completely.
Any progress on this? Would be very nice to have. I already have it behind a reverse proxy that manages authentication but I can't seem to get the configuration to allow me to modify the script. The following is my config:
{
"port": 5000,
"address": "0.0.0.0",
"title": "SCRIPT-SERVER"
"access": {
"allowed_users": "*",
"admin_users": "*",
},
}
Hi, I didn't work on this feature. Probably it won't even come with the next release
But regarding your case: you cannot enter admin.html page at all? What error do you see?
It gives me a 403 forbidden error.
On Sun, Apr 19, 2020, 10:27 AM Iaroslav Shepilov [email protected] wrote:
Hi, I didn't work on this feature. Probably it won't even come with the next release
But regarding your case: you cannot enter admin.html page at all? What error do you see?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/274#issuecomment-616189505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFURNMF6XV5BG4HUJY3NZPTRNMX7BANCNFSM4LTWI67Q .
Are you running inside docker?
Yes I am.
On Sun, Apr 19, 2020, 10:50 AM Iaroslav Shepilov [email protected] wrote:
Are you running inside docker?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/274#issuecomment-616194556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFURNMEH5FPTCBNDGVPYLFDRNM2XNANCNFSM4LTWI67Q .
Here are the logs when I try to access a page:
2020-04-19 17:48:39,803 [tornado.access.INFO] 200 POST /executions/cleanup/8 (10.0.100.2) 2.36ms
2020-04-19 17:55:00,817 [script_server.audit_utils.WARNING] Could not get hostname for 192.168.0.101
2020-04-19 17:55:00,851 [script_server.audit_utils.WARNING] Could not get hostname for 10.0.100.2
2020-04-19 17:55:00,851 [web_server.WARNING] User 192.168.0.101-eaed84a3aba24bdc (user) tried to access admin static file admin.html
2020-04-19 17:55:00,852 [tornado.access.WARNING] 403 GET /admin.html (10.0.100.2) 68.69m
Are you sure your config is picked? Please also note, that changing conf.json requires server restart
skluthe [email protected] schrieb am So., 19. Apr. 2020, 19:55:
Yes I am.
On Sun, Apr 19, 2020, 10:50 AM Iaroslav Shepilov <[email protected]
wrote:
Are you running inside docker?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/bugy/script-server/issues/274#issuecomment-616194556 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AFURNMEH5FPTCBNDGVPYLFDRNM2XNANCNFSM4LTWI67Q
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/274#issuecomment-616195452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJJZUXS7XZMMIB4AODLRNM3HPANCNFSM4LTWI67Q .
Is there any way for me to check that the config is getting picked up? I have it in /conf and have the bind mounted as /home/user/script-server/conf bound to /app/conf
This is the content of /home/user/script-server/conf/
logging.json runners script-server.json
Just try changing the port in the config and see if it will be changed
skluthe [email protected] schrieb am So., 19. Apr. 2020, 20:02:
Is there any way for me to check that the config is getting picked up? I have it in /conf and have the bind mounted as /home/user/script-server/conf bound to /app/conf
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/274#issuecomment-616196781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJICUTTU6CHBI5GFTR3RNM4BZANCNFSM4LTWI67Q .
I changed it in the config but the port didn't change.
On Sun, Apr 19, 2020, 11:33 AM Iaroslav Shepilov [email protected] wrote:
Just try changing the port in the config and see if it will be changed
skluthe [email protected] schrieb am So., 19. Apr. 2020, 20:02:
Is there any way for me to check that the config is getting picked up? I have it in /conf and have the bind mounted as /home/user/script-server/conf bound to /app/conf
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/bugy/script-server/issues/274#issuecomment-616196781 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAJXPJICUTTU6CHBI5GFTR3RNM4BZANCNFSM4LTWI67Q
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/274#issuecomment-616203119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFURNMGLLXU6V3I2DY4ELA3RNM7YHANCNFSM4LTWI67Q .
The file should be not script-server.json but conf.json
That did it. Thank you!
On Sun, Apr 19, 2020, 12:47 PM Iaroslav Shepilov [email protected] wrote:
The file should be not script-server.json but conf.json
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/274#issuecomment-616214248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFURNMFMRV2LQBDHOIXEW6LRNNINNANCNFSM4LTWI67Q .
I'm having the similar issue
I run the command below to install it via docker.
docker run -d -p 5000:5000 \
-v /home/usr/scriptserver/conf.json:/app/conf.json \
-v /home/usr/scriptserver/runners/:/app/conf/runners \
-v /home/usr/scriptserver/scripts/:/app/scripts/ \
--name ScriptServer \
bugy/script-server:latest
Then I add below to conf.json
{
"port": 5000,
"address": "0.0.0.0",
"title": "SCRIPT-SERVER"
"access": {
"allowed_users": "*",
"admin_users": "*",
},
}
Then I restart docker and I still get a 403 forbidden error on the admin page.
Hi @bamwasteland, this should work. Most probably the config is not picked up by script server, please double check paths (I see syntax issues in the file, so with this config script server would fail to start)
Hello, i install script server and i also have the same problem. I can't access to the admin page ( 403 error : forbidden)
I solved the problem by adding the authentication configuration. here is my conf.json file : { "port": 5000, "address": "0.0.0.0", "title": "SCRIPT-SERVER", "auth": { "type": "htpasswd", "htpasswd_path": "/root/any/path/script-server/conf/.htpasswd" }, "access": { "allowed_users": [ "admin" ], "admin_users": [ "admin" ] } }
I'd like to add: I got it working with the follging conf.json:
{
"title": "SCRIPT SERVER",
"access": {
"admin_users": [ "*" ]
}
}
Keeping "allowed users" left me unable to access the server at all (and might be the reason christpher0001 needed to setup auth?