Skip to content

fix: rds bootstrap - #53

Open
aliziel wants to merge 4 commits into
mainfrom
fix/rds-bootstrap
Open

fix: rds bootstrap#53
aliziel wants to merge 4 commits into
mainfrom
fix/rds-bootstrap

Conversation

@aliziel

@aliziel aliziel commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary:

Addresses issues surfaced during initial stack create on EIC:

  • Syntax error in bootstrapper SQL command to create non-superuser
  • Rollback failure on RDS-dependent resources

Changes

  • SQL syntax error
    • Reverted Identifier use on non-identifier parameters
    • Break up command + use one role exists check
      • Identifier use caught the CREATE USER condition in update command
  • Rollback failure
    • Make deletion protection configurable, defaulting to True
      • Useful for other database maintenance procedures
    • Allow database rollback on failed create with RETAIN_ON_UPDATE_OR_DELETE

PR Checklist

  • Unit tests
  • Ad-hoc testing - Deploy changes and test manually
  • Integration tests
  • Infrastructure changes - test using terraform validate and terraform plan

@aliziel
aliziel force-pushed the fix/rds-bootstrap branch from 63bbe28 to 311be89 Compare July 29, 2026 21:24
cursor.execute(
sql.SQL(
"ALTER USER {username} WITH PASSWORD {password};"
).format(username=sql.Identifier(username), password=password)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Wanted to note previous concern about parameter binding + injection.

Both .format() and %s look like Python-based string interpolation (unsafe), but these are psycopg methods:

@aliziel
aliziel marked this pull request as ready for review August 12, 2026 21:15
@aliziel
aliziel requested a review from a team August 12, 2026 21:15
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.

1 participant