fix: grant AWS SQLWorkspace RDS vendor permissions - #152
Closed
mattisonchao wants to merge 7 commits into
Closed
Conversation
Co-authored-by: Codex <codex@openai.com>
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.
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
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.
Motivation
SQLWorkspace provisioning runs through
StreamNativeCloudBootstrapRole, which has no RDS write permissions, sords:CreateDBSubnetGroup/rds:CreateDBInstanceare denied by both the attached policy and the permission boundary.Companion: streamnative/argo#1617, streamnative/terraform-aws-cloud#191.
Modifications
*-sncresources: create instance and subnet group (postgres, private, encrypted,Vendor=StreamNative), manage/delete, tag, and final snapshot.rds:Describe*andrds:ListTagsForResourceso the terraform provider can read engine versions and instance state.Notes:
rds:AddTagsToResourceis granted separately and is required for create to succeed.og:default*/pg:default*are needed becauseCreateDBInstanceauthorizes against the default parameter and option groups it attaches.<pm_name>-sqlworkspace-sncin the customer account, already covered by the existingResS3statement vias3_bucket_pattern(default*snc*).skip_final_snapshot = true. No restore or delete snapshot permission is granted.Testing
terraform validate -no-colorpasses inmodules/aws/vendor-access.