Skip to content
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

admin hashes get regenerated on pod restart #7

Open
willholley opened this issue Oct 30, 2019 · 3 comments
Open

admin hashes get regenerated on pod restart #7

willholley opened this issue Oct 30, 2019 · 3 comments

Comments

@willholley
Copy link
Member

The CouchDB Dockerfiles lay down an [admins] section in /opt/couchdb/etc/local.d/docker.ini here. The Helm chart is currently configured such that /opt/couchdb/etc/default.d is persistent but /opt/couchdb/etc/local.d is not.

This results in regeneration of the admin hashes whenever a CouchDB pod is restarted, invalidating any session cookies and leading to inconsistent auth failures with cookies are used.

I think the safest thing is likely to just make /opt/couchdb/etc/local.d persistent as well; the Dockerfile will already skip laying down a new [admins] section if one is present.

cc @kocolosk

@kocolosk
Copy link
Member

Hmm, the source of truth for default.d is the ConfigMap while local.d has no underlying source of truth.

Are you thinking to use a PV to make local.d persistent? Would you just reuse a sub path of the existing one for the DB files?

@willholley
Copy link
Member Author

It's not ideal but I think reusing a subpath of the existing db file PV would be simplest option, yes.

The issue with inconsistent cookie auth between nodes is also only solved if the _cluster_setup step synchronises the admin hashes in a persistent fashion; it's unclear to me whether that's the case.

@willholley
Copy link
Member Author

#26 provides a workaround by allowing users to specify a hash at deploy time

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

No branches or pull requests

2 participants