-
-
Notifications
You must be signed in to change notification settings - Fork 590
fix: Increase length of generated random password from 10 to 20 #222
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets just turn this into a variable with the length that defaults to 10. something like
var.password_length
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why give people a footgun to shoot themselves with? Do you want to allow people to set shorter passwords than 10 chars? Fewer variables == a better API.
There's no cost to having a long password, unless someone is trying to memorize the password instead of storing it in a secure place 😱. That's crazy in 2021.
A 20 char random password is good enough for everybody. It's long enough to resist brute force attacks from password crackers for at least a century.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree in principle that a longer password is a better posture, but we try to not break things for users nor dictate how they should setup their resources. we try to balance between providing a sane set of defaults and good documentation/examples to help them get up and running quickly, but also allowing them flexibility to customize as it suites their setup
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bryantbiggs I think the master password is only used during the creation of the DB and not verified during updates, so it is safe to change it and it won't break anything for existing users except recreation of the
random_password
resource itself. Right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antonbabenko I am fairly certain it will force the update. The length change will trigger the resource update for the
random_password
which means the input for the password of the cluster will be different and show up as a diff and will get updated on the next apply. should be easy to confirm with the examples@ryboe this is what we have for the RDS module, it should be a variable https://github.com/terraform-aws-modules/terraform-aws-rds/blob/66336d9c489c4e318799219a7ec5584efdae70be/main.tf#L15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's your call, but I still think it should not be a variable. APIs with no knobs are generally better than APIs with lots of knobs. If the
rds
module exposes it, then it's making a mistake too. The only thingvar.password_length
gives the user is the opportunity to misconfigure the db.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the status of this PR, is it abandoned? At the moment I "workaround" this by creating my own random_password resource of 32 symbol length and
password = random_password.aurora_master_password.result