RelationalDatabase

RDS/SQL DB/Cloud SQL.

class: Data

Realizing resources

aws aws

resourcescopeenumeraterequired permissions
aws:rds:db_instance regional rds:DescribeDBInstances rds:DescribeDBInstances

gcp gcp

resourcescopeenumeraterequired permissions
gcp:spanner:instance global spanner.projects.instances.list spanner.instances.list
gcp:sqladmin:instance global sql.instances.list cloudsql.instances.list

azure azure

resourcescopeenumeraterequired permissions
azure:mariadb:server global arg:microsoft.dbformariadb/servers Microsoft.DBforMariaDB/servers/read
azure:mysql:flexibleserver global arg:microsoft.dbformysql/flexibleservers Microsoft.DBforMySQL/flexibleservers/read
azure:postgresql:flexibleserver global arg:microsoft.dbforpostgresql/flexibleservers Microsoft.DBforPostgreSQL/flexibleservers/read
azure:postgresql:server global arg:microsoft.dbforpostgresql/servers Microsoft.DBforPostgreSQL/flexibleServers/read
azure:sql:server global arg:microsoft.sql/servers Microsoft.Sql/servers/read

Rules that touch RelationalDatabase 29

rds-data:ExecuteStatement on an Aurora cluster (Serverless v1/v2 or provisioned with HttpEndpointEnabled) allows IAM-authenticated SQL execution via the RDS Data API - no DB client, VPC foothold, or static password required.
rds-db:connect on a DB user ARN grants IAM database authentication - the principal can generate a 15-minute token to connect as the mapped DB user without a static password.
Reading the RDS-managed master password secret (secretsmanager:GetSecretValue on MasterUserSecretArn) yields superuser DB access - the master credential authenticates as the DB admin user.
rds:ModifyDBInstance or rds:ModifyDBCluster with MasterUserPassword resets the master DB password to an attacker-known value, granting superuser DB access without knowing the current password.
Admin read access to the database (CanReadData) enables full exfiltration via pg_dump (PostgreSQL) or mysqldump (MySQL).
ARM write on the server resource sets/resets the native administrator password, enabling full DB access after network reach.
Admin password reset capability (CanModifyConfiguration to server config) plus network reachability to the DB endpoint yields full data-plane read of all databases.
Admin password reset capability plus network reachability yields full data-plane write access (INSERT, UPDATE, DELETE, DROP) on all databases.
Entra admin assignment (CanModifyConfiguration) plus network reachability to the DB endpoint yields full data-plane read of all databases via Entra token authentication.
Entra AD administrator assignment permission allows designating an Entra principal for DB admin access via token authentication when activeDirectoryAuth is enabled.
Firewall write permission on a public-access server allows creating an allow-all rule, exposing the DB endpoint to the internet.
PostgreSQL/MySQL Flexible Server with publicNetworkAccess Enabled and an internet-wide firewall rule exposes the DB endpoint to the public internet.
databases/export/action exports the full DB as a BACPAC to a caller-specified storage URL, enabling complete data exfiltration outside the tenant.
servers/administrators/write allows modifying the Entra admin assignment, which is equivalent to modifying the SQL access policy (who holds db_owner on all databases).
managedInstances/administrators/write allows modifying the Entra admin assignment on the MI, which is equivalent to modifying the SQL access policy (who holds db_owner on all MI databases).
servers/administrators/write lets a caller set any Entra identity (including themselves) as full DBA on all databases in the SQL server, yielding complete data-plane read and write if the SQL endpoint is network-reachable.
managedInstances/administrators/write lets a caller set any Entra identity (including themselves) as full DBA on all MI databases, yielding complete data-plane read and write if the MI endpoint is network-reachable.
backupLongTermRetentionPolicies/write allows redirecting SQL MI database backups to an attacker-controlled storage account, enabling full database exfiltration outside the tenant.
SQL Managed Instance with publicDataEndpointEnabled=true and an NSG allowing inbound TCP 3342 from the internet is reachable by any internet host.
Allow Azure services rule (startIp=endIp=0.0.0.0) exposes the SQL server to all Azure tenants and multi-tenant services - not public internet but broad cross-tenant exposure.
SQL logical server with publicNetworkAccess=Enabled and a 0.0.0.0–255.255.255.255 firewall rule is reachable from the public internet on port 1433.
cloudsql.instances.update can enable public IP (ipv4Enabled=true) and add 0.0.0.0/0 to authorizedNetworks, making the instance internet-reachable from any network.
A principal who can reset the root DB user password and then read all data in a Cloud SQL instance has escalated to full DBA-level database privilege.
roles/cloudsql.admin (including cloudsql.instances.* permissions) grants full administrative control over Cloud SQL instances.
cloudsql.instances.update can enable IAM database authentication (cloudsql.iam_authentication database flag), unlocking passwordless DB login for instanceUser principals.
A Cloud SQL instance with a public IP (ipv4Enabled=true) and an authorized network of 0.0.0.0/0 is TCP-reachable from the internet on the DB port, exposing it to unauthenticated network-level attack (brute-force, known CVEs).
Creating a Spanner backup (spanner.backups.create) then setting the backup's IAM policy (spanner.backups.setIamPolicy) to grant a cross-project principal spanner.backups.restoreDatabase copies the full database contents across the project boundary - effective exfiltration.
spanner.databases.read (or spanner.databases.select) + spanner.sessions.create together constitute effective data-plane read access: the caller can open a session and execute SQL to read arbitrary rows from any table in the database.
spanner.databases.write + spanner.sessions.create together constitute effective data-plane write access: the caller can open a session and execute DML (INSERT, UPDATE, DELETE) statements to modify arbitrary rows in any table in the database.
move · open · esc close