Skip to content

fix: cluster instance host patterns parsing errors, MySQL IAM authentication and incorrect configuration parameter in documentation - #693

Merged
karenc-bq merged 6 commits into
mainfrom
fix/gdb
Aug 20, 2026
Merged

fix: cluster instance host patterns parsing errors, MySQL IAM authentication and incorrect configuration parameter in documentation#693
karenc-bq merged 6 commits into
mainfrom
fix/gdb

Conversation

@karenc-bq

Copy link
Copy Markdown
Contributor

Summary

Fixes four defects that prevented Aurora Global Database support from working as documented: cluster topology was never discovered, the documented globalClusterInstanceHostPatterns formats were rejected, MySQL token-based authentication could not connect, and the Global Database pages named a connection property that does not exist.

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq
karenc-bq requested a review from a team as a code owner August 20, 2026 20:07
Comment thread docs/using-the-nodejs-wrapper/using-plugins/UsingTheIamAuthenticationPlugin.md Outdated
The cluster topology monitor passed the single cluster instance template to the Global Database topology builder, which requires one template per AWS region. Every refresh threw a TypeError, so the host list never grew beyond the initial endpoint: failover had no candidates, and host monitoring could not identify the current connection.

The failure was logged at debug level and retried indefinitely, so a connection looked healthy while the wrapper had no topology at all.
The parser required each entry to be 'region:hostPattern' and rejected the documented forms outright. It now accepts a bare instance endpoint pattern with the region read from the endpoint, an explicit '[region]pattern' prefix, and the existing 'region:pattern' prefix.

Moved into RdsUtils so region extraction reuses the endpoint parsing already there, which adds support for the China, GovCloud and ISO partitions: China transposes the region and rds labels, and those region identifiers have four segments. A trailing port is no longer mistaken for a region prefix.

Adds unit tests for every accepted form, both partition orderings, the port ambiguity and each rejection path.
…cation

Aurora MySQL asks a token-authenticated user for the mysql_clear_password plugin, which the driver refuses unless enableCleartextPlugin is set, so IAM, federated and Okta authentication could not connect with the documented configuration.

The option is now set when a token-based auth plugin is in use and ssl is configured. It is deliberately not set on an unencrypted connection, since the plugin sends the token in plaintext at the protocol level; that case warns instead and names both remedies. An explicit user value always wins.
The Global Database pages told users to set wrapperDialect, which the wrapper does not read; the property is dialect, as documented on the database dialects page. Users following these pages silently fell through to dialect auto-detection.
Restores the single-space separator lines the header rule expects in the new test file, collapses one argument prettier wants on a single line, and re-pads a documentation table whose column narrowed when wrapperDialect became dialect.
… Okta pages

The IAM Authentication Plugin page explains that Aurora MySQL requires an encrypted connection for token-based authentication, and notes that federatedAuth and okta behave the same way. Neither of those pages linked to it, so a reader of either would not find the requirement.

Adds a short section to both pages pointing at that explanation, and makes the reference reciprocal by linking the IAM page's mention of the two plugins to their own pages.
@karenc-bq
karenc-bq enabled auto-merge (squash) August 20, 2026 21:55
@karenc-bq
karenc-bq merged commit 3000b56 into main Aug 20, 2026
4 checks passed
@karenc-bq
karenc-bq deleted the fix/gdb branch August 20, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants