pg.ddx.io  aws/aws-advanced-jdbc-wrapper GitHub issues and pull requests  
help / color / mirror / Atom feed
From: aaron-congo (@aaron-congo) <noreply+aaron-congo@github.com>
To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>
Subject: Re: [aws/aws-advanced-jdbc-wrapper] PR #2244: docs: kms least privilege
Date: Mon, 16 Nov 2026 22:08:54 +0000
Message-ID: <gh-aws-aws-advanced-jdbc-wrapper-2244-rc4592293470@github.com> (raw)
In-Reply-To: <gh-aws-aws-advanced-jdbc-wrapper-2244@github.com>
References: <gh-aws-aws-advanced-jdbc-wrapper-2244@github.com>

(on docs/using-the-jdbc-driver/using-plugins/UsingTheKmsEncryptionPlugin.md:867)

These `REVOKE` statements only remove direct grants on the `encrypt` objects. The runtime role can still write the metadata tables in several other ways:

- PostgreSQL: if `app_runtime` owns the `encrypt` tables, it can grant itself the privileges again. Step 4 doesn't say which role creates them, so this is likely when the app user ran step 4. Membership in `rds_superuser`, in `app_admin`, or in `pg_write_all_data` (PG14+) also gives write access that this block doesn't remove.
- MySQL (line 882): `REVOKE ALL PRIVILEGES ON encrypt.*` doesn't touch global grants (`ON *.*`, for example when the app connects as the RDS master user) or table-level grants such as an earlier `GRANT INSERT ON encrypt.key_storage`.

In all of these cases `INSERT INTO encrypt.key_storage` still succeeds after the block runs. Could we add a short note, for example: "Make the admin role the owner of the metadata tables (`ALTER TABLE encrypt.key_storage OWNER TO app_admin;` and the same for `encryption_metadata`), and make sure the runtime role is not a superuser or a member of the admin role. On MySQL, check `SHOW GRANTS FOR 'app_runtime'@'%'` for global and table-level privileges and revoke those too."


view thread (15+ messages)  latest in thread

Message-ID: <gh-aws-aws-advanced-jdbc-wrapper-2244-rc4592293470@github.com>
Permalink:  ../gh-aws-aws-advanced-jdbc-wrapper-2244-rc4592293470@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox