Default credentials do not work on docker container #70
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
KittenSquad/glewlwyd#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the issue
When deploying the docker test container as per documentation. The default credentails as documented (admin password) do not seem to work.
To Reproduce
I started the docker container using:
docker run -v oauth_config:/etc/glewlwyd -p 4593:4593 --name oauth --detach babelouest/glewlwyd
Because my docker machine is on another server I edited the config files as follows:
config.json:
"GlewlwydUrl": "http://my.internal.dns.name:4593/",
"ProfileUrl": "http://my.internal.dns.name:4593/profile.html",
"AdminUrl": "http://my.internal.dns.name:4593/index.html",
"LoginUrl": "http://my.internal.dns.name:4593/login.html",
glewlwyd.conf:
external_url="http://my.internal.dns.name:4593"
Expected behavior
Successful login
Screenshots
The container puts out the following log:
Glewlwyd WARNING: Security - Authorization invalid for username admin at IP Address
System (please complete the following information):
Ubuntu 16.04
Chrome Version 78.0.3904.108
Current docker image
Docker Hub
N/A
Additional context
None
According to your log message, it's not a cookie problem but a real login error.
For some reason, the default login admin/password doesn't work. To have it working, you need a user backend instance configured but for some reason, your docker image doesn't have one.
Did you make other changes to the
glewlwyd.conffile? especially in the database section?I'll try to reproduce your error. Meanwhile, can you post the entire log output? There can be other useful messages.
I've not made any other changes to the file. I did however restart the container after updating the files,
glewlwyd.log
Attached you find the log file.
Hello @jorgh6 ,
I've tried to reproduce your issue but no luck so far. Although, the file glewlwyd.conf mentioned in the documentation as starting point was not correct, it pointed to a mariadb database by default, where the default docker image uses a sqlite3 database.
I would like you to retry with the last files from the docs/docker/config folder, where you modify only the file
config.jsonwith yourexternal_url="http://my.internal.dns.name:4593"value.Hello Babelouest,
That works. To be sure, up till now, I've not taken the config files from the github repo and made the changes. I've just edited the files that where already in the container when using the image from the docker hub. On these files, if I did not make the changes to the glewlwyd.conf it would not work, but these files (both of them) also reference the localhost, the files you referenced on github do not.
So, for now:
When using the docker hub image, making the change (only changing external_url to reflect my internal DNS name) in the config.json, does end in a working container. When also replacing localhost with my internal DNS name in the glewlwyd.conf, I can get to the interface, but am not able to log on.
When using the docs/docker/config files as a base, only changing the external_url to reflect my internal DNS name does result in a working container.
Kind regards,
Jorg
Just made a diff, between the docker image default config and the github config files, the github config.json does not reference localhost:
~ < "GlewlwydUrl": "./",
~ < "ProfileUrl": "profile.html",
~ < "AdminUrl": "index.html",
~ < "LoginUrl": "login.html",
~ > "GlewlwydUrl": "http://localhost:4593/",
~ > "ProfileUrl": "http://localhost:4593/profile.html",
~ > "AdminUrl": "http://localhost:4593/index.html",
~ > "LoginUrl": "http://localhost:4593/login.html",
~ 52c52
~ < "label": "admin.picture",
~ > "label": "admin.user-picture",
furthermore I noticed the following diff in the glewlwyd.conf:
~ < # url prefix
~ < url_prefix="api"
~ > # api prefix
~ > api_prefix="api"
Hi @jorgh6 ,
That's a relief!
According to your diff output, the problematic line is this one:
~ < url_prefix="api"This old stuff still lies in the docs/docker/config/glewlwyd.conf file which is bad, it should be this instead.
api_prefix="api"This is fixed in
8721876, thanks!