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

feat: Added couch configs to enable proxy authentication #9668

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmayore
Copy link

@rmayore rmayore commented Nov 26, 2024

Description

Building couchdb image with proxy auth enabled

  1. Clone this fork, and pull from this branch
  2. npm ci
  3. npm run build-dev
  4. Build images locally with the command npm run local-images
  5. docker image ls to get the new, timestamped, locally build couchdb image
  6. Start your couchdb container using the new image. If you're running your couch using the docker compose template, replace the image name with the local one in the docker-compose.yml file

Restarting existing couchdb container with proxy auth enabled (thanks @mrjones-plip)

  1. get to the couchdb shell with docker exec -it cht-docker-couchdb-1 bash
  2. edit the config in vi /opt/couchdb/etc/default.d/10-docker-default.ini. You might have to install your favorite editor if it's not present in the container
  3. Have your config changes take effect by restarting. do this by exiting the container shell and running COUCHDB_USER=medic COUCHDB_PASSWORD=password docker compose -f docker-compose.yml -f couchdb-override.yml restart

Generating proxy auth token

Use the secret to generate a HMAC of the username... this will become our proxy token.
echo -n "username" | openssl dgst -sha256 -hmac "the_secret"

Code review checklist

  • UI/UX backwards compatible: Test it works for the new design (enabled by default). And test it works in the old design, enable can_view_old_navigation permission to see the old design.
  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@rmayore rmayore marked this pull request as draft November 26, 2024 08:48
@jkuester jkuester self-requested a review November 26, 2024 16:22
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

Successfully merging this pull request may close these issues.

1 participant