Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Feature to change Konga default users #168

Closed
rmetcalf9 opened this issue Feb 5, 2018 · 2 comments
Closed

Feature to change Konga default users #168

rmetcalf9 opened this issue Feb 5, 2018 · 2 comments

Comments

@rmetcalf9
Copy link
Contributor

I am running Konga inside a docker swarm. I would like to keep it lightweight and stateless so I am creating a configuration where Konga will not have a database. This works well for development as a local database is created.
If there are no users in the local database Konga will populate the database with two users. These are hardcoded as 'demo' and 'admin', with standard passwords.

I would like a way to change this. It would be great if Konga could load these default users from a default user configuration file. It would also be good if the location of this file could be specified via an environment variable. This way I could create a docker secret which would contain this configuration and set the environment variable to point to it.

If no environment variable is set it could point to a standard file in the config directory and there would be no change to the docker images behavior.

I think I will have a go at forking Konga and working out how to implement this.

rmetcalf9 added a commit to rmetcalf9/konga that referenced this issue Feb 5, 2018
rmetcalf9 added a commit to rmetcalf9/konga that referenced this issue Feb 5, 2018
…le specified by KONGA_SEED_USER_DATA_SOURCE_FILE
pantsel added a commit that referenced this issue Feb 6, 2018
@rmetcalf9
Copy link
Contributor Author

I have this set up and running in my docker swarm and it is working without an issue.
I am wondering if having it fall back to a default user set if the secret is missing/corrupt is a security risk. I think it's a trade off between security and usability.
At the moment if the environment variable is set and there is any problem it reverts back to the default set of users. An alternative approach would be if the variable is set and there is a problem it creates a single admin user with a randomly generated password. This password could then be output in the log. It would be possible to find this password by using the docker log command.
I am not sure which is best.

@pantsel pantsel closed this as completed Mar 1, 2018
@pantsel pantsel reopened this Mar 1, 2018
@pantsel
Copy link
Owner

pantsel commented Jun 8, 2018

Thanks a bunch for the contribution @rmetcalf9 .

Closing the issue due to housekeeping.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants