Skip to content

fix: grant AWS SQLWorkspace RDS vendor permissions - #152

Closed
mattisonchao wants to merge 7 commits into
streamnative:mainfrom
mattisonchao:fix/aws-sqlworkspace-vendor-permissions
Closed

fix: grant AWS SQLWorkspace RDS vendor permissions#152
mattisonchao wants to merge 7 commits into
streamnative:mainfrom
mattisonchao:fix/aws-sqlworkspace-vendor-permissions

Conversation

@mattisonchao

@mattisonchao mattisonchao commented Aug 13, 2026

Copy link
Copy Markdown
Member

Motivation

SQLWorkspace provisioning runs through StreamNativeCloudBootstrapRole, which has no RDS write permissions, so rds:CreateDBSubnetGroup / rds:CreateDBInstance are denied by both the attached policy and the permission boundary.

Companion: streamnative/argo#1617, streamnative/terraform-aws-cloud#191.

Modifications

  • Grant scoped RDS permissions for *-snc resources: create instance and subnet group (postgres, private, encrypted, Vendor=StreamNative), manage/delete, tag, and final snapshot.
  • Allow rds:Describe* and rds:ListTagsForResource so the terraform provider can read engine versions and instance state.
  • Added identically to the bootstrap policy and the permission boundary, since effective permission is their intersection.
  • Pass the configured AWS region into the bootstrap-policy template.
  • Document RDS as a bootstrap-role capability.

Notes:

  • Scoping is by resource name, not tag: RDS cannot authorize a create on tags, so rds:AddTagsToResource is granted separately and is required for create to succeed.
  • og:default* / pg:default* are needed because CreateDBInstance authorizes against the default parameter and option groups it attaches.
  • No S3 changes. The bucket is <pm_name>-sqlworkspace-snc in the customer account, already covered by the existing ResS3 statement via s3_bucket_pattern (default *snc*).
  • Final snapshot is latent: argo sets skip_final_snapshot = true. No restore or delete snapshot permission is granted.

Testing

  • terraform validate -no-color passes in modules/aws/vendor-access.
  • Rendered policies parse as JSON; RDS statements are identical in policy and boundary.
  • Applied to a test account and verified via streamnative/argo#1617: RDS create, update and delete all passed.

@mattisonchao
mattisonchao requested a review from a team as a code owner August 13, 2026 05:02
@mattisonchao mattisonchao changed the title fix: grant AWS SQLWorkspace vendor permissions fix: grant AWS SQLWorkspace S3 vendor permissions Aug 13, 2026
The argo AWS v2 workflow provisions an RDS instance as the RisingWave
meta store (sqlworkspace-rds-* resources tagged Vendor=StreamNative).
Add scoped RDS create/manage/final-snapshot permissions to the
StreamNativeCloudProvisionPreservePolicy and the permission boundary,
mirroring the existing least-privilege SQLWorkspace S3 statements.
The upbound terraform provider queries engine versions and instance state
while provisioning; broaden the RDS grant from specific Describe actions to
rds:Describe* in the bootstrap policy and permission boundary.
@mattisonchao mattisonchao changed the title fix: grant AWS SQLWorkspace S3 vendor permissions fix: grant AWS SQLWorkspace S3 and RDS vendor permissions Aug 14, 2026
The vendor-access S3 scope (s3_bucket_pattern, typically "snc-*") does not match the per-poolmember tiered-storage bucket names produced by terraform-aws-cloud's dns-bucket module (<pm>-tiered-storage-snc). Creating a new poolmember therefore fails at provision1 with s3:CreateBucket AccessDenied, before SQLWorkspace provisioning even starts.

- provision_preserve: allow s3:CreateBucket and bucket management on *-tiered-storage-snc alongside the configured bucket pattern
- runtime_iam_policy: allow ListBucket and object access on *-tiered-storage-snc alongside the configured bucket pattern
@ciiiii ciiiii closed this Aug 20, 2026
@ciiiii ciiiii changed the title fix: grant AWS SQLWorkspace S3 and RDS vendor permissions fix: grant AWS SQLWorkspace RDS vendor permissions Aug 20, 2026
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.

2 participants