-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CouchDB only writes to the final file in the config chain #777
Comments
CouchDB always writes to the last file in the config chain, which draws file in the following order:
What you are observing is the current behaviour, if you have an Improving this functionality is useful, and something that's been on the verbal backlog for a while, but will require a near-complete rewrite of the current config system. (Read: this won't happen very soon, nor is it strictly speaking a bug.) I will retitle this issue and leave it open to track future work. |
This gave me quite a bit of grief today. Note that this behaviour does not match the documentation at https://docs.couchdb.org/en/2.1.1/config/auth.html#server-administrators A side-effect is that attempting to reset the admin password using the local.ini file doesn't seem to take hold. I now assume this is because it doesn't consider the local.ini version to be relevant when there is a local.d/10-admins.ini file present with the same user listed in it. Only new users have their info copied over. |
Thanks for the info @ahayes . We'd welcome your improvements to the documentation over at https://github.com/apache/couchdb-documentation . Pull requests are welcome! :) |
Thanks @wohali. I can give it a shot. Can you confirm that this new behaviour is standard on all couchdb platforms? I could then modify the docs to simply point at the 10-admins.ini file rather than local.ini sections talking about [admins]. Also, do you know which version introduced this change? |
10-admins.ini is specific to how the Debian package installer works, so no, that's not global. The described behaviour here is new as of 2.0.0, which is when many breaking changes were introduced. |
@wohali what about swapping |
* Clarify use of relevant [admins] section Helps with issue apache/couchdb#777
* Clarify use of relevant [admins] section Helps with issue apache#777
Expected Behavior
If you add a new admin using the
[admins]
section of thelocals.ini
file, the password should get salted and encrypted (using pkbdf2) after restarting CouchDB.Current Behavior
The password remains in plaintext while a copy is created in the 10-admins.ini file in the local.d directory where the encrypted password is stored.
Files after restarting CouchDB:
locals.ini
locals.d/10-admins.ini
Possible Solution
Edit
local.ini
with encrypted password as well after parsing it on start-up.Your Environment
The text was updated successfully, but these errors were encountered: