Repository navigation
feat(auth): non-SCRAM SASL — PLAIN, EXTERNAL, OAUTHBEARER (#10) - #22
Merged
Merged
Conversation
) Generalize the SASL driver beyond SCRAM to three single-message mechanisms. The wire layer (AuthCodec/SaslTransport) was already mechanism-agnostic; only SaslAuthenticator was SCRAM-specific. Mechanisms: - PLAIN (RFC 4616): username/password; requires a username. Use over TLS. - EXTERNAL (RFC 4422): identity from the mutual-TLS client cert; no creds. - OAUTHBEARER (RFC 7628): bearer token, incl. the failure-continuation turn. GSSAPI/GS2-KRB5 and DIGEST-MD5 remain unsupported (throw at connect()). API/config: - Authentication gains a `token` field; new RemoteCache::setAuthentication(const Authentication&) overload for token/cert mechanisms. - HotRodURI parses `token`; fromUri enables auth on any signal (mechanism, creds, or token) since EXTERNAL/OAUTHBEARER need no username. - Pure, unit-testable initial-response builders in SaslMechanisms.h. Tests (+18): pure builders + driver flows against fake servers (success, bad creds, missing username/token, mechanism-not-offered, OAUTHBEARER failure continuation) + URI cases. 284 unit tests pass. Integration coverage is unit-only (needs server realms/token issuer) — tracked in STATUS backlog. Docs: STATUS.md, DECISIONS.md, security.adoc, README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generalizes the SASL driver beyond the SCRAM family to three single-message mechanisms. The wire layer (
AuthCodec/SaslTransport) was already mechanism-agnostic — it carries a mechanism name + opaque token bytes — so onlySaslAuthenticatorneeded generalizing (classify mechanism → SCRAM multi-turn vs single-message path; the well-tested SCRAM flow is untouched).Mechanisms
username/password; requires a username. Use over TLS.token, incl. the RFC's failure-continuation turn.GSSAPI/GS2-KRB5(Kerberos) andDIGEST-MD5remain unsupported and throw atconnect().API / config
Authenticationgains atokenfield; newRemoteCache::setAuthentication(const Authentication&)overload for token/cert mechanisms.HotRodURIparsestoken;fromUrienables auth on any auth signal (mechanism, credentials, or token) — EXTERNAL/OAUTHBEARER have no username.include/hotrod/SaslMechanisms.h.Tests
-Werror, Debug and Release.Notes
Docs updated:
STATUS.md,DECISIONS.md,security.adoc,README.md.🤖 Generated with Claude Code
Closes #23.