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

nixos/keycloak: use db username in db init scripts #117072

Merged
merged 1 commit into from Apr 29, 2021

Conversation

leona-ya
Copy link
Member

Motivation for this change

I would like to use a different database username, but want to use the automatic provisioning scripts provided by the NixOS Keycloak module

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@leona-ya
Copy link
Member Author

leona-ya commented Apr 2, 2021

/cc @talyz

@talyz
Copy link
Contributor

talyz commented Apr 6, 2021

Hi! The problem with this is that changing databaseUsername after deploying will cause issues. I had an implementation that solved this initially, but it felt a bit overly complex: #99906 (comment). It also didn't support MySQL at that point. Can I ask why you want to change the database user name?

@aanderse
Copy link
Member

aanderse commented Apr 6, 2021

ping @grahamc for informational purposes.

@leona-ya
Copy link
Member Author

leona-ya commented Apr 6, 2021

I'm unsure if this module should handle changing the database username after deployment. The reason I wanted to change the database username is that I know people having a specific schema for database users and 'keycloak' doesn't fit into this schema. But it's not that important to support this.

@ghost
Copy link

ghost commented Apr 9, 2021

Maybe it would be fine to add a note that tells users they have to manually adjust the state to make sure the user has the permissions when changing the value assigned to this option after the first deployment?

@leona-ya
Copy link
Member Author

For me that would be a good option

@ghost ghost requested a review from talyz April 29, 2021 18:04
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

None yet

5 participants