Skip to content

fix(ruby): require TLS for IAM auth - #397

Merged
jeremyprime merged 2 commits into
valkey-io:mainfrom
jeremyprime:enforce-tls-iam-auth
Oct 28, 2026
Merged

jeremyprime merged 2 commits into
valkey-io:mainfrom
jeremyprime:enforce-tls-iam-auth

Conversation

@jeremyprime

Copy link
Copy Markdown
Collaborator

Summary

An IAM authentication token is a bearer credential. Sending it over a plaintext connection lets a network attacker capture and replay it. Core now rejects IAM auth when TLS is disabled, failing closed before any token is created or sent (valkey-io/valkey-glide#7397). This bumps the submodule to that fix and upgrades the IAM integration tests to run over TLS.

Issue link

Related: valkey-io/valkey-glide#7023

Changes

  • Bump valkey-glide submodule to the merged core TLS-enforcement fix (b360e69b).
  • IAM integration tests connect over the standalone TLS server and skip when no TLS server is available (including the cluster context, which has no TLS endpoint). The refresh-interval rejection tests also run over TLS, since that Core validation sits behind the new guard.
  • README iam_config row now notes TLS is required.

Testing

  • IAM integration tests pass over TLS (7/7).
  • A-B validated: forcing the IAM client to plaintext fails with the guard error ("IAM authentication requires TLS").

Checklist

  • This Pull Request is related to an issue.
  • Commit message describe your changes
  • Commits are signed off (git commit -s) per the DCO.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Linters have been run (bundle exec rubocop) and pass.
  • Destination branch is correct - main.

@Aryex
Aryex self-requested a review October 26, 2026 21:40

@Aryex Aryex left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since TLS + IAM validation sits at the core I assume that is tested already?

Other than that, just some cleanup for comments.

Comment thread test/integration/valkey/iam_authentication_test.rb
Comment thread test/integration/valkey/iam_authentication_test.rb Outdated
Comment thread test/integration/valkey/iam_authentication_test.rb Outdated
Comment thread test/integration/valkey/iam_authentication_test.rb Outdated
Comment thread test/integration/valkey/iam_authentication_test.rb Outdated
@jeremyprime

Copy link
Copy Markdown
Collaborator Author

Since TLS + IAM validation sits at the core I assume that is tested already?

Other than that, just some cleanup for comments.

Yes, the TLS guard is in the core and there are tests at that level to verify it works.

Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
@jeremyprime
jeremyprime merged commit 410b42f into valkey-io:main Oct 28, 2026
17 checks passed
@jeremyprime
jeremyprime deleted the enforce-tls-iam-auth branch October 28, 2026 19:09
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