feat: Add configurable password policy for PostgresUser#290
Open
pretzelmaker wants to merge 2 commits intomovetokube:masterfrom
Open
feat: Add configurable password policy for PostgresUser#290pretzelmaker wants to merge 2 commits intomovetokube:masterfrom
pretzelmaker wants to merge 2 commits intomovetokube:masterfrom
Conversation
Author
|
Any chance I can get a bump in attention on this one @hitman99 or @tkcontiant? |
Member
|
I'll check it out on Monday |
Contributor
|
Question from my side: |
Author
The password generation only occurs during the reconciliation loop if the |
4694928 to
80a3d8d
Compare
Author
|
@hitman99 - Any chance this can hit your radar? |
Member
|
Thank you for this contribution. We already have a sizeable amount of env vars and I don't think adding more for this specific use case is the right path. @pretzelmaker Would you be willing to implement this config in a config file mountable via |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a comprehensive and configurable password generation policy for the
PostgresUserresource as proposed at #289. It addresses the need for stricter security compliance (e.g., minimum complexity requirements) and compatibility with legacy applications (e.g., ensuring passwords start with a letter).Key Features:
1. Global Operator Configuration:
Introduces new environment variables to set default password policies for all users managed by an operator instance.
New Env Vars:
POSTGRES_DEFAULT_PASSWORD_LENGTH(Default: 15)POSTGRES_DEFAULT_PASSWORD_MIN_LOWERPOSTGRES_DEFAULT_PASSWORD_MIN_UPPERPOSTGRES_DEFAULT_PASSWORD_MIN_NUMERICPOSTGRES_DEFAULT_PASSWORD_MIN_SPECIALPOSTGRES_DEFAULT_PASSWORD_EXCLUDE_CHARSPOSTGRES_DEFAULT_PASSWORD_ENSURE_FIRST_LETTER2. Per-CRD Override:
PostgresUserCRD to allow overriding the default 15 character alphanumeric password generator via a newspec.passwordPolicyfield.3. Enhanced Generator Logic:
4. Helm Chart Updates:
3.1.0and app version to2.5.0.postgres.passwordPolicy.Testing:
make fmt,make vet, andmake generateto ensure code quality and up-to-date generated files.This PR will close #289