Closed fruitl00p closed 2 years ago
@josegonzalez as you correctly mentioned, i've (re)created the PR here. Again I do feel this PR is a bit light and I can imagine how it should be better / more complete, I just don't have the shell-fu to fix it ;)
One thing I'm going to expose in dokku-core fairly soon is the properties
functions. Some are already there in bash, but the golang implementation also includes list manipulation (in the future, we may add sets as well).
Using both of these, we can expose managing multiple users fairly easily, and just rebuild the file based on what is stored in the properties plugin.
We could keep this PR open, wait for the addition (which sounds nice!) and rebuild the plugin from there.. (and use this PR to track?)
Sure
This would be a great addition! Is there somewhere to track the dokku-core change that this relies on?
The properties functions have since been exposed, so if someone wants to redo this PR to use the above to manage adding/removing users, that would work for me :)
Okay I lied, it was easy enough for me to implement this while cleaning up the plugin. Hope folks enjoy the changes!
Instead of regenerating the htpasswd file, it now appends to it to allow for multiple users to be added.
This might need more intelligent updating of existing users instead of just appending them. Also one could argue that there should be a way to remove a user from the auth. (including a warning if auth=on but there are no users left to match against)