fix: grant AWS SQLWorkspace S3 and RDS vendor permissions - #152
Open
mattisonchao wants to merge 7 commits into
Open
fix: grant AWS SQLWorkspace S3 and RDS vendor permissions#152mattisonchao wants to merge 7 commits into
mattisonchao wants to merge 7 commits into
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
AWS v2 SQLWorkspace provisioning runs through
StreamNativeCloudBootstrapRole. Thebootstrap policy and permission boundary scoped the vendor role to S3, so the new
deterministic SQLWorkspace resources cannot be provisioned:
rw-*state-store bucket cannot be created or configured with theexisting bucket pattern.
sqlworkspace-rds-*PostgreSQL meta store (RisingWave meta node backend) cannotbe created:
rds:CreateDBSubnetGroup/rds:CreateDBInstanceare denied by both theattached policy and the permission boundary.
This change grants the least-privilege S3 and RDS operations required by the AWS v2
SQLWorkspace modules, scoped to StreamNative-tagged resources.
Companion implementation: streamnative/argo#1612.
Modifications
SQLWorkspace buckets matching
rw-*-${account_id}-${region}-*.sqlworkspace-rds-*resources: create instance andsubnet group (postgres engine, private, encrypted, Vendor=StreamNative tagged),
manage/delete, final snapshot, and tags.
rds:Describe*so the terraform provider can query engine versions andinstance state while provisioning.
buckets produced by terraform-aws-cloud (
<pm>-tiered-storage-snc), and the runtimerole to read/write them; the existing
s3_bucket_pattern(typicallysnc-*) doesnot match these names, so a brand-new poolmember fails at
provision1withs3:CreateBucketAccessDenied before SQLWorkspace provisioning even starts.Testing
terraform validate -no-colorpasses inmodules/aws/vendor-access.bucket pattern, R53 zones).
boundary v48; the SQLWorkspace RDS E2E then proceeds past IAM denials.
aws-usw1-dev-issue1612ino-for6u) reproduces thes3:CreateBucketAccessDenied onaws-usw1-dev-issue1612-tiered-storage-sncatprovision1; rendered policies withthe added
*-tiered-storage-sncresource parse as JSON and cover the bucket.After release, existing AWS BYOC environments must apply the updated vendor-access
module before SQLWorkspace S3/RDS allocation is enabled.