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

Passphrase rotation doesn't work #140

Open
2 tasks
jeaye opened this issue Jul 23, 2018 · 4 comments
Open
2 tasks

Passphrase rotation doesn't work #140

jeaye opened this issue Jul 23, 2018 · 4 comments

Comments

@jeaye
Copy link
Contributor

jeaye commented Jul 23, 2018

According to the readme, just changing the vars within docker-compose.yaml should properly update all passphrases. Instead, the next container cluster boot ends abruptly with some unhappy services. So far, it looks like this is what's needed:

@timabbott
Copy link
Member

Making secret generation always run should be safe and easy; we actually do that in the non-Docker Zulip webapp upgrade script already (scripts/lib/upgrade-zulip-stage-2 in zulip/zulip), so I don't expect any issues with just changing the logic in entrypoint.sh to just always run it.

The postgres issue is actually kinda annoying; here's the upstream docker-entrypoint.sh. It just makes no attempt to do anything in the event that the database has already been created:
https://github.com/docker-library/postgres/blob/eff90effc6b5578be90bef93d96b3fceb1082a7c/10/docker-entrypoint.sh

So there are two options:

  • Give instructions for how to do a docker exec into the postgres image to run psql to run the appropriate ALTER USER command.
  • Submit a PR upstream extending the postgres image to auto-change the password in its docker-entrypoint.sh, and modify Dockerfile-postgresql in zulip/zulip to copy the patched version of the file in place (so we don't need to wait for upstream to merge).

@timabbott
Copy link
Member

For the second option above, I just opened docker-library/postgres#487.

@timabbott
Copy link
Member

It looks like upstream closed as wontfix the feature request. Not sure there's a good option for us here, though we do extend an upstream postgres image.

@timabbott
Copy link
Member

Probably the right answer is to add documentation on using ALTER USER to change the postgres password when changing these values.

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