Skip to content

chore: Wire plugin/plugin_hash_string/plugin_auth_string into mysql_user task - #371

Merged
aryaboy2U merged 4 commits into
masterfrom
GSRE-4388
Aug 19, 2026
Merged

chore: Wire plugin/plugin_hash_string/plugin_auth_string into mysql_user task#371
aryaboy2U merged 4 commits into
masterfrom
GSRE-4388

Conversation

@aryaboy2U

Copy link
Copy Markdown
Contributor

Summary

  • create_db_and_users.yml's mysql_user task didn't expose plugin/plugin_hash_string/plugin_auth_string, so vars files had no way to force a specific auth plugin (e.g. mysql_native_password) on user creation — new users always got the server's default (caching_sha2_password on MySQL8).
  • All three added params default to omit when not set on a database_users entry, so this is a no-op for every existing entry.
  • Companion PR in edx/edx-internal (adds openflow001 to prod enterprise-subsidy) is the first consumer — needed because NiFi/Openflow's JDBC driver can't complete the caching_sha2_password handshake.

Test plan

  • Run playbook against a vars file with no plugin key on any user — confirm no diff in behavior (idempotent, no changed auth)
  • Run playbook against the enterprise-subsidy vars file with the new openflow001 entry — confirm user created with mysql_native_password

…ser task

Lets vars files opt a user into mysql_native_password (or other explicit
auth plugins) instead of the server's default. Params default to omit,
so existing entries without a plugin key are unaffected.
Copilot AI lite review requested due to automatic review settings August 19, 2026 16:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the MySQL user creation playbook to allow callers to explicitly control which MySQL authentication plugin (and related auth strings) are used when creating users, rather than always inheriting the server default.

Changes:

  • Exposes plugin, plugin_hash_string, and plugin_auth_string on the mysql_user task (defaulting to omit).
  • Enables vars files to force non-default auth plugins (e.g., mysql_native_password) for compatibility with clients that can’t use caching_sha2_password.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread playbooks/create_db_and_users.yml
Comment thread playbooks/create_db_and_users.yml
plugin: AWSAuthenticationPlugin previously slipped past the mysql_user
task's guard (which only checked mysql_plugin), hit the module with an
unsupported plugin value, and never reached the IAM-specific shell tasks.
Both keys now route to the same path for that sentinel value.
Copilot AI review requested due to automatic review settings August 19, 2026 16:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

playbooks/create_db_and_users.yml:106

  • mysql_user now supports plugin, but mysql_plugin is still referenced in the when clause. If a vars entry sets mysql_plugin to a non-AWS value (e.g. mysql_native_password), the task will run but won’t actually pass that plugin to mysql_user, so the user will still be created with the server default plugin.
        plugin: "{{ item.plugin | default(omit) }}"
        plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}"
        plugin_auth_string: "{{ item.plugin_auth_string | default(omit) }}"
      when: (item.mysql_plugin | default('')) != 'AWSAuthenticationPlugin' and (item.plugin | default('')) != 'AWSAuthenticationPlugin'

@aryaboy2U
aryaboy2U merged commit c23dbac into master Aug 19, 2026
3 checks passed
@aryaboy2U
aryaboy2U deleted the GSRE-4388 branch August 19, 2026 16:22
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.

3 participants