From 535490aba750148cacbc6cd34be1f49030b38157 Mon Sep 17 00:00:00 2001 From: weideng1 Date: Tue, 11 Jun 2024 05:36:54 -0600 Subject: [PATCH] #100 allow other password authenticator to work ZDM-530 (#101) Co-authored-by: Lukasz Antoniak --- CHANGELOG/CHANGELOG-2.2.md | 7 ++++--- RELEASE_NOTES.md | 6 ++++++ proxy/pkg/zdmproxy/auth.go | 6 ++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG/CHANGELOG-2.2.md b/CHANGELOG/CHANGELOG-2.2.md index 29a31051..f74a4e5a 100644 --- a/CHANGELOG/CHANGELOG-2.2.md +++ b/CHANGELOG/CHANGELOG-2.2.md @@ -6,12 +6,13 @@ When cutting a new release, update the `unreleased` heading to the tag being gen ## Unreleased -* [#112](https://github.com/datastax/zdm-proxy/pull/112) [ZDM-606](https://datastax.jira.com/browse/ZDM-606): Support COLON operator in fuzzy SAI queries and logical OR clause - -## v2.2.0 - YYYY-MM-DD +## v2.2.0 - 2024-06-11 ### New Features +* [#112](https://github.com/datastax/zdm-proxy/pull/112) [ZDM-606](https://datastax.jira.com/browse/ZDM-606): Support COLON operator in fuzzy SAI queries and logical OR clause +* [#101](https://github.com/datastax/zdm-proxy/pull/101) [ZDM-530](https://datastax.jira.com/browse/ZDM-530): Allow other password authenticators assuming they use username and secret flavor + ### Improvements ### Bug Fixes diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 557f87c5..c8aa783d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,6 +6,12 @@ Build artifacts are available at [Docker Hub](https://hub.docker.com/repository/ For additional details on the changes included in a specific release, see the associated CHANGELOG-x.x.md file. +## v2.2.0 - 2024-06-11 + +Support SAI queries and third-party authenticators. + +[Changelog](CHANGELOG/CHANGELOG-2.2.md#v220---2024-06-11) + ## v2.1.0 - 2023-11-13 Enables read only workloads to work correctly with ZDM-Proxy and Datastax Astra. diff --git a/proxy/pkg/zdmproxy/auth.go b/proxy/pkg/zdmproxy/auth.go index 8a138565..7add1b88 100644 --- a/proxy/pkg/zdmproxy/auth.go +++ b/proxy/pkg/zdmproxy/auth.go @@ -96,13 +96,11 @@ var ( ) func (a *DsePlainTextAuthenticator) InitialResponse(authenticator string) ([]byte, error) { - switch authenticator { - case "com.datastax.bdp.cassandra.auth.DseAuthenticator": + if authenticator == "com.datastax.bdp.cassandra.auth.DseAuthenticator" { return mechanism, nil - case "org.apache.cassandra.auth.PasswordAuthenticator": + } else { return a.Credentials.Marshal(), nil } - return nil, fmt.Errorf("unknown authenticator: %v", authenticator) } func (a *DsePlainTextAuthenticator) EvaluateChallenge(challenge []byte) ([]byte, error) {