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:03:02 +0000
Message-ID: <gh-aws-aws-advanced-jdbc-wrapper-2244-rc4592225870@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:860)
This says the trigger "stays meaningful" for a compromised application. That only holds if the runtime role can't remove the trigger. The verification step at line 892 doesn't check for this, so a setup that can still be bypassed passes it. Could we add something like:
```suggestion
The runtime role must not have `kms:GenerateDataKey`, `kms:Encrypt`, `kms:CreateKey` or `"Resource": "*"`, and must not be able to write the metadata tables. Without write access to `key_storage`, a compromised application cannot point a column at a different master key or HMAC key, and the `encryptionAllowedMasterKeyArns` list and the trigger stay meaningful. The runtime role must also not own the application tables or hold the `TRIGGER` privilege on them, since that lets it drop or disable the HMAC triggers; create those tables as the admin role, or move ownership with `ALTER TABLE ... OWNER TO app_admin` on PostgreSQL. Use a separate admin credential, held by your deployment pipeline or an operator, and do not ship it with the application.
```
and add "and that `DROP TRIGGER` on an encrypted table fails" to the verification sentence at line 892?