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

Frontend changes required by CouchDB 3.1 #1151

Closed
wants to merge 8 commits into from

Conversation

amaltaro
Copy link
Contributor

This PR takes over some of the changes initially provided in #1088

NOTE that this is a work in progress!

In short:

  • we are defining a new frontend/Apache environment variable that will contain the path to a file with CouchDB user and roles
  • the frontend cmsauth module will parse that file and load the user and role in memory
  • once an HTTP request is successfully authenticated, two extra HTTP headers will be added before that request is passed over to the backends
    • x-auth-couchdb-username will contain the CouchDB user name
    • x-auth-couchdb-roles will contain the CouchDB user role
  • CouchDB will then use this information to authorize the user to access the databases and many other Couch endpoints.

@amaltaro
Copy link
Contributor Author

This is an almost working feature, however I still see authentication error in the backend. I tried debugging it to see if there was any hidden character together with the credentials, but it doesn't seem to be the case. I also couldn't find a simple way to expand all the headers coming to the backend.

Anyways, I discovered 2 CouchDB parameters that would make its authentication work just like CouchDB 1.6:
admin_only_all_dbs
and
default_security

they have been provided here: #1088 and some initial tests were successful.

@amaltaro
Copy link
Contributor Author

DO NOT MERGE IT! I am not closing it yet though because we might decide to do something different in the next month or so.

@amaltaro
Copy link
Contributor Author

amaltaro commented Jul 7, 2022

@muhammadimranfarooqi Imran, I think this PR can be closed now that we know we don't need these changes. If we ever need it, I can come back to this. Closing it.

@amaltaro amaltaro closed this Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant