Repository navigation
refactor: look up the HMAC key for each row in the KMS PostgreSQL trigger - #216
Open
aaron-congo wants to merge 1 commit into
Open
aaron-congo wants to merge 1 commit into
aaron-congo wants to merge 1 commit into
Conversation
…gger The PostgreSQL trigger now reads the column's HMAC key from key_storage for every row instead of keeping a per-transaction copy in a setting, which simplifies the trigger SQL. Measured on PostgreSQL 16, the lookup adds about 3 microseconds per row for multi-row transactions and no measurable cost for single-row transactions.
sophia-bq
approved these changes
Oct 20, 2026
| - [Federated Authentication Plugin](https://aws.github.io/aws-advanced-wrapper-docs/ruby/using-plugins/federated-auth), which authenticates with Active Directory Federation Services (AD FS), exchanges the resulting SAML assertion for temporary AWS credentials via STS, and connects to the database with an RDS IAM authentication token. Enabled with the `federated_auth` plugin code ([PR #207](https://github.com/aws/aws-advanced-ruby-driver-wrapper/pull/207)). | ||
|
|
||
| ### :crab: Changed | ||
| - Simplified the KMS Encryption Plugin's PostgreSQL trigger SQL to read the column's HMAC key from `key_storage` for every row. Re-run the trigger SQL from the [documentation](https://aws.github.io/aws-advanced-wrapper-docs/ruby/using-plugins/kms-encryption) to update existing deployments ([PR #216](https://github.com/aws/aws-advanced-ruby-driver-wrapper/pull/216)). |
Contributor
There was a problem hiding this comment.
Could we add a more specific link in the docs ie. the specific section of the page so people can find the trigger easier?
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.
The PostgreSQL trigger now reads the column's HMAC key from key_storage for every row instead of keeping a per-transaction copy in a setting, which simplifies the trigger SQL.
Measured on PostgreSQL 16, the lookup adds about 3 microseconds per row for multi-row transactions and no measurable cost for single-row transactions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.