From 1191c205ca06b5b38a9d4edbf14a0ebcde00c7a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 11:43:32 -0700 Subject: [PATCH 01/21] build(deps): bump @mermaid-js/layout-elk from 0.1.9 to 1.0.1 in /site (#34) * build(deps): bump @mermaid-js/layout-elk from 0.1.9 to 1.0.1 in /site Bumps [@mermaid-js/layout-elk](https://github.com/mermaid-js/mermaid) from 0.1.9 to 1.0.1. - [Release notes](https://github.com/mermaid-js/mermaid/releases) - [Commits](https://github.com/mermaid-js/mermaid/compare/@mermaid-js/layout-elk@0.1.9...@mermaid-js/layout-elk@1.0.1) --- updated-dependencies: - dependency-name: "@mermaid-js/layout-elk" dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * dependabot: ignore @mermaid-js/layout-elk --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sophia Chu <112967780+sophia-bq@users.noreply.github.com> --- .github/dependabot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 507cdbd..378ee0d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,15 @@ updates: labels: - "dependencies" - "javascript" + ignore: + # @mermaid-js/layout-elk is a dependency of @docusaurus/theme-mermaid, which + # requires the 0.1.x range. A previous Dependabot PR bumped it to 1.0.1, + # which breaks `npm install` (ERESOLVE) and the Docusaurus build. Pin it + # to the 0.1.x line and block major bumps until theme-mermaid declares + # support for layout-elk 1.x. Remove this entry when that happens. + - dependency-name: "@mermaid-js/layout-elk" + update-types: + - "version-update:semver-major" groups: site-minor-and-patch: patterns: From 86c867de6dccc3caad993bb5e10f1f0f7b59a403 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 12:23:19 -0700 Subject: [PATCH 02/21] build(deps): keep @mermaid-js/layout-elk at 0.1.9 (#36) * build(deps): bump @mermaid-js/layout-elk Bumps the site-minor-and-patch group in /site with 1 update: [@mermaid-js/layout-elk](https://github.com/mermaid-js/mermaid). Updates `@mermaid-js/layout-elk` from 0.1.9 to 0.2.3 - [Release notes](https://github.com/mermaid-js/mermaid/releases) - [Commits](https://github.com/mermaid-js/mermaid/compare/@mermaid-js/layout-elk@0.1.9...@mermaid-js/layout-elk@0.2.3) --- updated-dependencies: - dependency-name: "@mermaid-js/layout-elk" dependency-version: 0.2.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: site-minor-and-patch ... Signed-off-by: dependabot[bot] * dependabot: ignore @mermaid-js/layout-elk --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sophia Chu <112967780+sophia-bq@users.noreply.github.com> --- .github/dependabot.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 378ee0d..9744ac8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,13 +10,13 @@ updates: - "javascript" ignore: # @mermaid-js/layout-elk is a dependency of @docusaurus/theme-mermaid, which - # requires the 0.1.x range. A previous Dependabot PR bumped it to 1.0.1, - # which breaks `npm install` (ERESOLVE) and the Docusaurus build. Pin it - # to the 0.1.x line and block major bumps until theme-mermaid declares - # support for layout-elk 1.x. Remove this entry when that happens. + # requires ^0.1.9. A previous Dependabot PR bumped it which breaks `npm install` + # (ERESOLVE) and the Docusaurus build. Block major and minor bumps until + # theme-mermaid declares support for them. Remove this entry when that happens. - dependency-name: "@mermaid-js/layout-elk" update-types: - "version-update:semver-major" + - "version-update:semver-minor" groups: site-minor-and-patch: patterns: From 34d9eca0e53c8bd016a782fdd7937b572509b4e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 12:26:03 -0700 Subject: [PATCH 03/21] build(deps): bump actions/setup-node from 7.0.0 to 7.1.0 (#37) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy-pages.yml | 2 +- .github/workflows/verify-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 92c8e8c..df38568 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -57,7 +57,7 @@ jobs: run: python generate.py - name: Set up Node.js - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '20' cache: npm diff --git a/.github/workflows/verify-docs.yml b/.github/workflows/verify-docs.yml index d23ebe5..6d3243d 100644 --- a/.github/workflows/verify-docs.yml +++ b/.github/workflows/verify-docs.yml @@ -75,7 +75,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Node.js - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '20' cache: npm From 26e16c583f4a3322a71030f660c8259214b5d224 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 12:35:34 -0700 Subject: [PATCH 04/21] build(deps): bump shell-quote from 1.10.0 to 1.12.0 in /site (#38) Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.10.0 to 1.12.0. - [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/shell-quote/compare/v1.10.0...v1.12.0) --- updated-dependencies: - dependency-name: shell-quote dependency-version: 1.12.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 83ed11c..6542638 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -17621,9 +17621,9 @@ } }, "node_modules/shell-quote": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz", - "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz", + "integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==", "license": "MIT", "engines": { "node": ">= 0.4" From cde5612a3439c3931757a5712db10b7875249321 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 12:38:56 -0700 Subject: [PATCH 05/21] build(deps): bump source-map-js from 1.2.1 to 1.2.2 in /site (#39) Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/7rulnik/source-map-js/releases) - [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md) - [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2) --- updated-dependencies: - dependency-name: source-map-js dependency-version: 1.2.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 6542638..dfbe3aa 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -17826,9 +17826,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" From 505247416385237daff7e7d3a8a23af20685d7ba Mon Sep 17 00:00:00 2001 From: Aaron <69273634+aaron-congo@users.noreply.github.com> Date: Tue, 13 Oct 2026 16:01:29 -0700 Subject: [PATCH 06/21] docs - main (ruby): correct how iam_expiration_sec controls the IAM token cache lifetime (#41) --- content/plugins.yaml | 13 ++++++++++--- content/scenarios.yaml | 2 +- site/docs-ruby/using-plugins/iam-authentication.md | 13 ++++++++++--- site/src/generated/scenarios-ruby.json | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/content/plugins.yaml b/content/plugins.yaml index 5a09801..e5bb694 100644 --- a/content/plugins.yaml +++ b/content/plugins.yaml @@ -131,7 +131,7 @@ plugins: ruby: { name: iam_region, required: "No", defaultNote: "parsed from host", example: "us-east-1" } - concept: iamExpiration type: integer - description: "Fallback cache lifetime, in seconds, for a generated IAM token. A cached token normally lives for the lifetime signed into the token itself (15 minutes) minus a 60-second safety margin; this value is used only when that lifetime cannot be read from the token. It is capped at a maximum of `870.0` — the default — so a cached token is never used after it expires. A value greater than `870.0` or less than or equal to `0` is rejected." + description: "Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process, and its lifetime is set by the first connection that uses the IAM plugin; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected." spellings: ruby: { name: iam_expiration_sec, type: float, required: "No", default: "870.0", unit: s, example: "600.0 (maximum 870.0)" } - concept: iamTokenProperty @@ -271,11 +271,18 @@ plugins: refreshes to a new access key gets a new token. When the credentials provider resolves to no credentials, the token is not cached. - A cached token is reused until 60 seconds before the expiry signed into it - (`iam_expiration_sec` applies only when that expiry cannot be read). If a + A cached token is reused until `iam_expiration_sec` elapses or until 60 + seconds before the token's own 15-minute expiry, whichever comes first. If a login error occurs with a cached token, the plugin automatically fetches a fresh token and retries the connection once. + :::note + The token cache is shared by every connection in the process, and the first + connection that uses the IAM plugin sets its `iam_expiration_sec`. Connections + opened later with a different value still use the first connection's value, so + set `iam_expiration_sec` to the same value on every connection. + ::: + ## Related - [AWS Credentials](../aws-credentials) — the plugin calls RDS to generate each diff --git a/content/scenarios.yaml b/content/scenarios.yaml index 62541a7..55e0b8f 100644 --- a/content/scenarios.yaml +++ b/content/scenarios.yaml @@ -462,7 +462,7 @@ addons: plugins: [iam] params: { iam_region: "" } notes: - - "Tokens are cached for `iam_expiration_sec` seconds (default `870.0`), which sits just under the 15-minute token lifetime." + - "Tokens are cached for up to `iam_expiration_sec` seconds, and never past 60 seconds before the 15-minute token lifetime ends, so with the default of `870.0` a token is reused for about 14 minutes." assumes: - "IAM authentication is enabled on the cluster and the database user is mapped to an IAM role." links: [rds_iam, rds_ca_bundle] diff --git a/site/docs-ruby/using-plugins/iam-authentication.md b/site/docs-ruby/using-plugins/iam-authentication.md index 6a5207a..0caa1cb 100644 --- a/site/docs-ruby/using-plugins/iam-authentication.md +++ b/site/docs-ruby/using-plugins/iam-authentication.md @@ -140,7 +140,7 @@ Verify plugin compatibility within your Ruby configuration using the [compatibil | `iam_host` | String | No | derived from host | Overrides the hostname used to generate the IAM token. Required when connecting through a custom endpoint. The default is derived from the connection host.

Example: `my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com` | | `iam_port` | Integer | No | dialect default | Overrides the port used to generate the IAM token. The default is determined from the underlying driver protocol or the dialect default.

Example: `5432` | | `iam_region` | String | No | parsed from host | Overrides the AWS region used to generate the IAM token. The default is parsed from the connection string.

Example: `us-east-1` | -| `iam_expiration_sec` | Float | No | `870.0` | Fallback cache lifetime, in seconds, for a generated IAM token. A cached token normally lives for the lifetime signed into the token itself (15 minutes) minus a 60-second safety margin; this value is used only when that lifetime cannot be read from the token. It is capped at a maximum of `870.0` — the default — so a cached token is never used after it expires. A value greater than `870.0` or less than or equal to `0` is rejected. *(sec)*

Example: `600.0 (maximum 870.0)` | +| `iam_expiration_sec` | Float | No | `870.0` | Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process, and its lifetime is set by the first connection that uses the IAM plugin; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected. *(sec)*

Example: `600.0 (maximum 870.0)` | | `iam_access_token_property_name` | Symbol | No | `:password` | The connection property name the generated token is injected into. Some underlying drivers require a specific property name for the token.

Example: `:password` | | `aws_credentials_provider` | Object | No | SDK default chain | A custom AWS credentials provider instance. One property is read by the IAM authentication, Secrets Manager and KMS encryption plugins, so setting it once covers all of them. When unset, each falls back to the AWS SDK default credential provider chain.

Example: `Aws::AssumeRoleCredentials.new(...)` | @@ -185,11 +185,18 @@ different credentials never share a token, and a credentials provider that refreshes to a new access key gets a new token. When the credentials provider resolves to no credentials, the token is not cached. -A cached token is reused until 60 seconds before the expiry signed into it -(`iam_expiration_sec` applies only when that expiry cannot be read). If a +A cached token is reused until `iam_expiration_sec` elapses or until 60 +seconds before the token's own 15-minute expiry, whichever comes first. If a login error occurs with a cached token, the plugin automatically fetches a fresh token and retries the connection once. +:::note +The token cache is shared by every connection in the process, and the first +connection that uses the IAM plugin sets its `iam_expiration_sec`. Connections +opened later with a different value still use the first connection's value, so +set `iam_expiration_sec` to the same value on every connection. +::: + ## Related - [AWS Credentials](../aws-credentials) — the plugin calls RDS to generate each diff --git a/site/src/generated/scenarios-ruby.json b/site/src/generated/scenarios-ruby.json index fda81b5..461dd33 100644 --- a/site/src/generated/scenarios-ruby.json +++ b/site/src/generated/scenarios-ruby.json @@ -947,7 +947,7 @@ "iam_region": "" }, "notes": [ - "Tokens are cached for `iam_expiration_sec` seconds (default `870.0`), which sits just under the 15-minute token lifetime." + "Tokens are cached for up to `iam_expiration_sec` seconds, and never past 60 seconds before the 15-minute token lifetime ends, so with the default of `870.0` a token is reused for about 14 minutes." ], "assumes": [ "IAM authentication is enabled on the cluster and the database user is mapped to an IAM role." From b5cc109cc7c5f5cbbda986ed5d4ab8fb902477f3 Mon Sep 17 00:00:00 2001 From: Aaron <69273634+aaron-congo@users.noreply.github.com> Date: Wed, 21 Oct 2026 08:14:06 -0700 Subject: [PATCH 07/21] docs(ruby): link the KMS trigger SQL from the wrapper repo and document updating it (#43) --- content/plugins.yaml | 254 +++++------------- .../docs-ruby/using-plugins/kms-encryption.md | 247 +++++------------ 2 files changed, 132 insertions(+), 369 deletions(-) diff --git a/content/plugins.yaml b/content/plugins.yaml index e5bb694..49018ef 100644 --- a/content/plugins.yaml +++ b/content/plugins.yaml @@ -559,9 +559,10 @@ plugins: ruby: { name: encryption_return_unverified_data, required: "No", default: "false", example: "false" } adminUtility: ruby: "Plugins::Encryption::KeyManagementUtility" - # The trigger SQL below is a copy of the files in the Ruby wrapper repo, which its integration - # tests install: spec/integration/host/src/test/resources/sql/kms_encryption_trigger_pg.sql and - # kms_encryption_trigger_mysql.sql. Keep the two identical; change the files first. + # The trigger SQL lives in the Ruby wrapper repo, which installs it in its integration tests: + # lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_pg.sql and + # trigger_mysql.sql. This page links to those files rather than copying them. When a file + # changes, bump the version in its database comment and add a row to "Updating the trigger SQL". serverSideEnforcement: | ## Enforce encryption in the database @@ -571,67 +572,24 @@ plugins: verify that a value carries a valid integrity tag without holding the data key. + The trigger SQL is maintained in the wrapper repository: + + - PostgreSQL: [`trigger_pg.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_pg.sql) + - MySQL: [`trigger_mysql.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_mysql.sql) + + Run the file for your engine once per database, then add a trigger for every + encrypted column as shown below. The SQL is updated from time to time; see + [Updating the trigger SQL](#updating-the-trigger-sql). + ### PostgreSQL - ```sql - -- pgcrypto provides hmac(). If it is already installed in a schema other than public, - -- replace public in public.hmac below with that schema. - CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public; - - -- Replace 'encrypt' below if encryption_metadata_schema is set to something else. - -- A trigger runs with the search_path of the session that fires it. Pinning it to pg_catalog - -- stops a session from putting its own functions or operators, such as hmac() or <>, ahead of - -- the built-in ones to get a plaintext value past this check. - CREATE OR REPLACE FUNCTION enforce_encrypted_column() RETURNS trigger - SET search_path = pg_catalog, pg_temp - AS $$ - DECLARE - col_name text := TG_ARGV[0]; - col_value bytea; - hmac_key bytea; - cache_key text := 'hmac_key.' || TG_TABLE_NAME || '.' || col_name; - unchanged boolean; - BEGIN - -- An UPDATE that leaves the encrypted value as it was is not re-checked; see - -- "Updates after a key rotation". - IF TG_OP = 'UPDATE' THEN - EXECUTE format('SELECT ($1).%I IS NOT DISTINCT FROM ($2).%I', col_name, col_name) - INTO unchanged USING NEW, OLD; - IF unchanged THEN - RETURN NEW; - END IF; - END IF; - - EXECUTE format('SELECT ($1).%I', col_name) INTO col_value USING NEW; - IF col_value IS NULL THEN - RETURN NEW; - END IF; - - -- A setting cached by an earlier transaction reads back as '' rather than being - -- undefined, so an empty value is treated as not cached. - hmac_key := decode(NULLIF(current_setting(cache_key, true), ''), 'hex'); - IF hmac_key IS NULL THEN - SELECT ks.hmac_key INTO hmac_key - FROM encrypt.encryption_metadata em - JOIN encrypt.key_storage ks ON em.key_id = ks.id - WHERE em.table_name = TG_TABLE_NAME AND em.column_name = col_name; - - IF hmac_key IS NULL THEN - RAISE EXCEPTION 'No HMAC key is configured for %.%', TG_TABLE_NAME, col_name; - END IF; - - PERFORM set_config(cache_key, encode(hmac_key, 'hex'), true); - END IF; - - IF length(col_value) < 65 - OR substring(col_value from 1 for 32) <> public.hmac(substring(col_value from 33), hmac_key, 'sha256'::text) THEN - RAISE EXCEPTION 'Column %.% does not carry a valid HMAC tag (plaintext or tampered value)', TG_TABLE_NAME, col_name; - END IF; - - RETURN NEW; - END; - $$ LANGUAGE plpgsql; - ``` + Run [`trigger_pg.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_pg.sql). It installs the `pgcrypto` + extension if it is not already installed, and creates the + `enforce_encrypted_column()` trigger function. The function reads the + metadata tables as `encrypt.encryption_metadata` and `encrypt.key_storage`: + replace `encrypt` if `encryption_metadata_schema` is set to something else. If + `pgcrypto` is already installed in a schema other than `public`, replace + `public` in `public.hmac` with that schema. Then create a trigger for every column that you want to encrypt: @@ -647,136 +605,27 @@ plugins: FOR EACH ROW EXECUTE FUNCTION enforce_encrypted_column('dob'); ``` - The HMAC key is cached for the length of the transaction rather than the - session, so that a key rotation takes effect immediately. Widen it to the - session with `set_config(..., false)` if the per-transaction metadata lookup - costs more than the rotation delay is worth. - ### MySQL - MySQL has no built-in HMAC function, so the equivalent builds HMAC-SHA256 out - of `SHA2()`. Create the two functions and the two validation procedures once per - schema, then add a `BEFORE INSERT` and a `BEFORE UPDATE` trigger per encrypted - column. Replace `SCHEMA_NAME` with the value of `encryption_metadata_schema` - (`encrypt` by default). Requires MySQL 5.7+ / MariaDB 10.2+ for `SHA2()`. On - Aurora/RDS MySQL, creating the functions may require the cluster parameter - `log_bin_trust_function_creators` to be set to `1`. + MySQL has no built-in HMAC function, so + [`trigger_mysql.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_mysql.sql) builds HMAC-SHA256 out of + `SHA2()`. Run it once per schema to create the two functions and the two + validation procedures, then add a `BEFORE INSERT` and a `BEFORE UPDATE` + trigger per encrypted column. Replace `SCHEMA_NAME` in the file with the value + of `encryption_metadata_schema` (`encrypt` by default). Requires MySQL 5.7+ / + MariaDB 10.2+ for `SHA2()`. On Aurora/RDS MySQL, creating the functions may + require the cluster parameter `log_bin_trust_function_creators` to be set to + `1`. :::note - The SQL below uses `DELIMITER`, which is a command of the `mysql` command-line - client rather than SQL. To run it through a driver, a Rails migration, or any - other tool that sends one statement at a time, leave out the `DELIMITER` - lines and send each `DROP`, `CREATE FUNCTION`, `CREATE PROCEDURE` and - `CREATE TRIGGER` statement on its own, without its trailing `$$`. + The file and the trigger SQL below use `DELIMITER`, which is a command of the + `mysql` command-line client rather than SQL. To run them through a driver, a + Rails migration, or any other tool that sends one statement at a time, leave + out the `DELIMITER` lines and send each `DROP`, `CREATE FUNCTION`, + `CREATE PROCEDURE` and `CREATE TRIGGER` statement on its own, without its + trailing `$$`. ::: - ```sql - DELIMITER $$ - - -- HMAC-SHA256 built from SHA2(), which MySQL has no native HMAC for. - DROP FUNCTION IF EXISTS hmac_sha256$$ - CREATE FUNCTION hmac_sha256( - message VARBINARY(65535), - key_data VARBINARY(64) - ) - RETURNS VARBINARY(32) - DETERMINISTIC - NO SQL - BEGIN - DECLARE block_size INT DEFAULT 64; -- SHA-256 block size - DECLARE key_padded VARBINARY(64); - DECLARE ipad VARBINARY(64); - DECLARE opad VARBINARY(64); - DECLARE i INT DEFAULT 1; - DECLARE key_byte INT; - - -- Reduce an over-long key to its hash, then zero-pad the key to the block size. - IF LENGTH(key_data) > block_size THEN - SET key_padded = CONCAT(UNHEX(SHA2(key_data, 256)), REPEAT(X'00', block_size - 32)); - ELSE - SET key_padded = CONCAT(key_data, REPEAT(X'00', block_size - LENGTH(key_data))); - END IF; - - -- ipad = key XOR 0x36 per byte, opad = key XOR 0x5C per byte, one raw byte at a time. - SET ipad = X''; - SET opad = X''; - WHILE i <= block_size DO - SET key_byte = ASCII(SUBSTRING(key_padded, i, 1)); - SET ipad = CONCAT(ipad, UNHEX(LPAD(HEX(key_byte ^ 0x36), 2, '0'))); - SET opad = CONCAT(opad, UNHEX(LPAD(HEX(key_byte ^ 0x5C), 2, '0'))); - SET i = i + 1; - END WHILE; - - RETURN UNHEX(SHA2(CONCAT(opad, UNHEX(SHA2(CONCAT(ipad, message), 256))), 256)); - END$$ - - -- Verifies that a stored value carries a valid HMAC for the given HMAC key. - DROP FUNCTION IF EXISTS verify_encrypted_data_hmac$$ - CREATE FUNCTION verify_encrypted_data_hmac( - data VARBINARY(65535), - hmac_key VARBINARY(32) - ) - RETURNS BOOLEAN - DETERMINISTIC - NO SQL - BEGIN - -- Minimum payload: 32 (HMAC) + 4 (key id) + 1 (type) + 12 (IV) + 0 (ciphertext) + 16 (GCM tag) = 65. - IF data IS NULL OR LENGTH(data) < 65 THEN - RETURN FALSE; - END IF; - - RETURN SUBSTRING(data, 1, 32) = hmac_sha256(SUBSTRING(data, 33), hmac_key); - END$$ - - -- Called from a BEFORE INSERT trigger (and by the BEFORE UPDATE procedure) to reject a value that is - -- not a valid kms_encryption payload. Replace SCHEMA_NAME with encryption_metadata_schema. - DROP PROCEDURE IF EXISTS validate_encrypted_data_hmac_before_insert$$ - CREATE PROCEDURE validate_encrypted_data_hmac_before_insert( - IN p_table_name VARCHAR(64), - IN p_column_name VARCHAR(64), - IN column_value VARBINARY(65535) - ) - BEGIN - DECLARE v_hmac_key VARBINARY(32); - - IF column_value IS NOT NULL THEN - SELECT ks.hmac_key INTO v_hmac_key - FROM SCHEMA_NAME.encryption_metadata em - JOIN SCHEMA_NAME.key_storage ks ON em.key_id = ks.id - WHERE em.table_name = p_table_name - AND em.column_name = p_column_name - LIMIT 1; - - IF v_hmac_key IS NULL THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'No HMAC key is configured for the encrypted column'; - END IF; - - IF NOT verify_encrypted_data_hmac(column_value, v_hmac_key) THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'Column does not carry a valid HMAC tag (plaintext or tampered value)'; - END IF; - END IF; - END$$ - - -- Called from a BEFORE UPDATE trigger. An UPDATE that leaves the value as it was is not - -- re-checked; see "Updates after a key rotation". - DROP PROCEDURE IF EXISTS validate_encrypted_data_hmac_before_update$$ - CREATE PROCEDURE validate_encrypted_data_hmac_before_update( - IN p_table_name VARCHAR(64), - IN p_column_name VARCHAR(64), - IN new_value VARBINARY(65535), - IN old_value VARBINARY(65535) - ) - BEGIN - IF NOT (new_value <=> old_value) THEN - CALL validate_encrypted_data_hmac_before_insert(p_table_name, p_column_name, new_value); - END IF; - END$$ - - DELIMITER ; - ``` - Then create a pair of triggers for every column that you want to encrypt. For example, on `users.ssn`: @@ -828,6 +677,39 @@ plugins: `INSERT`, or an `UPDATE` that changes the encrypted column - is still checked, and must carry the current key's tag. The plugin always writes new values with the current key, so its writes pass. + + ### Updating the trigger SQL + + The trigger SQL changes from time to time, independently of the wrapper + version. A database keeps the version it was set up with until the file is + run again, so re-run the file for your engine when a newer version is listed + below. Re-running it replaces the functions and procedures without changing + any data, and the per-column triggers keep working without being re-created. + On MySQL the file drops and re-creates each routine, so a write to an + encrypted column can fail in the moment between the two: re-run it while + writes are quiet. + + Each file records its version in a database comment. To check the version a + database has: + + ```sql + -- PostgreSQL + SELECT obj_description('enforce_encrypted_column'::regproc, 'pg_proc'); + ``` + + ```sql + -- MySQL, in the schema the procedures were created in + SELECT ROUTINE_COMMENT FROM information_schema.ROUTINES + WHERE ROUTINE_SCHEMA = DATABASE() + AND ROUTINE_NAME = 'validate_encrypted_data_hmac_before_insert'; + ``` + + An empty result means the SQL was installed before versions were recorded. + + | Engine | Version | Change | If your database has an earlier version | + |---|---|---|---| + | PostgreSQL | v2 | Reads the column's HMAC key from `key_storage` for every row. | Re-run `trigger_pg.sql`. An empty result is an earlier version. | + | MySQL | v1 | Records the version. The SQL is otherwise unchanged. | No action needed. An empty result is equivalent to v1. | hardening: | ## Hardening the deployment diff --git a/site/docs-ruby/using-plugins/kms-encryption.md b/site/docs-ruby/using-plugins/kms-encryption.md index cd9bd07..bfd83ad 100644 --- a/site/docs-ruby/using-plugins/kms-encryption.md +++ b/site/docs-ruby/using-plugins/kms-encryption.md @@ -530,67 +530,24 @@ that signs each value is stored unencrypted in `key_storage`: the server can verify that a value carries a valid integrity tag without holding the data key. +The trigger SQL is maintained in the wrapper repository: + +- PostgreSQL: [`trigger_pg.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_pg.sql) +- MySQL: [`trigger_mysql.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_mysql.sql) + +Run the file for your engine once per database, then add a trigger for every +encrypted column as shown below. The SQL is updated from time to time; see +[Updating the trigger SQL](#updating-the-trigger-sql). + ### PostgreSQL -```sql --- pgcrypto provides hmac(). If it is already installed in a schema other than public, --- replace public in public.hmac below with that schema. -CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public; - --- Replace 'encrypt' below if encryption_metadata_schema is set to something else. --- A trigger runs with the search_path of the session that fires it. Pinning it to pg_catalog --- stops a session from putting its own functions or operators, such as hmac() or <>, ahead of --- the built-in ones to get a plaintext value past this check. -CREATE OR REPLACE FUNCTION enforce_encrypted_column() RETURNS trigger -SET search_path = pg_catalog, pg_temp -AS $$ -DECLARE - col_name text := TG_ARGV[0]; - col_value bytea; - hmac_key bytea; - cache_key text := 'hmac_key.' || TG_TABLE_NAME || '.' || col_name; - unchanged boolean; -BEGIN - -- An UPDATE that leaves the encrypted value as it was is not re-checked; see - -- "Updates after a key rotation". - IF TG_OP = 'UPDATE' THEN - EXECUTE format('SELECT ($1).%I IS NOT DISTINCT FROM ($2).%I', col_name, col_name) - INTO unchanged USING NEW, OLD; - IF unchanged THEN - RETURN NEW; - END IF; - END IF; - - EXECUTE format('SELECT ($1).%I', col_name) INTO col_value USING NEW; - IF col_value IS NULL THEN - RETURN NEW; - END IF; - - -- A setting cached by an earlier transaction reads back as '' rather than being - -- undefined, so an empty value is treated as not cached. - hmac_key := decode(NULLIF(current_setting(cache_key, true), ''), 'hex'); - IF hmac_key IS NULL THEN - SELECT ks.hmac_key INTO hmac_key - FROM encrypt.encryption_metadata em - JOIN encrypt.key_storage ks ON em.key_id = ks.id - WHERE em.table_name = TG_TABLE_NAME AND em.column_name = col_name; - - IF hmac_key IS NULL THEN - RAISE EXCEPTION 'No HMAC key is configured for %.%', TG_TABLE_NAME, col_name; - END IF; - - PERFORM set_config(cache_key, encode(hmac_key, 'hex'), true); - END IF; - - IF length(col_value) < 65 - OR substring(col_value from 1 for 32) <> public.hmac(substring(col_value from 33), hmac_key, 'sha256'::text) THEN - RAISE EXCEPTION 'Column %.% does not carry a valid HMAC tag (plaintext or tampered value)', TG_TABLE_NAME, col_name; - END IF; - - RETURN NEW; -END; -$$ LANGUAGE plpgsql; -``` +Run [`trigger_pg.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_pg.sql). It installs the `pgcrypto` +extension if it is not already installed, and creates the +`enforce_encrypted_column()` trigger function. The function reads the +metadata tables as `encrypt.encryption_metadata` and `encrypt.key_storage`: +replace `encrypt` if `encryption_metadata_schema` is set to something else. If +`pgcrypto` is already installed in a schema other than `public`, replace +`public` in `public.hmac` with that schema. Then create a trigger for every column that you want to encrypt: @@ -606,136 +563,27 @@ BEFORE INSERT OR UPDATE ON users FOR EACH ROW EXECUTE FUNCTION enforce_encrypted_column('dob'); ``` -The HMAC key is cached for the length of the transaction rather than the -session, so that a key rotation takes effect immediately. Widen it to the -session with `set_config(..., false)` if the per-transaction metadata lookup -costs more than the rotation delay is worth. - ### MySQL -MySQL has no built-in HMAC function, so the equivalent builds HMAC-SHA256 out -of `SHA2()`. Create the two functions and the two validation procedures once per -schema, then add a `BEFORE INSERT` and a `BEFORE UPDATE` trigger per encrypted -column. Replace `SCHEMA_NAME` with the value of `encryption_metadata_schema` -(`encrypt` by default). Requires MySQL 5.7+ / MariaDB 10.2+ for `SHA2()`. On -Aurora/RDS MySQL, creating the functions may require the cluster parameter -`log_bin_trust_function_creators` to be set to `1`. +MySQL has no built-in HMAC function, so +[`trigger_mysql.sql`](https://github.com/aws/aws-advanced-ruby-driver-wrapper/blob/main/lib/aws_advanced_ruby_driver_wrapper/plugins/kms_encryption/sql/trigger_mysql.sql) builds HMAC-SHA256 out of +`SHA2()`. Run it once per schema to create the two functions and the two +validation procedures, then add a `BEFORE INSERT` and a `BEFORE UPDATE` +trigger per encrypted column. Replace `SCHEMA_NAME` in the file with the value +of `encryption_metadata_schema` (`encrypt` by default). Requires MySQL 5.7+ / +MariaDB 10.2+ for `SHA2()`. On Aurora/RDS MySQL, creating the functions may +require the cluster parameter `log_bin_trust_function_creators` to be set to +`1`. :::note -The SQL below uses `DELIMITER`, which is a command of the `mysql` command-line -client rather than SQL. To run it through a driver, a Rails migration, or any -other tool that sends one statement at a time, leave out the `DELIMITER` -lines and send each `DROP`, `CREATE FUNCTION`, `CREATE PROCEDURE` and -`CREATE TRIGGER` statement on its own, without its trailing `$$`. +The file and the trigger SQL below use `DELIMITER`, which is a command of the +`mysql` command-line client rather than SQL. To run them through a driver, a +Rails migration, or any other tool that sends one statement at a time, leave +out the `DELIMITER` lines and send each `DROP`, `CREATE FUNCTION`, +`CREATE PROCEDURE` and `CREATE TRIGGER` statement on its own, without its +trailing `$$`. ::: -```sql -DELIMITER $$ - --- HMAC-SHA256 built from SHA2(), which MySQL has no native HMAC for. -DROP FUNCTION IF EXISTS hmac_sha256$$ -CREATE FUNCTION hmac_sha256( - message VARBINARY(65535), - key_data VARBINARY(64) -) -RETURNS VARBINARY(32) -DETERMINISTIC -NO SQL -BEGIN - DECLARE block_size INT DEFAULT 64; -- SHA-256 block size - DECLARE key_padded VARBINARY(64); - DECLARE ipad VARBINARY(64); - DECLARE opad VARBINARY(64); - DECLARE i INT DEFAULT 1; - DECLARE key_byte INT; - - -- Reduce an over-long key to its hash, then zero-pad the key to the block size. - IF LENGTH(key_data) > block_size THEN - SET key_padded = CONCAT(UNHEX(SHA2(key_data, 256)), REPEAT(X'00', block_size - 32)); - ELSE - SET key_padded = CONCAT(key_data, REPEAT(X'00', block_size - LENGTH(key_data))); - END IF; - - -- ipad = key XOR 0x36 per byte, opad = key XOR 0x5C per byte, one raw byte at a time. - SET ipad = X''; - SET opad = X''; - WHILE i <= block_size DO - SET key_byte = ASCII(SUBSTRING(key_padded, i, 1)); - SET ipad = CONCAT(ipad, UNHEX(LPAD(HEX(key_byte ^ 0x36), 2, '0'))); - SET opad = CONCAT(opad, UNHEX(LPAD(HEX(key_byte ^ 0x5C), 2, '0'))); - SET i = i + 1; - END WHILE; - - RETURN UNHEX(SHA2(CONCAT(opad, UNHEX(SHA2(CONCAT(ipad, message), 256))), 256)); -END$$ - --- Verifies that a stored value carries a valid HMAC for the given HMAC key. -DROP FUNCTION IF EXISTS verify_encrypted_data_hmac$$ -CREATE FUNCTION verify_encrypted_data_hmac( - data VARBINARY(65535), - hmac_key VARBINARY(32) -) -RETURNS BOOLEAN -DETERMINISTIC -NO SQL -BEGIN - -- Minimum payload: 32 (HMAC) + 4 (key id) + 1 (type) + 12 (IV) + 0 (ciphertext) + 16 (GCM tag) = 65. - IF data IS NULL OR LENGTH(data) < 65 THEN - RETURN FALSE; - END IF; - - RETURN SUBSTRING(data, 1, 32) = hmac_sha256(SUBSTRING(data, 33), hmac_key); -END$$ - --- Called from a BEFORE INSERT trigger (and by the BEFORE UPDATE procedure) to reject a value that is --- not a valid kms_encryption payload. Replace SCHEMA_NAME with encryption_metadata_schema. -DROP PROCEDURE IF EXISTS validate_encrypted_data_hmac_before_insert$$ -CREATE PROCEDURE validate_encrypted_data_hmac_before_insert( - IN p_table_name VARCHAR(64), - IN p_column_name VARCHAR(64), - IN column_value VARBINARY(65535) -) -BEGIN - DECLARE v_hmac_key VARBINARY(32); - - IF column_value IS NOT NULL THEN - SELECT ks.hmac_key INTO v_hmac_key - FROM SCHEMA_NAME.encryption_metadata em - JOIN SCHEMA_NAME.key_storage ks ON em.key_id = ks.id - WHERE em.table_name = p_table_name - AND em.column_name = p_column_name - LIMIT 1; - - IF v_hmac_key IS NULL THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'No HMAC key is configured for the encrypted column'; - END IF; - - IF NOT verify_encrypted_data_hmac(column_value, v_hmac_key) THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'Column does not carry a valid HMAC tag (plaintext or tampered value)'; - END IF; - END IF; -END$$ - --- Called from a BEFORE UPDATE trigger. An UPDATE that leaves the value as it was is not --- re-checked; see "Updates after a key rotation". -DROP PROCEDURE IF EXISTS validate_encrypted_data_hmac_before_update$$ -CREATE PROCEDURE validate_encrypted_data_hmac_before_update( - IN p_table_name VARCHAR(64), - IN p_column_name VARCHAR(64), - IN new_value VARBINARY(65535), - IN old_value VARBINARY(65535) -) -BEGIN - IF NOT (new_value <=> old_value) THEN - CALL validate_encrypted_data_hmac_before_insert(p_table_name, p_column_name, new_value); - END IF; -END$$ - -DELIMITER ; -``` - Then create a pair of triggers for every column that you want to encrypt. For example, on `users.ssn`: @@ -788,6 +636,39 @@ encrypted values were re-encrypted. A value that is new to the row - an checked, and must carry the current key's tag. The plugin always writes new values with the current key, so its writes pass. +### Updating the trigger SQL + +The trigger SQL changes from time to time, independently of the wrapper +version. A database keeps the version it was set up with until the file is +run again, so re-run the file for your engine when a newer version is listed +below. Re-running it replaces the functions and procedures without changing +any data, and the per-column triggers keep working without being re-created. +On MySQL the file drops and re-creates each routine, so a write to an +encrypted column can fail in the moment between the two: re-run it while +writes are quiet. + +Each file records its version in a database comment. To check the version a +database has: + +```sql +-- PostgreSQL +SELECT obj_description('enforce_encrypted_column'::regproc, 'pg_proc'); +``` + +```sql +-- MySQL, in the schema the procedures were created in +SELECT ROUTINE_COMMENT FROM information_schema.ROUTINES + WHERE ROUTINE_SCHEMA = DATABASE() + AND ROUTINE_NAME = 'validate_encrypted_data_hmac_before_insert'; +``` + +An empty result means the SQL was installed before versions were recorded. + +| Engine | Version | Change | If your database has an earlier version | +|---|---|---|---| +| PostgreSQL | v2 | Reads the column's HMAC key from `key_storage` for every row. | Re-run `trigger_pg.sql`. An empty result is an earlier version. | +| MySQL | v1 | Records the version. The SQL is otherwise unchanged. | No action needed. An empty result is equivalent to v1. | + ## Hardening the deployment From 81c2a32dd2ffa52145a6e9ca44befc881cb5bf48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 08:37:44 -0700 Subject: [PATCH 08/21] build(deps): bump follow-redirects from 1.16.0 to 1.16.1 in /site (#47) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.1. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.1) --- updated-dependencies: - dependency-name: follow-redirects dependency-version: 1.16.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index dfbe3aa..8c82384 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -9801,9 +9801,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", + "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", "funding": [ { "type": "individual", From 39ab1ecf836852a89c34236a513dcfe99720ff3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:48:04 -0700 Subject: [PATCH 09/21] build(deps): bump dompurify from 3.4.16 to 3.4.17 in /site (#49) Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.16 to 3.4.17. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/3.4.16...3.4.17) --- updated-dependencies: - dependency-name: dompurify dependency-version: 3.4.17 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 8c82384..0a22a84 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -8921,9 +8921,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.16", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.16.tgz", - "integrity": "sha512-sqo+pNp3qRhCIpbgRi1y8Tgk27Bo2Ry7w0dC1NBeNTdZChWjz9Xb/KOoZbRP/R6pQZ80Qw8YhXw13hWWBbMRnQ==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.17.tgz", + "integrity": "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" From 092e7902cd47eff3dd5bd20ae05f1c2b4bc3ece3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:48:33 -0700 Subject: [PATCH 10/21] build(deps): bump launch-editor from 2.14.1 to 2.14.2 in /site (#48) Bumps [launch-editor](https://github.com/vitejs/launch-editor) from 2.14.1 to 2.14.2. - [Commits](https://github.com/vitejs/launch-editor/compare/v2.14.1...v2.14.2) --- updated-dependencies: - dependency-name: launch-editor dependency-version: 2.14.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 0a22a84..06c6c16 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -11398,13 +11398,13 @@ } }, "node_modules/launch-editor": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.14.1.tgz", - "integrity": "sha512-QWBrQsMpH7gPr965dsKD/3cKWiNoTjpATQf++Xq63N6sKRGMwlVXz41O1IZTMfZQgBctD/K5Zt06+/I6pP6+HA==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.14.2.tgz", + "integrity": "sha512-NHJEb30MGBCkmZXLZwz25t37QR4aY03ZzPYUJXOJaOa92uWwExI9SBQUuIznBYc1xkD7cJNGX7oc3Nl3sq2kQQ==", "license": "MIT", "dependencies": { "picocolors": "^1.1.1", - "shell-quote": "^1.8.4" + "shell-quote": "^1.10.0" } }, "node_modules/layout-base": { From 0576b47b5a1eb6afae08f7f990bc8226612096dd Mon Sep 17 00:00:00 2001 From: Karen <64801825+karenc-bq@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:50:30 -0700 Subject: [PATCH 11/21] docs - main (ruby): declare the gems Ruby 3.4 dropped, and make the first example runnable (#46) --- README.md | 2 +- content/failover.yaml | 155 ++++++++++++++++++++++++++++--------- site/docs-ruby/overview.md | 94 +++++++++++++++++----- 3 files changed, 196 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 3a80450..1c9226b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Each wrapper's documentation is grouped into the same sections: | Section | What's in it | |--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Overview** | What the wrapper is and how to install it. | +| **Overview** | What the wrapper is, how to install it, and one complete program that connects and runs a query. The page to read first. | | **Set up by Scenario** | An interactive builder — answer a few questions about your application and get a working configuration. | | **Using Plugins** | One page per feature plugin (Failover, IAM Authentication, AWS Secrets Manager, Blue/Green, KMS Encryption, and so on), describing what the plugin does and every parameter it accepts. | | **Shared Configuration** | Cross-cutting settings — TLS/SSL, AWS credentials resolution, host selection strategies — that more than one plugin relies on. | diff --git a/content/failover.yaml b/content/failover.yaml index cf647ae..b631e13 100644 --- a/content/failover.yaml +++ b/content/failover.yaml @@ -70,11 +70,22 @@ wrappers: # optional heading and an ordered list of blocks; a block is either prose # (`text`) or a fenced code sample (`code` + `lang`). # - # Active Record comes first because the adapters are the wrapper's primary - # integration: changing the adapter name is the whole change. The gem name - # matches its entry point file, so Bundler's default require loads it. + # Active Record leads because most Ruby users arrive through it: the adapters + # are the wrapper's primary integration and changing the adapter name is the + # whole change. The driver-direct path follows under an unnumbered "Or ..." + # heading, which is where an alternative goes in this style. + # + # The driver-direct block is a whole working program, not a fragment. A + # reader who copies it has a process that connects, queries and exits, with + # no gaps to fill from elsewhere on the site: the exact gem name, the exact + # require path, the constructor, the query call, and the teardown are all + # present. Fragments cost a reader (and an agent reading on their behalf) an + # edit-and-rerun loop per gap, which is the most expensive thing a + # getting-started page can do. The Active Record path cannot be shown that + # way because it needs a Rails application around it, so the two paths are + # ordered by who the reader is, not by what fits in one file. gettingStarted: - note: "Requires Ruby 3.3 or later. Tested with Active Record 7.2, 8.0, and 8.1, `pg` 1.6.3 or later, and `mysql2` 0.5.7 or later." + note: "Requires Ruby 3.3 or later. The gem is `aws_advanced_ruby_driver_wrapper` on RubyGems. Tested with Active Record 7.2, 8.0, and 8.1, `pg` 1.6.3 or later, and `mysql2` 0.5.7 or later." steps: - title: "1. Add the gem" blocks: @@ -87,17 +98,67 @@ wrappers: code: | bundle install - text: >- - Bundler requires the gem for you (in a plain Ruby script, add - `require 'aws_advanced_ruby_driver_wrapper'`). That single require - registers the Active Record adapters and makes the connection classes, - error classes, and other public API available for direct use. + Without Bundler, `gem install aws_advanced_ruby_driver_wrapper pg` + does the same thing. + # The house pattern for "this needs another gem" is a warning with + # its own snippet, as on the IAM and Secrets Manager pages, rather + # than commented lines inside the main Gemfile. + - text: | + :::warning + Which extra gems your Gemfile needs depends on your Ruby version, your platform, and whether you are using Active Record: + + | Version | Using Active Record | Extra gems | Reason | + | --- | --- | --- | --- | + | Ruby 3.3 | Either | None | `base64`, `bigdecimal` and `logger` are all still default gems | + | Ruby 3.4 | No | `base64`, `bigdecimal` | Ruby 3.4 removed both from the default gems | + | Ruby 3.4 | Yes | None | Active Record declares both itself | + | Ruby 4.0 or later | No | `base64`, `bigdecimal`, `logger` | Ruby 4.0 removed `logger` as well | + | Ruby 4.0 or later | Yes | None | Active Record declares all three itself | + | Ruby 4.0 or later, on Windows with `mysql2` | Either | `fiddle` | `mysql2` loads `libmysql.dll` through `fiddle` without declaring it, and neither does Active Record | + + A bundle missing any of them raises `LoadError` on the first require. + ::: - title: "2. Point Active Record at your cluster" blocks: - text: >- The wrapper registers two adapters, `aws_postgresql` and `aws_mysql2`, - which are drop-in replacements for `postgresql` and `mysql2`. Change the - adapter name and point the host at your cluster endpoint: + which are drop-in replacements for `postgresql` and `mysql2`. + # Without this, Active Record raises AdapterNotFound and names only + # its own built-in adapters, which does not hint that a require is + # missing. Bundler covers the Rails case; a plain script does not. + - text: >- + Bundler requires the gem for you. In a plain Ruby script, add + `require 'aws_advanced_ruby_driver_wrapper'` first: that single require + is what registers both adapters, and without it Active Record reports + `aws_postgresql` as a nonexistent adapter. + - text: >- + If you are starting without a Rails application, this is a complete + program. Save it as `main.rb` and run it: + - lang: ruby + code: | + # main.rb + require 'active_record' + require 'aws_advanced_ruby_driver_wrapper' + + ActiveRecord::Base.establish_connection( + adapter: 'aws_postgresql', + host: 'my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com', + database: 'mydb', + username: '', + password: '', + wrapper_plugins: 'failover' + ) + + puts ActiveRecord::Base.connection.select_value('SELECT version()') + - lang: bash + code: | + bundle exec ruby main.rb + - text: >- + In a Rails application the same keys go in `config/database.yml` + instead, and Bundler has already done the require. The adapter name + is the only key that changes; leave the host as whichever endpoint + you already connect to: - lang: yaml code: | # config/database.yml @@ -108,13 +169,10 @@ wrappers: username: password: - text: >- - That is the whole change — no application code moves. When - `wrapper_plugins` is not set, the wrapper loads `failover` and - `initial_connection`, so connections made through this adapter already - recover when the cluster promotes a new writer. Enable more by adding - wrapper properties alongside the Active Record keys. Setting - `wrapper_plugins` replaces the default list rather than adding to it, so - list the defaults you want to keep: + That is the whole change — no application code moves, and + connections made through this adapter already recover when the + cluster promotes a new writer. Wrapper properties go alongside the + Active Record keys, under the same connection: - lang: yaml code: | production: @@ -123,6 +181,10 @@ wrappers: wrapper_plugins: failover,initial_connection,iam iam_region: us-east-1 failover_timeout_sec: 300.0 # seconds + - text: >- + `wrapper_plugins` is optional — leaving it out loads + `failover,initial_connection`. Setting it replaces the default list + rather than adding to it, so list the defaults you want to keep. - text: >- Active Record keeps its own connection pool and its reading and writing roles; the wrapper's plugins run underneath both. @@ -134,16 +196,27 @@ wrappers: (`aws_postgresql`/`aws_mysql2`), a custom type registered for one is shared with the other, because both resolve under the same underlying adapter key. ::: + - text: | + :::note Keeping the password out of your source + Read it from the environment with `ENV.fetch('PGPASSWORD')`, or have + AWS manage it: add `secrets_manager` to `wrapper_plugins` and drop the + `password:` key, as described on + [AWS Secrets Manager Plugin](using-plugins/aws-secrets-manager). For a + database user with no password at all, consider using `iam` instead; see + [IAM Authentication Plugin](using-plugins/iam-authentication). + ::: - title: "Or connect with the driver directly" blocks: - text: >- - If you use the `pg` or `mysql2` gem without Active Record, the wrapper - provides connection classes that stand in for `PG::Connection` and - `Mysql2::Client`: + Without Active Record, the wrapper provides connection classes that + stand in for `PG::Connection` and `Mysql2::Client`. This is a complete + program; save it as `main.rb` and run it: - lang: ruby code: | - # PostgreSQL (pg) + # main.rb + require 'aws_advanced_ruby_driver_wrapper/postgresql' + conn = AwsAdvancedRubyDriverWrapper::WrapperPgConnection.new( host: 'my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com', dbname: 'mydb', @@ -152,27 +225,37 @@ wrappers: wrapper_plugins: 'failover', failover_timeout_sec: 300.0 ) - - lang: ruby + + begin + result = conn.exec('SELECT version()') + puts result.first['version'] + ensure + conn.close + end + - lang: bash code: | - # MySQL (mysql2) - conn = AwsAdvancedRubyDriverWrapper::WrapperMysql2Client.new( - host: 'my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com', - database: 'mydb', - username: '', - password: '', - wrapper_plugins: 'failover', - failover_timeout_sec: 300.0 - ) + bundle exec ruby main.rb - text: >- - The calls your code already makes on the driver connection keep working, - and the plugins act on each one. - + For PostgreSQL, `require 'aws_advanced_ruby_driver_wrapper/postgresql'` + and use `AwsAdvancedRubyDriverWrapper::WrapperPgConnection`, which + stands in for `PG::Connection` and takes `dbname:` and `user:`. + For MySQL, `require 'aws_advanced_ruby_driver_wrapper/mysql'` and use + `AwsAdvancedRubyDriverWrapper::WrapperMysql2Client`, which stands in + for `Mysql2::Client` and takes `database:` and `username:`. Either + way the calls your code already makes keep working, and the plugins + act on each one. - title: "Next" blocks: + - text: >- + The wrapper supports other plugins and wrapper properties. For + further information see the plugin pages, starting with + [Enhanced Failover Plugin](enhanced-failover). Every wrapper property + the examples did not use is listed with its type, default and unit on + the plugin page that reads it. To check a combination before shipping, + see [Plugin Compatibility](compatibility). - text: >- Not sure which plugins you need? [Set up by Scenario](setup) builds a - configuration from a few questions about your application. To check a - combination before shipping, see [Plugin Compatibility](compatibility). + configuration from a few questions about your application. parameters: - concept: failoverMode diff --git a/site/docs-ruby/overview.md b/site/docs-ruby/overview.md index 13c7535..537786c 100644 --- a/site/docs-ruby/overview.md +++ b/site/docs-ruby/overview.md @@ -21,7 +21,7 @@ will follow your choice where an equivalent page exists. ## Getting started -Requires Ruby 3.3 or later. Tested with Active Record 7.2, 8.0, and 8.1, `pg` 1.6.3 or later, and `mysql2` 0.5.7 or later. +Requires Ruby 3.3 or later. The gem is `aws_advanced_ruby_driver_wrapper` on RubyGems. Tested with Active Record 7.2, 8.0, and 8.1, `pg` 1.6.3 or later, and `mysql2` 0.5.7 or later. ### 1. Add the gem @@ -35,11 +35,54 @@ gem 'pg' # or: gem 'mysql2' bundle install ``` -Bundler requires the gem for you (in a plain Ruby script, add `require 'aws_advanced_ruby_driver_wrapper'`). That single require registers the Active Record adapters and makes the connection classes, error classes, and other public API available for direct use. +Without Bundler, `gem install aws_advanced_ruby_driver_wrapper pg` does the same thing. + +:::warning +Which extra gems your Gemfile needs depends on your Ruby version, your platform, and whether you are using Active Record: + +| Version | Using Active Record | Extra gems | Reason | +| --- | --- | --- | --- | +| Ruby 3.3 | Either | None | `base64`, `bigdecimal` and `logger` are all still default gems | +| Ruby 3.4 | No | `base64`, `bigdecimal` | Ruby 3.4 removed both from the default gems | +| Ruby 3.4 | Yes | None | Active Record declares both itself | +| Ruby 4.0 or later | No | `base64`, `bigdecimal`, `logger` | Ruby 4.0 removed `logger` as well | +| Ruby 4.0 or later | Yes | None | Active Record declares all three itself | +| Ruby 4.0 or later, on Windows with `mysql2` | Either | `fiddle` | `mysql2` loads `libmysql.dll` through `fiddle` without declaring it, and neither does Active Record | + +A bundle missing any of them raises `LoadError` on the first require. +::: + ### 2. Point Active Record at your cluster -The wrapper registers two adapters, `aws_postgresql` and `aws_mysql2`, which are drop-in replacements for `postgresql` and `mysql2`. Change the adapter name and point the host at your cluster endpoint: +The wrapper registers two adapters, `aws_postgresql` and `aws_mysql2`, which are drop-in replacements for `postgresql` and `mysql2`. + +Bundler requires the gem for you. In a plain Ruby script, add `require 'aws_advanced_ruby_driver_wrapper'` first: that single require is what registers both adapters, and without it Active Record reports `aws_postgresql` as a nonexistent adapter. + +If you are starting without a Rails application, this is a complete program. Save it as `main.rb` and run it: + +```ruby +# main.rb +require 'active_record' +require 'aws_advanced_ruby_driver_wrapper' + +ActiveRecord::Base.establish_connection( + adapter: 'aws_postgresql', + host: 'my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com', + database: 'mydb', + username: '', + password: '', + wrapper_plugins: 'failover' +) + +puts ActiveRecord::Base.connection.select_value('SELECT version()') +``` + +```bash +bundle exec ruby main.rb +``` + +In a Rails application the same keys go in `config/database.yml` instead, and Bundler has already done the require. The adapter name is the only key that changes; leave the host as whichever endpoint you already connect to: ```yaml # config/database.yml @@ -51,7 +94,7 @@ production: password: ``` -That is the whole change — no application code moves. When `wrapper_plugins` is not set, the wrapper loads `failover` and `initial_connection`, so connections made through this adapter already recover when the cluster promotes a new writer. Enable more by adding wrapper properties alongside the Active Record keys. Setting `wrapper_plugins` replaces the default list rather than adding to it, so list the defaults you want to keep: +That is the whole change — no application code moves, and connections made through this adapter already recover when the cluster promotes a new writer. Wrapper properties go alongside the Active Record keys, under the same connection: ```yaml production: @@ -62,6 +105,8 @@ production: failover_timeout_sec: 300.0 # seconds ``` +`wrapper_plugins` is optional — leaving it out loads `failover,initial_connection`. Setting it replaces the default list rather than adding to it, so list the defaults you want to keep. + Active Record keeps its own connection pool and its reading and writing roles; the wrapper's plugins run underneath both. :::note Mixing wrapped and standard adapters in one application @@ -73,12 +118,24 @@ with the other, because both resolve under the same underlying adapter key. ::: +:::note Keeping the password out of your source +Read it from the environment with `ENV.fetch('PGPASSWORD')`, or have +AWS manage it: add `secrets_manager` to `wrapper_plugins` and drop the +`password:` key, as described on +[AWS Secrets Manager Plugin](using-plugins/aws-secrets-manager). For a +database user with no password at all, consider using `iam` instead; see +[IAM Authentication Plugin](using-plugins/iam-authentication). +::: + + ### Or connect with the driver directly -If you use the `pg` or `mysql2` gem without Active Record, the wrapper provides connection classes that stand in for `PG::Connection` and `Mysql2::Client`: +Without Active Record, the wrapper provides connection classes that stand in for `PG::Connection` and `Mysql2::Client`. This is a complete program; save it as `main.rb` and run it: ```ruby -# PostgreSQL (pg) +# main.rb +require 'aws_advanced_ruby_driver_wrapper/postgresql' + conn = AwsAdvancedRubyDriverWrapper::WrapperPgConnection.new( host: 'my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com', dbname: 'mydb', @@ -87,23 +144,24 @@ conn = AwsAdvancedRubyDriverWrapper::WrapperPgConnection.new( wrapper_plugins: 'failover', failover_timeout_sec: 300.0 ) + +begin + result = conn.exec('SELECT version()') + puts result.first['version'] +ensure + conn.close +end ``` -```ruby -# MySQL (mysql2) -conn = AwsAdvancedRubyDriverWrapper::WrapperMysql2Client.new( - host: 'my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com', - database: 'mydb', - username: '', - password: '', - wrapper_plugins: 'failover', - failover_timeout_sec: 300.0 -) +```bash +bundle exec ruby main.rb ``` -The calls your code already makes on the driver connection keep working, and the plugins act on each one. +For PostgreSQL, `require 'aws_advanced_ruby_driver_wrapper/postgresql'` and use `AwsAdvancedRubyDriverWrapper::WrapperPgConnection`, which stands in for `PG::Connection` and takes `dbname:` and `user:`. For MySQL, `require 'aws_advanced_ruby_driver_wrapper/mysql'` and use `AwsAdvancedRubyDriverWrapper::WrapperMysql2Client`, which stands in for `Mysql2::Client` and takes `database:` and `username:`. Either way the calls your code already makes keep working, and the plugins act on each one. ### Next -Not sure which plugins you need? [Set up by Scenario](setup) builds a configuration from a few questions about your application. To check a combination before shipping, see [Plugin Compatibility](compatibility). +The wrapper supports other plugins and wrapper properties. For further information see the plugin pages, starting with [Enhanced Failover Plugin](enhanced-failover). Every wrapper property the examples did not use is listed with its type, default and unit on the plugin page that reads it. To check a combination before shipping, see [Plugin Compatibility](compatibility). + +Not sure which plugins you need? [Set up by Scenario](setup) builds a configuration from a few questions about your application. From 5add550fcc4f617c1b98ed0d254391424ad04f8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:44:08 -0700 Subject: [PATCH 12/21] build(deps): bump fast-uri from 3.1.8 to 3.1.9 in /site (#52) Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.8 to 3.1.9. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](https://github.com/fastify/fast-uri/compare/v3.1.8...v3.1.9) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 06c6c16..497af65 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -9575,9 +9575,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", - "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", "funding": [ { "type": "github", From 145547e5fb5e832f020dcc31d9359a20a22b0e0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:44:27 -0700 Subject: [PATCH 13/21] build(deps): bump actions/setup-python from 7.0.0 to 7.1.0 (#50) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/5fda3b95a4ea91299a34e894583c3862153e4b97...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy-pages.yml | 2 +- .github/workflows/verify-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index df38568..5f77805 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.11' cache: pip diff --git a/.github/workflows/verify-docs.yml b/.github/workflows/verify-docs.yml index 6d3243d..50bc277 100644 --- a/.github/workflows/verify-docs.yml +++ b/.github/workflows/verify-docs.yml @@ -43,7 +43,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.11' cache: pip From dcbdbdd7705630334d223c90e9cc4406cfa1c857 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:44:54 -0700 Subject: [PATCH 14/21] build(deps): bump the site-minor-and-patch group across 1 directory with 2 updates (#42) Bumps the site-minor-and-patch group with 2 updates in the /site directory: [react](https://github.com/react/react/tree/HEAD/packages/react) and [react-dom](https://github.com/react/react/tree/HEAD/packages/react-dom). Updates `react` from 19.3.0 to 19.3.1 - [Release notes](https://github.com/react/react/releases) - [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/react/react/commits/v19.3.1/packages/react) Updates `react-dom` from 19.3.0 to 19.3.1 - [Release notes](https://github.com/react/react/releases) - [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/react/react/commits/v19.3.1/packages/react-dom) --- updated-dependencies: - dependency-name: react dependency-version: 19.3.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: site-minor-and-patch - dependency-name: react-dom dependency-version: 19.3.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: site-minor-and-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 18 +++++++++--------- site/package.json | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 497af65..9f0f4f2 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -15,8 +15,8 @@ "@mermaid-js/layout-elk": "0.1.9", "clsx": "2.1.1", "prism-react-renderer": "2.4.1", - "react": "19.3.0", - "react-dom": "19.3.0" + "react": "19.3.1", + "react-dom": "19.3.1" }, "engines": { "node": ">=18" @@ -16477,24 +16477,24 @@ } }, "node_modules/react": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz", - "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", - "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", "license": "MIT", "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { - "react": "^19.3.0" + "react": "^19.3.1" } }, "node_modules/react-fast-compare": { diff --git a/site/package.json b/site/package.json index 2e27d25..6fba621 100644 --- a/site/package.json +++ b/site/package.json @@ -17,8 +17,8 @@ "@mermaid-js/layout-elk": "0.1.9", "clsx": "2.1.1", "prism-react-renderer": "2.4.1", - "react": "19.3.0", - "react-dom": "19.3.0" + "react": "19.3.1", + "react-dom": "19.3.1" }, "overrides": { "webpack": "5.97.1" From e5656df1db70083f55df1f781b990d51a1a082d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:18:25 -0700 Subject: [PATCH 15/21] build(deps): bump joi from 17.13.8 to 17.13.9 in /site (#57) Bumps [joi](https://github.com/hapijs/joi) from 17.13.8 to 17.13.9. - [Commits](https://github.com/hapijs/joi/compare/v17.13.8...v17.13.9) --- updated-dependencies: - dependency-name: joi dependency-version: 17.13.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 9f0f4f2..622a4be 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -11231,9 +11231,9 @@ } }, "node_modules/joi": { - "version": "17.13.8", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.8.tgz", - "integrity": "sha512-iPKOGmiRw1jxf/JOPwxmCcUQAOdF359mdzYiP2DJ+TMX0YK2zjK3D+zYOaGjpumWxOFF/l2xVWjRVK5bGSLdEw==", + "version": "17.13.9", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.9.tgz", + "integrity": "sha512-llFCT2rVtfwgBCaIqxtjim+iHqrgss4ONiGSYiiGH9jnjWq90ppSRffqmqKvwpa8W+YfILyQV6XyGcegXX2T4g==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.3.0", From 37f5113df9e773ed2708db0ac42dd6fea0204ac0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:18:38 -0700 Subject: [PATCH 16/21] build(deps): bump postcss-selector-parser from 6.1.4 to 6.1.5 in /site (#56) Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 6.1.4 to 6.1.5. - [Release notes](https://github.com/postcss/postcss-selector-parser/releases) - [Changelog](https://github.com/postcss/postcss-selector-parser/blob/6.1.5/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-selector-parser/compare/6.1.4...6.1.5) --- updated-dependencies: - dependency-name: postcss-selector-parser dependency-version: 6.1.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 96 +++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 622a4be..a9cc184 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -2257,9 +2257,9 @@ } }, "node_modules/@csstools/postcss-cascade-layers/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -2678,9 +2678,9 @@ } }, "node_modules/@csstools/postcss-is-pseudo-class/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -3125,9 +3125,9 @@ } }, "node_modules/@csstools/postcss-scope-pseudo-class/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -7707,9 +7707,9 @@ } }, "node_modules/css-blank-pseudo/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -7781,9 +7781,9 @@ } }, "node_modules/css-has-pseudo/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -14780,9 +14780,9 @@ } }, "node_modules/postcss-attribute-case-insensitive/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15024,9 +15024,9 @@ } }, "node_modules/postcss-custom-selectors/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15062,9 +15062,9 @@ } }, "node_modules/postcss-dir-pseudo-class/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15190,9 +15190,9 @@ } }, "node_modules/postcss-focus-visible/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15228,9 +15228,9 @@ } }, "node_modules/postcss-focus-within/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15517,9 +15517,9 @@ } }, "node_modules/postcss-modules-local-by-default/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15545,9 +15545,9 @@ } }, "node_modules/postcss-modules-scope/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -15644,9 +15644,9 @@ } }, "node_modules/postcss-nesting/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -16007,9 +16007,9 @@ } }, "node_modules/postcss-pseudo-class-any-link/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -16100,9 +16100,9 @@ } }, "node_modules/postcss-selector-not/node_modules/postcss-selector-parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", - "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -16113,9 +16113,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz", - "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.5.tgz", + "integrity": "sha512-TEHFzb5KRDKaOgJ4TYE+0jyJtFbjLvkdVOu0fZ2b6MTWzoqZd4Le+61aEppWkvTlYePgOX4ATL1wsAIPMLTw6Q==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", From b6d9ffee4ff240ad2a45c8d659fefbc4bf9b7a3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:18:53 -0700 Subject: [PATCH 17/21] build(deps): bump body-parser from 1.20.8 to 1.20.9 in /site (#55) Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.8 to 1.20.9. - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/1.20.9/HISTORY.md) - [Commits](https://github.com/expressjs/body-parser/compare/1.20.8...1.20.9) --- updated-dependencies: - dependency-name: body-parser dependency-version: 1.20.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index a9cc184..2163e2d 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -6661,9 +6661,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.8", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.8.tgz", - "integrity": "sha512-JNcyFQ64OiijEkPzUBTCe+hyPXUD/3LEldGQ6iF5LR1w00mx9o7xtDWHXBY2iItjdCFGoilOLNQbH943ut7pHA==", + "version": "1.20.9", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz", + "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==", "license": "MIT", "dependencies": { "bytes": "~3.1.2", From 2312505af33909c310089f30c18fa89295551142 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:19:10 -0700 Subject: [PATCH 18/21] build(deps): bump follow-redirects from 1.16.1 to 1.16.2 in /site (#53) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.1 to 1.16.2. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.1...v1.16.2) --- updated-dependencies: - dependency-name: follow-redirects dependency-version: 1.16.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 2163e2d..65f4ff9 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -9801,9 +9801,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", - "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz", + "integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==", "funding": [ { "type": "individual", From 0d8b363cdbdee038ab4f66e79ece767e60de8904 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:19:27 -0700 Subject: [PATCH 19/21] build(deps): bump qs from 6.16.0 to 6.16.2 in /site (#54) Bumps [qs](https://github.com/ljharb/qs) from 6.16.0 to 6.16.2. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.16.0...v6.16.2) --- updated-dependencies: - dependency-name: qs dependency-version: 6.16.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- site/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 65f4ff9..85d981f 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -16345,9 +16345,9 @@ } }, "node_modules/qs": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz", - "integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==", + "version": "6.16.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz", + "integrity": "sha512-VYdnB5S7/0IeXzBacUtwNAaM6d7Y/PgYnNC7bJCI6meqA/OgnsQbZMtVW8Dt2D1PHgbHGtYmhSoEIgvt7xZ2ZA==", "license": "BSD-3-Clause", "dependencies": { "es-define-property": "^1.0.1", From 9ee33a19ef200ddecf77960611d959627dd82067 Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Wed, 4 Nov 2026 15:56:41 -0700 Subject: [PATCH 20/21] docs(ruby): adapt main's changes to 1.1.0 - Replace the Ruby 3.4/4.0 default-gems warning from #46 with the fiddle-only warning from #51, since 1.1.0 declares bigdecimal and logger and no longer uses base64. - Apply the corrected iam_expiration_sec wording from #41 to the federated_auth and okta plugins, and note that the token cache is shared across iam, federated_auth, and okta. --- content/failover.yaml | 25 +++++++++---------- content/plugins.yaml | 11 ++++---- site/docs-ruby/overview.md | 21 +++++++--------- .../docs-ruby/using-plugins/federated-auth.md | 2 +- .../using-plugins/iam-authentication.md | 7 +++--- site/docs-ruby/using-plugins/okta-auth.md | 2 +- 6 files changed, 33 insertions(+), 35 deletions(-) diff --git a/content/failover.yaml b/content/failover.yaml index c7c5c35..d99074f 100644 --- a/content/failover.yaml +++ b/content/failover.yaml @@ -102,21 +102,20 @@ wrappers: does the same thing. # The house pattern for "this needs another gem" is a warning with # its own snippet, as on the IAM and Secrets Manager pages, rather - # than commented lines inside the main Gemfile. + # than commented lines inside the main Gemfile. The wrapper itself + # declares every gem it requires, so this warning is only for a gem + # `mysql2` requires on Windows without declaring it. - text: | :::warning - Which extra gems your Gemfile needs depends on your Ruby version, your platform, and whether you are using Active Record: - - | Version | Using Active Record | Extra gems | Reason | - | --- | --- | --- | --- | - | Ruby 3.3 | Either | None | `base64`, `bigdecimal` and `logger` are all still default gems | - | Ruby 3.4 | No | `base64`, `bigdecimal` | Ruby 3.4 removed both from the default gems | - | Ruby 3.4 | Yes | None | Active Record declares both itself | - | Ruby 4.0 or later | No | `base64`, `bigdecimal`, `logger` | Ruby 4.0 removed `logger` as well | - | Ruby 4.0 or later | Yes | None | Active Record declares all three itself | - | Ruby 4.0 or later, on Windows with `mysql2` | Either | `fiddle` | `mysql2` loads `libmysql.dll` through `fiddle` without declaring it, and neither does Active Record | - - A bundle missing any of them raises `LoadError` on the first require. + If you are using `mysql2` on Windows with Ruby 4.0 or later, also add `fiddle` to your Gemfile: + + ```ruby + gem 'fiddle' + ``` + + On Windows, `mysql2` uses `fiddle` to load `libmysql.dll` but does not + declare it as a dependency. Ruby 4.0 removed `fiddle` from the default + gems, so a bundle without it raises `LoadError` when `mysql2` is required. ::: - title: "2. Point Active Record at your cluster" diff --git a/content/plugins.yaml b/content/plugins.yaml index ce14ba0..d143df6 100644 --- a/content/plugins.yaml +++ b/content/plugins.yaml @@ -131,7 +131,7 @@ plugins: ruby: { name: iam_region, required: "No", defaultNote: "parsed from host", example: "us-east-1" } - concept: iamExpiration type: integer - description: "Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process, and its lifetime is set by the first connection that uses the IAM plugin; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected." + description: "Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and its lifetime is set by the first such connection; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected." spellings: ruby: { name: iam_expiration_sec, type: float, required: "No", default: "870.0", unit: s, example: "600.0 (maximum 870.0)" } - concept: iamTokenProperty @@ -277,8 +277,9 @@ plugins: fresh token and retries the connection once. :::note - The token cache is shared by every connection in the process, and the first - connection that uses the IAM plugin sets its `iam_expiration_sec`. Connections + The token cache is shared by every connection in the process that uses the + `iam`, `federated_auth`, or `okta` plugin, and the first such connection sets + its `iam_expiration_sec`. Connections opened later with a different value still use the first connection's value, so set `iam_expiration_sec` to the same value on every connection. ::: @@ -382,7 +383,7 @@ plugins: ruby: { name: iam_port, required: "No", defaultNote: "dialect default", example: "5432" } - concept: iamExpiration type: float - description: "Fallback cache lifetime, in seconds, for a generated IAM token. A cached token normally lives for the lifetime signed into the token itself (15 minutes) minus a 60-second safety margin; this value is used only when that lifetime cannot be read from the token. It is capped at a maximum of `870.0` — the default — so a cached token is never used after it expires. A value greater than `870.0` or less than or equal to `0` is rejected. The token cache is shared with the `iam` and `okta` plugins." + description: "Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and its lifetime is set by the first such connection; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected." spellings: ruby: { name: iam_expiration_sec, required: "No", default: "870.0", unit: s, example: "600.0 (maximum 870.0)" } - concept: sslInsecure @@ -568,7 +569,7 @@ plugins: ruby: { name: iam_port, required: "No", defaultNote: "dialect default", example: "5432" } - concept: iamExpiration type: float - description: "Fallback cache lifetime, in seconds, for a generated IAM token. A cached token normally lives for the lifetime signed into the token itself (15 minutes) minus a 60-second safety margin; this value is used only when that lifetime cannot be read from the token. It is capped at a maximum of `870.0` — the default — so a cached token is never used after it expires. A value greater than `870.0` or less than or equal to `0` is rejected. The token cache is shared with the `iam` and `federated_auth` plugins." + description: "Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and its lifetime is set by the first such connection; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected." spellings: ruby: { name: iam_expiration_sec, required: "No", default: "870.0", unit: s, example: "600.0 (maximum 870.0)" } - concept: sslInsecure diff --git a/site/docs-ruby/overview.md b/site/docs-ruby/overview.md index 537786c..a22f9ea 100644 --- a/site/docs-ruby/overview.md +++ b/site/docs-ruby/overview.md @@ -38,18 +38,15 @@ bundle install Without Bundler, `gem install aws_advanced_ruby_driver_wrapper pg` does the same thing. :::warning -Which extra gems your Gemfile needs depends on your Ruby version, your platform, and whether you are using Active Record: - -| Version | Using Active Record | Extra gems | Reason | -| --- | --- | --- | --- | -| Ruby 3.3 | Either | None | `base64`, `bigdecimal` and `logger` are all still default gems | -| Ruby 3.4 | No | `base64`, `bigdecimal` | Ruby 3.4 removed both from the default gems | -| Ruby 3.4 | Yes | None | Active Record declares both itself | -| Ruby 4.0 or later | No | `base64`, `bigdecimal`, `logger` | Ruby 4.0 removed `logger` as well | -| Ruby 4.0 or later | Yes | None | Active Record declares all three itself | -| Ruby 4.0 or later, on Windows with `mysql2` | Either | `fiddle` | `mysql2` loads `libmysql.dll` through `fiddle` without declaring it, and neither does Active Record | - -A bundle missing any of them raises `LoadError` on the first require. +If you are using `mysql2` on Windows with Ruby 4.0 or later, also add `fiddle` to your Gemfile: + +```ruby +gem 'fiddle' +``` + +On Windows, `mysql2` uses `fiddle` to load `libmysql.dll` but does not +declare it as a dependency. Ruby 4.0 removed `fiddle` from the default +gems, so a bundle without it raises `LoadError` when `mysql2` is required. ::: diff --git a/site/docs-ruby/using-plugins/federated-auth.md b/site/docs-ruby/using-plugins/federated-auth.md index 2c0c0b9..d88d84c 100644 --- a/site/docs-ruby/using-plugins/federated-auth.md +++ b/site/docs-ruby/using-plugins/federated-auth.md @@ -94,7 +94,7 @@ Verify plugin compatibility within your Ruby configuration using the [compatibil | `iam_region` | String | No | parsed from host | Overrides the AWS region used to generate the IAM token. By default it is parsed from the connection host.

Example: `us-east-1` | | `iam_host` | String | No | derived from host | Overrides the host used to generate the IAM token. By default it is derived from the connection host.

Example: `my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com` | | `iam_port` | Integer | No | dialect default | Overrides the port used to generate the IAM token. By default it is taken from the connection, or the dialect's default port.

Example: `5432` | -| `iam_expiration_sec` | Float | No | `870.0` | Fallback cache lifetime, in seconds, for a generated IAM token. A cached token normally lives for the lifetime signed into the token itself (15 minutes) minus a 60-second safety margin; this value is used only when that lifetime cannot be read from the token. It is capped at a maximum of `870.0` — the default — so a cached token is never used after it expires. A value greater than `870.0` or less than or equal to `0` is rejected. The token cache is shared with the `iam` and `okta` plugins. *(sec)*

Example: `600.0 (maximum 870.0)` | +| `iam_expiration_sec` | Float | No | `870.0` | Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and its lifetime is set by the first such connection; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected. *(sec)*

Example: `600.0 (maximum 870.0)` | | `ssl_insecure` | Boolean | No | `false` | When `true`, disables TLS certificate verification on the HTTPS requests the plugin makes to the identity provider. Intended for development only.

Example: `true` | | `http_client_socket_timeout_sec` | Float | No | `60.0` | Read (socket) timeout for the HTTPS requests the plugin makes to the identity provider. *(sec)*

Example: `60.0` | | `http_client_connect_timeout_sec` | Float | No | `60.0` | Connect timeout for the HTTPS requests the plugin makes to the identity provider. *(sec)*

Example: `60.0` | diff --git a/site/docs-ruby/using-plugins/iam-authentication.md b/site/docs-ruby/using-plugins/iam-authentication.md index d4b7f75..5873d63 100644 --- a/site/docs-ruby/using-plugins/iam-authentication.md +++ b/site/docs-ruby/using-plugins/iam-authentication.md @@ -140,7 +140,7 @@ Verify plugin compatibility within your Ruby configuration using the [compatibil | `iam_host` | String | No | derived from host | Overrides the hostname used to generate the IAM token. Required when connecting through a custom endpoint. The default is derived from the connection host.

Example: `my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com` | | `iam_port` | Integer | No | dialect default | Overrides the port used to generate the IAM token. The default is determined from the underlying driver protocol or the dialect default.

Example: `5432` | | `iam_region` | String | No | parsed from host | Overrides the AWS region used to generate the IAM token. The default is parsed from the connection string.

Example: `us-east-1` | -| `iam_expiration_sec` | Float | No | `870.0` | Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process, and its lifetime is set by the first connection that uses the IAM plugin; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected. *(sec)*

Example: `600.0 (maximum 870.0)` | +| `iam_expiration_sec` | Float | No | `870.0` | Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and its lifetime is set by the first such connection; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected. *(sec)*

Example: `600.0 (maximum 870.0)` | | `iam_access_token_property_name` | Symbol | No | `:password` | The connection property name the generated token is injected into. Some underlying drivers require a specific property name for the token.

Example: `:password` | | `aws_credentials_provider` | Object | No | SDK default chain | A custom AWS credentials provider instance. One property is read by every plugin that calls AWS — IAM authentication, Secrets Manager, KMS encryption and custom endpoint — so setting it once covers all of them. When unset, each falls back to the AWS SDK default credential provider chain.

Example: `Aws::AssumeRoleCredentials.new(...)` | @@ -191,8 +191,9 @@ login error occurs with a cached token, the plugin automatically fetches a fresh token and retries the connection once. :::note -The token cache is shared by every connection in the process, and the first -connection that uses the IAM plugin sets its `iam_expiration_sec`. Connections +The token cache is shared by every connection in the process that uses the +`iam`, `federated_auth`, or `okta` plugin, and the first such connection sets +its `iam_expiration_sec`. Connections opened later with a different value still use the first connection's value, so set `iam_expiration_sec` to the same value on every connection. ::: diff --git a/site/docs-ruby/using-plugins/okta-auth.md b/site/docs-ruby/using-plugins/okta-auth.md index 9792979..69f1a4f 100644 --- a/site/docs-ruby/using-plugins/okta-auth.md +++ b/site/docs-ruby/using-plugins/okta-auth.md @@ -94,7 +94,7 @@ Verify plugin compatibility within your Ruby configuration using the [compatibil | `iam_region` | String | No | parsed from host | Overrides the AWS region used to generate the IAM token. By default it is parsed from the connection host.

Example: `us-east-1` | | `iam_host` | String | No | derived from host | Overrides the host used to generate the IAM token. By default it is derived from the connection host.

Example: `my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com` | | `iam_port` | Integer | No | dialect default | Overrides the port used to generate the IAM token. By default it is taken from the connection, or the dialect's default port.

Example: `5432` | -| `iam_expiration_sec` | Float | No | `870.0` | Fallback cache lifetime, in seconds, for a generated IAM token. A cached token normally lives for the lifetime signed into the token itself (15 minutes) minus a 60-second safety margin; this value is used only when that lifetime cannot be read from the token. It is capped at a maximum of `870.0` — the default — so a cached token is never used after it expires. A value greater than `870.0` or less than or equal to `0` is rejected. The token cache is shared with the `iam` and `federated_auth` plugins. *(sec)*

Example: `600.0 (maximum 870.0)` | +| `iam_expiration_sec` | Float | No | `870.0` | Number of seconds a generated IAM token is kept in the cache before a new one is generated. The token itself is valid for 15 minutes, and a cached token is never used within 60 seconds of that expiry, so values of `840.0` and above will all have their tokens refetched at the `840` mark. The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and its lifetime is set by the first such connection; later connections that set a different value use the first connection's value. A value greater than `870.0` or less than or equal to `0` is rejected. *(sec)*

Example: `600.0 (maximum 870.0)` | | `ssl_insecure` | Boolean | No | `false` | When `true`, disables TLS certificate verification on the HTTPS requests the plugin makes to the identity provider. Intended for development only.

Example: `true` | | `http_client_socket_timeout_sec` | Float | No | `60.0` | Read (socket) timeout for the HTTPS requests the plugin makes to the identity provider. *(sec)*

Example: `60.0` | | `http_client_connect_timeout_sec` | Float | No | `60.0` | Connect timeout for the HTTPS requests the plugin makes to the identity provider. *(sec)*

Example: `60.0` | From 3cbce6f27c74c05c589e46cf17178164f4f27214 Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Wed, 4 Nov 2026 16:07:31 -0700 Subject: [PATCH 21/21] docs(ruby): address review comments - Tell plain-script readers to add activerecord to the Gemfile before running the Active Record example. - Narrow the fiddle warning to the cases where mysql2 loads fiddle. - Show the ERB form of ENV.fetch for config/database.yml. - Rewrap the IAM token cache note. --- content/failover.yaml | 20 ++++++++++++------- content/plugins.yaml | 6 +++--- site/docs-ruby/overview.md | 16 +++++++++------ .../using-plugins/iam-authentication.md | 6 +++--- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/content/failover.yaml b/content/failover.yaml index d99074f..cb4637d 100644 --- a/content/failover.yaml +++ b/content/failover.yaml @@ -107,15 +107,18 @@ wrappers: # `mysql2` requires on Windows without declaring it. - text: | :::warning - If you are using `mysql2` on Windows with Ruby 4.0 or later, also add `fiddle` to your Gemfile: + If you are using `mysql2` on Windows with Ruby 4.0 or later, you may also need to add `fiddle` to your Gemfile: ```ruby gem 'fiddle' ``` - On Windows, `mysql2` uses `fiddle` to load `libmysql.dll` but does not - declare it as a dependency. Ruby 4.0 removed `fiddle` from the default - gems, so a bundle without it raises `LoadError` when `mysql2` is required. + On Windows, `mysql2` uses `fiddle` to load `libmysql.dll` when you set + `RUBY_MYSQL2_LIBMYSQL_DLL`, when the gem ships its own `libmysql.dll`, or + when Ruby was not installed with RubyInstaller, but it does not declare + `fiddle` as a dependency. Ruby 4.0 removed `fiddle` from the default gems, + so in those cases a bundle without it raises `LoadError` when `mysql2` is + required. ::: - title: "2. Point Active Record at your cluster" @@ -132,8 +135,10 @@ wrappers: is what registers both adapters, and without it Active Record reports `aws_postgresql` as a nonexistent adapter. - text: >- - If you are starting without a Rails application, this is a complete - program. Save it as `main.rb` and run it: + If you are starting without a Rails application, add + `gem 'activerecord'` to the Gemfile from step 1 (outside Rails, nothing + else installs it), run `bundle install`, and this is a complete program. + Save it as `main.rb` and run it: - lang: ruby code: | # main.rb @@ -197,7 +202,8 @@ wrappers: ::: - text: | :::note Keeping the password out of your source - Read it from the environment with `ENV.fetch('PGPASSWORD')`, or have + Read it from the environment with `ENV.fetch('PGPASSWORD')` in Ruby, or + `<%= ENV.fetch('PGPASSWORD') %>` in `config/database.yml`, or have AWS manage it: add `secrets_manager` to `wrapper_plugins` and drop the `password:` key, as described on [AWS Secrets Manager Plugin](using-plugins/aws-secrets-manager). For a diff --git a/content/plugins.yaml b/content/plugins.yaml index d143df6..4525b29 100644 --- a/content/plugins.yaml +++ b/content/plugins.yaml @@ -279,9 +279,9 @@ plugins: :::note The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and the first such connection sets - its `iam_expiration_sec`. Connections - opened later with a different value still use the first connection's value, so - set `iam_expiration_sec` to the same value on every connection. + its `iam_expiration_sec`. Connections opened later with a different value still + use the first connection's value, so set `iam_expiration_sec` to the same value + on every connection. ::: ## Related diff --git a/site/docs-ruby/overview.md b/site/docs-ruby/overview.md index a22f9ea..54527ef 100644 --- a/site/docs-ruby/overview.md +++ b/site/docs-ruby/overview.md @@ -38,15 +38,18 @@ bundle install Without Bundler, `gem install aws_advanced_ruby_driver_wrapper pg` does the same thing. :::warning -If you are using `mysql2` on Windows with Ruby 4.0 or later, also add `fiddle` to your Gemfile: +If you are using `mysql2` on Windows with Ruby 4.0 or later, you may also need to add `fiddle` to your Gemfile: ```ruby gem 'fiddle' ``` -On Windows, `mysql2` uses `fiddle` to load `libmysql.dll` but does not -declare it as a dependency. Ruby 4.0 removed `fiddle` from the default -gems, so a bundle without it raises `LoadError` when `mysql2` is required. +On Windows, `mysql2` uses `fiddle` to load `libmysql.dll` when you set +`RUBY_MYSQL2_LIBMYSQL_DLL`, when the gem ships its own `libmysql.dll`, or +when Ruby was not installed with RubyInstaller, but it does not declare +`fiddle` as a dependency. Ruby 4.0 removed `fiddle` from the default gems, +so in those cases a bundle without it raises `LoadError` when `mysql2` is +required. ::: @@ -56,7 +59,7 @@ The wrapper registers two adapters, `aws_postgresql` and `aws_mysql2`, which are Bundler requires the gem for you. In a plain Ruby script, add `require 'aws_advanced_ruby_driver_wrapper'` first: that single require is what registers both adapters, and without it Active Record reports `aws_postgresql` as a nonexistent adapter. -If you are starting without a Rails application, this is a complete program. Save it as `main.rb` and run it: +If you are starting without a Rails application, add `gem 'activerecord'` to the Gemfile from step 1 (outside Rails, nothing else installs it), run `bundle install`, and this is a complete program. Save it as `main.rb` and run it: ```ruby # main.rb @@ -116,7 +119,8 @@ with the other, because both resolve under the same underlying adapter key. :::note Keeping the password out of your source -Read it from the environment with `ENV.fetch('PGPASSWORD')`, or have +Read it from the environment with `ENV.fetch('PGPASSWORD')` in Ruby, or +`<%= ENV.fetch('PGPASSWORD') %>` in `config/database.yml`, or have AWS manage it: add `secrets_manager` to `wrapper_plugins` and drop the `password:` key, as described on [AWS Secrets Manager Plugin](using-plugins/aws-secrets-manager). For a diff --git a/site/docs-ruby/using-plugins/iam-authentication.md b/site/docs-ruby/using-plugins/iam-authentication.md index 5873d63..a5f7576 100644 --- a/site/docs-ruby/using-plugins/iam-authentication.md +++ b/site/docs-ruby/using-plugins/iam-authentication.md @@ -193,9 +193,9 @@ fresh token and retries the connection once. :::note The token cache is shared by every connection in the process that uses the `iam`, `federated_auth`, or `okta` plugin, and the first such connection sets -its `iam_expiration_sec`. Connections -opened later with a different value still use the first connection's value, so -set `iam_expiration_sec` to the same value on every connection. +its `iam_expiration_sec`. Connections opened later with a different value still +use the first connection's value, so set `iam_expiration_sec` to the same value +on every connection. ::: ## Related