Skip to content

Convert random_string to random_password in RDS module.#90

Open
rin-skylight wants to merge 1 commit intomainfrom
rin/random_password
Open

Convert random_string to random_password in RDS module.#90
rin-skylight wants to merge 1 commit intomainfrom
rin/random_password

Conversation

@rin-skylight
Copy link
Copy Markdown
Collaborator

PULL REQUEST

Summary

Previously, the RDS terraform module used random_string to generate a password for the database. This is dangerous, as random_string is not marked as sensitive. Values generated using this resource can be viewed in the console, and might be recovered by a malicious actor.

This PR replaces random_string with random_password, which guarantees handling as a sensitive value.

Related Issue

Fixes #89

Additional Information

See below for an example of how random_string is currently handled. It appears as though Terraform is automatically converting the object for safety, but this code change should guarantee proper handling.
Screenshot 2024-10-08 at 1 00 21 PM

Copy link
Copy Markdown
Collaborator

@shanice-skylight shanice-skylight left a comment

Choose a reason for hiding this comment

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

Straightforward change, good catch.

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.

Fix use of random_string in RDS module.

3 participants