diff --git a/changelog/README.md b/changelog/README.md
index b90979e2e71..8b1dad39bcc 100644
--- a/changelog/README.md
+++ b/changelog/README.md
@@ -23,6 +23,7 @@ under the License.
### 4.19.2
+- [improvement] Remove unused DSE authentication and proxy execution support (#1030)
- [bug] CASSJAVA-116: Retry or Speculative Execution with RequestIdGenerator throws "Duplicate Key"
### 4.19.1
diff --git a/core/src/main/java/com/datastax/dse/driver/api/core/auth/BaseDseAuthenticator.java b/core/src/main/java/com/datastax/dse/driver/api/core/auth/BaseDseAuthenticator.java
deleted file mode 100644
index abd68b530b6..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/api/core/auth/BaseDseAuthenticator.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.api.core.auth;
-
-import com.datastax.oss.driver.api.core.auth.SyncAuthenticator;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-import java.nio.ByteBuffer;
-import net.jcip.annotations.ThreadSafe;
-
-/**
- * Base class for {@link SyncAuthenticator} implementations that want to make use of the
- * authentication scheme negotiation in DseAuthenticator.
- */
-@ThreadSafe
-public abstract class BaseDseAuthenticator implements SyncAuthenticator {
-
- private static final String DSE_AUTHENTICATOR =
- "com.datastax.bdp.cassandra.auth.DseAuthenticator";
-
- private final String serverAuthenticator;
-
- protected BaseDseAuthenticator(@NonNull String serverAuthenticator) {
- this.serverAuthenticator = serverAuthenticator;
- }
-
- /**
- * Return a byte buffer containing the required SASL mechanism.
- *
- *
This should be one of:
- *
- *
- *
- * This must be either a {@linkplain ByteBuffer#asReadOnlyBuffer() read-only} buffer, or a new
- * instance every time.
- */
- @NonNull
- protected abstract ByteBuffer getMechanism();
-
- /**
- * Return a byte buffer containing the expected successful server challenge.
- *
- * This should be one of:
- *
- *
- * - PLAIN-START
- *
- GSSAPI-START
- *
- *
- * This must be either a {@linkplain ByteBuffer#asReadOnlyBuffer() read-only} buffer, or a new
- * instance every time.
- */
- @NonNull
- protected abstract ByteBuffer getInitialServerChallenge();
-
- @Nullable
- @Override
- public ByteBuffer initialResponseSync() {
- // DseAuthenticator communicates back the mechanism in response to server authenticate message.
- // older authenticators simply expect the auth response with credentials.
- if (isDseAuthenticator()) {
- return getMechanism();
- } else {
- return evaluateChallengeSync(getInitialServerChallenge());
- }
- }
-
- @Override
- public void onAuthenticationSuccessSync(@Nullable ByteBuffer token) {}
-
- private boolean isDseAuthenticator() {
- return serverAuthenticator.equals(DSE_AUTHENTICATOR);
- }
-}
diff --git a/core/src/main/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderBase.java b/core/src/main/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderBase.java
deleted file mode 100644
index 48a0e5b0ef3..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderBase.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.api.core.auth;
-
-import com.datastax.oss.driver.api.core.auth.AuthProvider;
-import com.datastax.oss.driver.api.core.auth.AuthenticationException;
-import com.datastax.oss.driver.api.core.auth.Authenticator;
-import com.datastax.oss.driver.api.core.metadata.EndPoint;
-import com.datastax.oss.driver.api.core.session.Session;
-import com.datastax.oss.driver.shaded.guava.common.base.Charsets;
-import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap;
-import com.datastax.oss.protocol.internal.util.Bytes;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import javax.security.auth.Subject;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-import javax.security.sasl.Sasl;
-import javax.security.sasl.SaslClient;
-import javax.security.sasl.SaslException;
-import net.jcip.annotations.Immutable;
-import net.jcip.annotations.NotThreadSafe;
-import net.jcip.annotations.ThreadSafe;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@ThreadSafe
-public abstract class DseGssApiAuthProviderBase implements AuthProvider {
-
- /** The default SASL service name used by this auth provider. */
- public static final String DEFAULT_SASL_SERVICE_NAME = "dse";
-
- /** The name of the system property to use to specify the SASL service name. */
- public static final String SASL_SERVICE_NAME_PROPERTY = "dse.sasl.service";
-
- /**
- * Legacy system property for SASL protocol name. Clients should migrate to
- * SASL_SERVICE_NAME_PROPERTY above.
- */
- private static final String LEGACY_SASL_PROTOCOL_PROPERTY = "dse.sasl.protocol";
-
- private static final Logger LOG = LoggerFactory.getLogger(DseGssApiAuthProviderBase.class);
-
- private final String logPrefix;
-
- /**
- * @param logPrefix a string that will get prepended to the logs (this is used for discrimination
- * when you have multiple driver instances executing in the same JVM). Config-based
- * implementations fill this with {@link Session#getName()}.
- */
- protected DseGssApiAuthProviderBase(@NonNull String logPrefix) {
- this.logPrefix = Objects.requireNonNull(logPrefix);
- }
-
- @NonNull
- protected abstract GssApiOptions getOptions(
- @NonNull EndPoint endPoint, @NonNull String serverAuthenticator);
-
- @NonNull
- @Override
- public Authenticator newAuthenticator(
- @NonNull EndPoint endPoint, @NonNull String serverAuthenticator)
- throws AuthenticationException {
- return new GssApiAuthenticator(
- getOptions(endPoint, serverAuthenticator), endPoint, serverAuthenticator);
- }
-
- @Override
- public void onMissingChallenge(@NonNull EndPoint endPoint) {
- LOG.warn(
- "[{}] {} did not send an authentication challenge; "
- + "This is suspicious because the driver expects authentication",
- logPrefix,
- endPoint);
- }
-
- @Override
- public void close() {
- // nothing to do
- }
-
- /**
- * The options to initialize a new authenticator.
- *
- * Use {@link #builder()} to create an instance.
- */
- @Immutable
- public static class GssApiOptions {
-
- @NonNull
- public static Builder builder() {
- return new Builder();
- }
-
- private final Configuration loginConfiguration;
- private final Subject subject;
- private final String saslProtocol;
- private final String authorizationId;
- private final Map saslProperties;
-
- private GssApiOptions(
- @Nullable Configuration loginConfiguration,
- @Nullable Subject subject,
- @Nullable String saslProtocol,
- @Nullable String authorizationId,
- @NonNull Map saslProperties) {
- this.loginConfiguration = loginConfiguration;
- this.subject = subject;
- this.saslProtocol = saslProtocol;
- this.authorizationId = authorizationId;
- this.saslProperties = saslProperties;
- }
-
- @Nullable
- public Configuration getLoginConfiguration() {
- return loginConfiguration;
- }
-
- @Nullable
- public Subject getSubject() {
- return subject;
- }
-
- @Nullable
- public String getSaslProtocol() {
- return saslProtocol;
- }
-
- @Nullable
- public String getAuthorizationId() {
- return authorizationId;
- }
-
- @NonNull
- public Map getSaslProperties() {
- return saslProperties;
- }
-
- @NotThreadSafe
- public static class Builder {
-
- private Configuration loginConfiguration;
- private Subject subject;
- private String saslProtocol;
- private String authorizationId;
- private final Map saslProperties = new HashMap<>();
-
- public Builder() {
- saslProperties.put(Sasl.SERVER_AUTH, "true");
- saslProperties.put(Sasl.QOP, "auth");
- }
-
- /**
- * Sets a login configuration that will be used to create a {@link LoginContext}.
- *
- * You MUST call either a withLoginConfiguration method or {@link #withSubject(Subject)};
- * if both are called, the subject takes precedence, and the login configuration will be
- * ignored.
- *
- * @see #withLoginConfiguration(Map)
- */
- @NonNull
- public Builder withLoginConfiguration(@Nullable Configuration loginConfiguration) {
- this.loginConfiguration = loginConfiguration;
- return this;
- }
- /**
- * Sets a login configuration that will be used to create a {@link LoginContext}.
- *
- *
This is an alternative to {@link #withLoginConfiguration(Configuration)}, that builds
- * the configuration from {@code Krb5LoginModule} with the given options.
- *
- *
You MUST call either a withLoginConfiguration method or {@link #withSubject(Subject)};
- * if both are called, the subject takes precedence, and the login configuration will be
- * ignored.
- */
- @NonNull
- public Builder withLoginConfiguration(@Nullable Map loginConfiguration) {
- this.loginConfiguration = fetchLoginConfiguration(loginConfiguration);
- return this;
- }
-
- /**
- * Sets a previously authenticated subject to reuse.
- *
- * You MUST call either this method or {@link #withLoginConfiguration(Configuration)}; if
- * both are called, the subject takes precedence, and the login configuration will be ignored.
- */
- @NonNull
- public Builder withSubject(@Nullable Subject subject) {
- this.subject = subject;
- return this;
- }
-
- /**
- * Sets the SASL protocol name to use; should match the username of the Kerberos service
- * principal used by the DSE server.
- */
- @NonNull
- public Builder withSaslProtocol(@Nullable String saslProtocol) {
- this.saslProtocol = saslProtocol;
- return this;
- }
-
- /** Sets the authorization ID (allows proxy authentication). */
- @NonNull
- public Builder withAuthorizationId(@Nullable String authorizationId) {
- this.authorizationId = authorizationId;
- return this;
- }
-
- /**
- * Add a SASL property to use when creating the SASL client.
- *
- *
Note that this builder pre-initializes these two default properties:
- *
- *
- * javax.security.sasl.server.authentication = true
- * javax.security.sasl.qop = auth
- *
- */
- @NonNull
- public Builder addSaslProperty(@NonNull String name, @NonNull String value) {
- this.saslProperties.put(Objects.requireNonNull(name), Objects.requireNonNull(value));
- return this;
- }
-
- @NonNull
- public GssApiOptions build() {
- return new GssApiOptions(
- loginConfiguration,
- subject,
- saslProtocol,
- authorizationId,
- ImmutableMap.copyOf(saslProperties));
- }
-
- public static Configuration fetchLoginConfiguration(Map options) {
- return new Configuration() {
-
- @Override
- public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
- return new AppConfigurationEntry[] {
- new AppConfigurationEntry(
- "com.sun.security.auth.module.Krb5LoginModule",
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
- options)
- };
- }
- };
- }
- }
- }
-
- protected static class GssApiAuthenticator extends BaseDseAuthenticator {
-
- private static final ByteBuffer MECHANISM =
- ByteBuffer.wrap("GSSAPI".getBytes(Charsets.UTF_8)).asReadOnlyBuffer();
- private static final ByteBuffer SERVER_INITIAL_CHALLENGE =
- ByteBuffer.wrap("GSSAPI-START".getBytes(Charsets.UTF_8)).asReadOnlyBuffer();
- private static final ByteBuffer EMPTY_BYTE_ARRAY =
- ByteBuffer.wrap(new byte[0]).asReadOnlyBuffer();
- private static final String JAAS_CONFIG_ENTRY = "DseClient";
- private static final String[] SUPPORTED_MECHANISMS = new String[] {"GSSAPI"};
-
- private Subject subject;
- private SaslClient saslClient;
- private EndPoint endPoint;
-
- protected GssApiAuthenticator(
- GssApiOptions options, EndPoint endPoint, String serverAuthenticator) {
- super(serverAuthenticator);
-
- try {
- if (options.getSubject() != null) {
- this.subject = options.getSubject();
- } else {
- Configuration loginConfiguration = options.getLoginConfiguration();
- if (loginConfiguration == null) {
- throw new IllegalArgumentException("Must provide one of subject or loginConfiguration");
- }
- LoginContext login = new LoginContext(JAAS_CONFIG_ENTRY, null, null, loginConfiguration);
- login.login();
- this.subject = login.getSubject();
- }
- String protocol = options.getSaslProtocol();
- if (protocol == null) {
- protocol =
- System.getProperty(
- SASL_SERVICE_NAME_PROPERTY,
- System.getProperty(LEGACY_SASL_PROTOCOL_PROPERTY, DEFAULT_SASL_SERVICE_NAME));
- }
- this.saslClient =
- Sasl.createSaslClient(
- SUPPORTED_MECHANISMS,
- options.getAuthorizationId(),
- protocol,
- ((InetSocketAddress) endPoint.resolve()).getAddress().getCanonicalHostName(),
- options.getSaslProperties(),
- null);
- } catch (LoginException | SaslException e) {
- throw new AuthenticationException(endPoint, e.getMessage());
- }
- this.endPoint = endPoint;
- }
-
- @NonNull
- @Override
- protected ByteBuffer getMechanism() {
- return MECHANISM;
- }
-
- @NonNull
- @Override
- protected ByteBuffer getInitialServerChallenge() {
- return SERVER_INITIAL_CHALLENGE;
- }
-
- @Nullable
- @Override
- public ByteBuffer evaluateChallengeSync(@Nullable ByteBuffer challenge) {
-
- byte[] challengeBytes;
- if (SERVER_INITIAL_CHALLENGE.equals(challenge)) {
- if (!saslClient.hasInitialResponse()) {
- return EMPTY_BYTE_ARRAY;
- }
- challengeBytes = new byte[0];
- } else {
- // The native protocol spec says the incoming challenge can be null depending on the
- // implementation. But saslClient.evaluateChallenge clearly documents that the byte array
- // can't be null, which probably means that a SASL authenticator never sends back null.
- if (challenge == null) {
- throw new AuthenticationException(this.endPoint, "Unexpected null challenge from server");
- }
- challengeBytes = Bytes.getArray(challenge);
- }
- try {
-
- return ByteBuffer.wrap(
- Subject.doAs(
- subject,
- new PrivilegedExceptionAction() {
- @Override
- public byte[] run() throws SaslException {
- return saslClient.evaluateChallenge(challengeBytes);
- }
- }));
- } catch (PrivilegedActionException e) {
- throw new AuthenticationException(this.endPoint, e.getMessage(), e.getException());
- }
- }
- }
-}
diff --git a/core/src/main/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderBase.java b/core/src/main/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderBase.java
deleted file mode 100644
index 7c5ee23bd6c..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderBase.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.api.core.auth;
-
-import com.datastax.oss.driver.api.core.auth.PlainTextAuthProviderBase;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import net.jcip.annotations.ThreadSafe;
-
-/**
- * @deprecated The driver's default plain text providers now support both Apache Cassandra and DSE.
- * This type was preserved for backward compatibility, but implementors should now extend {@link
- * PlainTextAuthProviderBase} instead.
- */
-@ThreadSafe
-@Deprecated
-public abstract class DsePlainTextAuthProviderBase extends PlainTextAuthProviderBase {
-
- protected DsePlainTextAuthProviderBase(@NonNull String logPrefix) {
- super(logPrefix);
- }
-}
diff --git a/core/src/main/java/com/datastax/dse/driver/api/core/auth/ProgrammaticDseGssApiAuthProvider.java b/core/src/main/java/com/datastax/dse/driver/api/core/auth/ProgrammaticDseGssApiAuthProvider.java
deleted file mode 100644
index 64ee5265b5a..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/api/core/auth/ProgrammaticDseGssApiAuthProvider.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.api.core.auth;
-
-import com.datastax.oss.driver.api.core.auth.AuthProvider;
-import com.datastax.oss.driver.api.core.metadata.EndPoint;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-/**
- * {@link AuthProvider} that provides GSSAPI authenticator instances for clients to connect to DSE
- * clusters secured with {@code DseAuthenticator}, in a programmatic way.
- *
- * To use this provider the corresponding GssApiOptions must be passed into the provider
- * directly, for example:
- *
- *
- * DseGssApiAuthProviderBase.GssApiOptions.Builder builder =
- * DseGssApiAuthProviderBase.GssApiOptions.builder();
- * Map<String, String> loginConfig =
- * ImmutableMap.of(
- * "principal",
- * "user principal here ex cassandra@DATASTAX.COM",
- * "useKeyTab",
- * "true",
- * "refreshKrb5Config",
- * "true",
- * "keyTab",
- * "Path to keytab file here");
- *
- * builder.withLoginConfiguration(loginConfig);
- *
- * CqlSession session =
- * CqlSession.builder()
- * .withAuthProvider(new ProgrammaticDseGssApiAuthProvider(builder.build()))
- * .build();
- *
- *
- * or alternatively
- *
- *
- * DseGssApiAuthProviderBase.GssApiOptions.Builder builder =
- * DseGssApiAuthProviderBase.GssApiOptions.builder().withSubject(subject);
- * CqlSession session =
- * CqlSession.builder()
- * .withAuthProvider(new ProgrammaticDseGssApiAuthProvider(builder.build()))
- * .build();
- *
- *
- * Kerberos Authentication
- *
- * Keytab and ticket cache settings are specified using a standard JAAS configuration file. The
- * location of the file can be set using the java.security.auth.login.config system
- * property or by adding a login.config.url.n entry in the java.security
- * properties file. Alternatively a login-configuration, or subject can be provided to the provider
- * via the GssApiOptions (see above).
- *
- * See the following documents for further details:
- *
- *
- * - JAAS
- * Login Configuration File;
- *
- Krb5LoginModule
- * options;
- *
- JAAS
- * Authentication Tutorial for more on JAAS in general.
- *
- *
- * Authentication using ticket cache
- *
- * Run kinit to obtain a ticket and populate the cache before connecting. JAAS config:
- *
- *
- * DseClient {
- * com.sun.security.auth.module.Krb5LoginModule required
- * useTicketCache=true
- * renewTGT=true;
- * };
- *
- *
- * Authentication using a keytab file
- *
- * To enable authentication using a keytab file, specify its location on disk. If your keytab
- * contains more than one principal key, you should also specify which one to select. This
- * information can also be specified in the driver config, under the login-configuration section.
- *
- *
- * DseClient {
- * com.sun.security.auth.module.Krb5LoginModule required
- * useKeyTab=true
- * keyTab="/path/to/file.keytab"
- * principal="user@MYDOMAIN.COM";
- * };
- *
- *
- * Specifying SASL protocol name
- *
- * The SASL protocol name used by this auth provider defaults to "
- * {@value #DEFAULT_SASL_SERVICE_NAME}".
- *
- * Important: the SASL protocol name should match the username of the Kerberos
- * service principal used by the DSE server. This information is specified in the dse.yaml file by
- * the {@code service_principal} option under the kerberos_options
- * section, and may vary from one DSE installation to another – especially if you installed
- * DSE with an automated package installer.
- *
- *
For example, if your dse.yaml file contains the following:
- *
- *
{@code
- * kerberos_options:
- * ...
- * service_principal: cassandra/my.host.com@MY.REALM.COM
- * }
- *
- * The correct SASL protocol name to use when authenticating against this DSE server is "{@code
- * cassandra}".
- *
- * Should you need to change the SASL protocol name specify it in the GssApiOptions, use the
- * method below:
- *
- *
- * DseGssApiAuthProviderBase.GssApiOptions.Builder builder =
- * DseGssApiAuthProviderBase.GssApiOptions.builder();
- * builder.withSaslProtocol("alternate");
- * DseGssApiAuthProviderBase.GssApiOptions options = builder.build();
- *
- *
- * Should internal sasl properties need to be set such as qop. This can also be accomplished by
- * setting it in the GssApiOptions:
- *
- *
- * DseGssApiAuthProviderBase.GssApiOptions.Builder builder =
- * DseGssApiAuthProviderBase.GssApiOptions.builder();
- * builder.addSaslProperty("javax.security.sasl.qop", "auth-conf");
- * DseGssApiAuthProviderBase.GssApiOptions options = builder.build();
- *
- *
- * @see Authenticating
- * a DSE cluster with Kerberos
- */
-public class ProgrammaticDseGssApiAuthProvider extends DseGssApiAuthProviderBase {
- private final GssApiOptions options;
-
- public ProgrammaticDseGssApiAuthProvider(GssApiOptions options) {
- super("Programmatic-Kerberos");
- this.options = options;
- }
-
- @NonNull
- @Override
- protected GssApiOptions getOptions(
- @NonNull EndPoint endPoint, @NonNull String serverAuthenticator) {
- return options;
- }
-}
diff --git a/core/src/main/java/com/datastax/dse/driver/api/core/auth/ProxyAuthentication.java b/core/src/main/java/com/datastax/dse/driver/api/core/auth/ProxyAuthentication.java
deleted file mode 100644
index a3624ba736d..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/api/core/auth/ProxyAuthentication.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.api.core.auth;
-
-import com.datastax.dse.driver.api.core.graph.GraphStatement;
-import com.datastax.oss.driver.api.core.cql.Statement;
-import com.datastax.oss.driver.shaded.guava.common.base.Charsets;
-import com.datastax.oss.protocol.internal.util.collection.NullAllowingImmutableMap;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import java.nio.ByteBuffer;
-import java.util.Map;
-
-public class ProxyAuthentication {
- private static final String PROXY_EXECUTE = "ProxyExecute";
-
- /**
- * Adds proxy authentication information to a CQL statement.
- *
- * This allows executing a statement as another role than the one the session is currently
- * authenticated as.
- *
- * @param userOrRole the role to use for execution. If the statement was already configured with
- * another role, it will get replaced by this one.
- * @param statement the statement to modify.
- * @return a statement that will run the same CQL query as {@code statement}, but acting as the
- * provided role. Note: with the driver's default implementations, this will always be a copy;
- * but if you use a custom implementation, it might return the same instance (depending on the
- * behavior of {@link Statement#setCustomPayload(Map) statement.setCustomPayload()}).
- * @see Setting
- * up roles for applications (DSE 6.0 admin guide)
- */
- @NonNull
- public static > StatementT executeAs(
- @NonNull String userOrRole, @NonNull StatementT statement) {
- return statement.setCustomPayload(
- addProxyExecuteEntry(statement.getCustomPayload(), userOrRole));
- }
-
- /**
- * Adds proxy authentication information to a graph statement.
- *
- * @see #executeAs(String, Statement)
- */
- @NonNull
- public static > StatementT executeAs(
- @NonNull String userOrRole, @NonNull StatementT statement) {
- return statement.setCustomPayload(
- addProxyExecuteEntry(statement.getCustomPayload(), userOrRole));
- }
-
- private static Map addProxyExecuteEntry(
- Map currentPayload, @NonNull String userOrRole) {
- NullAllowingImmutableMap.Builder builder =
- NullAllowingImmutableMap.builder();
- builder.put(PROXY_EXECUTE, ByteBuffer.wrap(userOrRole.getBytes(Charsets.UTF_8)));
- if (!currentPayload.isEmpty()) {
- for (Map.Entry entry : currentPayload.entrySet()) {
- String key = entry.getKey();
- if (!key.equals(PROXY_EXECUTE)) {
- builder.put(key, entry.getValue());
- }
- }
- }
- return builder.build();
- }
-}
diff --git a/core/src/main/java/com/datastax/dse/driver/api/core/config/DseDriverOption.java b/core/src/main/java/com/datastax/dse/driver/api/core/config/DseDriverOption.java
index 4d10501f6d2..f3fe6f31529 100644
--- a/core/src/main/java/com/datastax/dse/driver/api/core/config/DseDriverOption.java
+++ b/core/src/main/java/com/datastax/dse/driver/api/core/config/DseDriverOption.java
@@ -34,31 +34,6 @@ public enum DseDriverOption implements DriverOption {
*/
APPLICATION_VERSION("basic.application.version"),
- /**
- * Proxy authentication for GSSAPI authentication: allows to login as another user or role.
- *
- * Value type: {@link String}
- */
- AUTH_PROVIDER_AUTHORIZATION_ID("advanced.auth-provider.authorization-id"),
- /**
- * Service name for GSSAPI authentication.
- *
- *
Value type: {@link String}
- */
- AUTH_PROVIDER_SERVICE("advanced.auth-provider.service"),
- /**
- * Login configuration for GSSAPI authentication.
- *
- *
Value type: {@link java.util.Map Map}<{@link String},{@link String}>
- */
- AUTH_PROVIDER_LOGIN_CONFIGURATION("advanced.auth-provider.login-configuration"),
- /**
- * Internal SASL properties, if any, such as QOP, for GSSAPI authentication.
- *
- *
Value type: {@link java.util.Map Map}<{@link String},{@link String}>
- */
- AUTH_PROVIDER_SASL_PROPERTIES("advanced.auth-provider.sasl-properties"),
-
/**
* The page size for continuous paging.
*
diff --git a/core/src/main/java/com/datastax/dse/driver/internal/core/auth/DseGssApiAuthProvider.java b/core/src/main/java/com/datastax/dse/driver/internal/core/auth/DseGssApiAuthProvider.java
deleted file mode 100644
index 6ef6596a870..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/internal/core/auth/DseGssApiAuthProvider.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.internal.core.auth;
-
-import com.datastax.dse.driver.api.core.auth.DseGssApiAuthProviderBase;
-import com.datastax.dse.driver.api.core.config.DseDriverOption;
-import com.datastax.oss.driver.api.core.auth.AuthProvider;
-import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
-import com.datastax.oss.driver.api.core.context.DriverContext;
-import com.datastax.oss.driver.api.core.metadata.EndPoint;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import java.util.Map;
-import net.jcip.annotations.ThreadSafe;
-
-/**
- * {@link AuthProvider} that provides GSSAPI authenticator instances for clients to connect to DSE
- * clusters secured with {@code DseAuthenticator}.
- *
- *
To activate this provider an {@code auth-provider} section must be included in the driver
- * configuration, for example:
- *
- *
- * dse-java-driver {
- * auth-provider {
- * class = com.datastax.dse.driver.internal.core.auth.DseGssApiAuthProvider
- * login-configuration {
- * principal = "user principal here ex cassandra@DATASTAX.COM"
- * useKeyTab = "true"
- * refreshKrb5Config = "true"
- * keyTab = "Path to keytab file here"
- * }
- * }
- * }
- *
- *
- * Kerberos Authentication
- *
- * Keytab and ticket cache settings are specified using a standard JAAS configuration file. The
- * location of the file can be set using the java.security.auth.login.config system
- * property or by adding a login.config.url.n entry in the java.security
- * properties file. Alternatively a login-configuration section can be included in the driver
- * configuration.
- *
- * See the following documents for further details:
- *
- *
- * - JAAS
- * Login Configuration File;
- *
- Krb5LoginModule
- * options;
- *
- JAAS
- * Authentication Tutorial for more on JAAS in general.
- *
- *
- * Authentication using ticket cache
- *
- * Run kinit to obtain a ticket and populate the cache before connecting. JAAS config:
- *
- *
- * DseClient {
- * com.sun.security.auth.module.Krb5LoginModule required
- * useTicketCache=true
- * renewTGT=true;
- * };
- *
- *
- * Authentication using a keytab file
- *
- * To enable authentication using a keytab file, specify its location on disk. If your keytab
- * contains more than one principal key, you should also specify which one to select. This
- * information can also be specified in the driver config, under the login-configuration section.
- *
- *
- * DseClient {
- * com.sun.security.auth.module.Krb5LoginModule required
- * useKeyTab=true
- * keyTab="/path/to/file.keytab"
- * principal="user@MYDOMAIN.COM";
- * };
- *
- *
- * Specifying SASL protocol name
- *
- * The SASL protocol name used by this auth provider defaults to "
- * {@value #DEFAULT_SASL_SERVICE_NAME}".
- *
- * Important: the SASL protocol name should match the username of the Kerberos
- * service principal used by the DSE server. This information is specified in the dse.yaml file by
- * the {@code service_principal} option under the kerberos_options
- * section, and may vary from one DSE installation to another – especially if you installed
- * DSE with an automated package installer.
- *
- *
For example, if your dse.yaml file contains the following:
- *
- *
{@code
- * kerberos_options:
- * ...
- * service_principal: cassandra/my.host.com@MY.REALM.COM
- * }
- *
- * The correct SASL protocol name to use when authenticating against this DSE server is "{@code
- * cassandra}".
- *
- * Should you need to change the SASL protocol name, use one of the methods below:
- *
- *
- * - Specify the service name in the driver config.
- *
- * dse-java-driver {
- * auth-provider {
- * class = com.datastax.dse.driver.internal.core.auth.DseGssApiAuthProvider
- * service = "alternate"
- * }
- * }
- *
- * - Specify the service name with the {@code dse.sasl.service} system property when starting
- * your application, e.g. {@code -Ddse.sasl.service=cassandra}.
- *
- *
- * If a non-null SASL service name is provided to the aforementioned config, that name takes
- * precedence over the contents of the {@code dse.sasl.service} system property.
- *
- * Should internal sasl properties need to be set such as qop. This can be accomplished by
- * including a sasl-properties in the driver config, for example:
- *
- *
- * dse-java-driver {
- * auth-provider {
- * class = com.datastax.dse.driver.internal.core.auth.DseGssApiAuthProvider
- * sasl-properties {
- * javax.security.sasl.qop = "auth-conf"
- * }
- * }
- * }
- *
- */
-@ThreadSafe
-public class DseGssApiAuthProvider extends DseGssApiAuthProviderBase {
-
- private final DriverExecutionProfile config;
-
- public DseGssApiAuthProvider(DriverContext context) {
- super(context.getSessionName());
-
- this.config = context.getConfig().getDefaultProfile();
- }
-
- @NonNull
- @Override
- protected GssApiOptions getOptions(
- @NonNull EndPoint endPoint, @NonNull String serverAuthenticator) {
- // A login configuration is always necessary, throw an exception if that option is missing.
- AuthUtils.validateConfigPresent(
- config,
- DseGssApiAuthProvider.class.getName(),
- endPoint,
- DseDriverOption.AUTH_PROVIDER_LOGIN_CONFIGURATION);
-
- GssApiOptions.Builder optionsBuilder = GssApiOptions.builder();
-
- if (config.isDefined(DseDriverOption.AUTH_PROVIDER_AUTHORIZATION_ID)) {
- optionsBuilder.withAuthorizationId(
- config.getString(DseDriverOption.AUTH_PROVIDER_AUTHORIZATION_ID));
- }
- if (config.isDefined(DseDriverOption.AUTH_PROVIDER_SERVICE)) {
- optionsBuilder.withSaslProtocol(config.getString(DseDriverOption.AUTH_PROVIDER_SERVICE));
- }
- if (config.isDefined(DseDriverOption.AUTH_PROVIDER_SASL_PROPERTIES)) {
- for (Map.Entry entry :
- config.getStringMap(DseDriverOption.AUTH_PROVIDER_SASL_PROPERTIES).entrySet()) {
- optionsBuilder.addSaslProperty(entry.getKey(), entry.getValue());
- }
- }
- Map loginConfigurationMap =
- config.getStringMap(DseDriverOption.AUTH_PROVIDER_LOGIN_CONFIGURATION);
- optionsBuilder.withLoginConfiguration(loginConfigurationMap);
- return optionsBuilder.build();
- }
-}
diff --git a/core/src/main/java/com/datastax/dse/driver/internal/core/auth/DsePlainTextAuthProvider.java b/core/src/main/java/com/datastax/dse/driver/internal/core/auth/DsePlainTextAuthProvider.java
deleted file mode 100644
index 6cf82aef03e..00000000000
--- a/core/src/main/java/com/datastax/dse/driver/internal/core/auth/DsePlainTextAuthProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.datastax.dse.driver.internal.core.auth;
-
-import com.datastax.oss.driver.api.core.context.DriverContext;
-import com.datastax.oss.driver.internal.core.auth.PlainTextAuthProvider;
-import net.jcip.annotations.ThreadSafe;
-
-/**
- * @deprecated The driver's default plain text providers now support both Apache Cassandra and DSE.
- * This type was preserved for backward compatibility, but {@link PlainTextAuthProvider} should
- * be used instead.
- */
-@ThreadSafe
-@Deprecated
-public class DsePlainTextAuthProvider extends PlainTextAuthProvider {
-
- public DsePlainTextAuthProvider(DriverContext context) {
- super(context);
- }
-}
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/auth/PlainTextAuthProviderBase.java b/core/src/main/java/com/datastax/oss/driver/api/core/auth/PlainTextAuthProviderBase.java
index fb85797af9e..9f31ac6c7b0 100644
--- a/core/src/main/java/com/datastax/oss/driver/api/core/auth/PlainTextAuthProviderBase.java
+++ b/core/src/main/java/com/datastax/oss/driver/api/core/auth/PlainTextAuthProviderBase.java
@@ -17,17 +17,13 @@
*/
package com.datastax.oss.driver.api.core.auth;
-import com.datastax.dse.driver.api.core.auth.BaseDseAuthenticator;
import com.datastax.oss.driver.api.core.metadata.EndPoint;
import com.datastax.oss.driver.api.core.session.Session;
import com.datastax.oss.driver.shaded.guava.common.base.Charsets;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
-import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Objects;
import net.jcip.annotations.ThreadSafe;
@@ -74,8 +70,7 @@ protected abstract Credentials getCredentials(
public Authenticator newAuthenticator(
@NonNull EndPoint endPoint, @NonNull String serverAuthenticator)
throws AuthenticationException {
- return new PlainTextAuthenticator(
- getCredentials(endPoint, serverAuthenticator), endPoint, serverAuthenticator);
+ return new PlainTextAuthenticator(getCredentials(endPoint, serverAuthenticator), endPoint);
}
@Override
@@ -96,25 +91,10 @@ public static class Credentials {
private final char[] username;
private final char[] password;
- private final char[] authorizationId;
-
- /**
- * Builds an instance for username/password authentication, and proxy authentication with the
- * given authorizationId.
- *
- * This feature is only available with DataStax Enterprise. If the target server is Apache
- * Cassandra, the authorizationId will be ignored.
- */
- public Credentials(
- @NonNull char[] username, @NonNull char[] password, @NonNull char[] authorizationId) {
+ /** Builds an instance for username/password authentication. */
+ public Credentials(@NonNull char[] username, @NonNull char[] password) {
this.username = Objects.requireNonNull(username);
this.password = Objects.requireNonNull(password);
- this.authorizationId = Objects.requireNonNull(authorizationId);
- }
-
- /** Builds an instance for simple username/password authentication. */
- public Credentials(@NonNull char[] username, @NonNull char[] password) {
- this(username, password, new char[0]);
}
@NonNull
@@ -137,11 +117,6 @@ public char[] getPassword() {
return password;
}
- @NonNull
- public char[] getAuthorizationId() {
- return authorizationId;
- }
-
/** Clears the credentials from memory when they're no longer needed. */
protected void clear() {
// Note: this is a bit irrelevant with the built-in provider, because the config already
@@ -149,85 +124,35 @@ protected void clear() {
// retrieves the credentials from a different source.
Arrays.fill(getUsername(), (char) 0);
Arrays.fill(getPassword(), (char) 0);
- Arrays.fill(getAuthorizationId(), (char) 0);
}
}
- // Implementation note: BaseDseAuthenticator is backward compatible with Cassandra authenticators.
- // This will work with both Cassandra (as long as no authorizationId is set) and DSE.
- protected static class PlainTextAuthenticator extends BaseDseAuthenticator {
-
- private static final ByteBuffer MECHANISM =
- ByteBuffer.wrap("PLAIN".getBytes(StandardCharsets.UTF_8)).asReadOnlyBuffer();
-
- private static final ByteBuffer SERVER_INITIAL_CHALLENGE =
- ByteBuffer.wrap("PLAIN-START".getBytes(StandardCharsets.UTF_8)).asReadOnlyBuffer();
-
- private static final EndPoint DUMMY_END_POINT =
- new EndPoint() {
- @NonNull
- @Override
- public SocketAddress resolve() {
- return new InetSocketAddress("127.0.0.1", 9042);
- }
-
- @NonNull
- @Override
- public String asMetricPrefix() {
- return ""; // will never be used
- }
- };
+ protected static class PlainTextAuthenticator implements SyncAuthenticator {
private final ByteBuffer encodedCredentials;
private final EndPoint endPoint;
- protected PlainTextAuthenticator(
- @NonNull Credentials credentials,
- @NonNull EndPoint endPoint,
- @NonNull String serverAuthenticator) {
- super(serverAuthenticator);
-
+ protected PlainTextAuthenticator(@NonNull Credentials credentials, @NonNull EndPoint endPoint) {
Objects.requireNonNull(credentials);
Objects.requireNonNull(endPoint);
- ByteBuffer authorizationId = toUtf8Bytes(credentials.getAuthorizationId());
ByteBuffer username = toUtf8Bytes(credentials.getUsername());
ByteBuffer password = toUtf8Bytes(credentials.getPassword());
this.encodedCredentials =
- ByteBuffer.allocate(
- authorizationId.remaining() + username.remaining() + password.remaining() + 2);
- encodedCredentials.put(authorizationId);
+ ByteBuffer.allocate(username.remaining() + password.remaining() + 2);
encodedCredentials.put((byte) 0);
encodedCredentials.put(username);
encodedCredentials.put((byte) 0);
encodedCredentials.put(password);
encodedCredentials.flip();
- clear(authorizationId);
clear(username);
clear(password);
this.endPoint = endPoint;
}
- /**
- * @deprecated Preserved for backward compatibility, implementors should use the 3-arg
- * constructor {@code PlainTextAuthenticator(Credentials, EndPoint, String)} instead.
- */
- @Deprecated
- protected PlainTextAuthenticator(@NonNull Credentials credentials) {
- this(
- credentials,
- // It's unlikely that this class was ever extended by third parties, but if it was, assume
- // that it was not written for DSE:
- // - dummy end point because we should never need to build an auth exception
- DUMMY_END_POINT,
- // - default OSS authenticator name (the only thing that matters is how this string
- // compares to "DseAuthenticator")
- "org.apache.cassandra.auth.PasswordAuthenticator");
- }
-
private static ByteBuffer toUtf8Bytes(char[] charArray) {
CharBuffer charBuffer = CharBuffer.wrap(charArray);
return Charsets.UTF_8.encode(charBuffer);
@@ -240,25 +165,19 @@ private static void clear(ByteBuffer buffer) {
}
}
- @NonNull
- @Override
- public ByteBuffer getMechanism() {
- return MECHANISM;
- }
-
- @NonNull
+ @Nullable
@Override
- public ByteBuffer getInitialServerChallenge() {
- return SERVER_INITIAL_CHALLENGE;
+ public ByteBuffer initialResponseSync() {
+ return encodedCredentials;
}
@Nullable
@Override
public ByteBuffer evaluateChallengeSync(@Nullable ByteBuffer challenge) {
- if (SERVER_INITIAL_CHALLENGE.equals(challenge)) {
- return encodedCredentials;
- }
throw new AuthenticationException(endPoint, "Incorrect challenge from server");
}
+
+ @Override
+ public void onAuthenticationSuccessSync(@Nullable ByteBuffer token) {}
}
}
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/auth/ProgrammaticPlainTextAuthProvider.java b/core/src/main/java/com/datastax/oss/driver/api/core/auth/ProgrammaticPlainTextAuthProvider.java
index d991f5c5cb5..14e1c8c6d94 100644
--- a/core/src/main/java/com/datastax/oss/driver/api/core/auth/ProgrammaticPlainTextAuthProvider.java
+++ b/core/src/main/java/com/datastax/oss/driver/api/core/auth/ProgrammaticPlainTextAuthProvider.java
@@ -21,7 +21,6 @@
import com.datastax.oss.driver.api.core.session.SessionBuilder;
import com.datastax.oss.driver.internal.core.util.Strings;
import edu.umd.cs.findbugs.annotations.NonNull;
-import java.util.Objects;
import net.jcip.annotations.ThreadSafe;
/**
@@ -51,37 +50,20 @@
*
* @see SessionBuilder#withAuthProvider(AuthProvider)
* @see SessionBuilder#withAuthCredentials(String, String)
- * @see SessionBuilder#withAuthCredentials(String, String, String)
*/
@ThreadSafe
public class ProgrammaticPlainTextAuthProvider extends PlainTextAuthProviderBase {
private volatile char[] username;
private volatile char[] password;
- private volatile char[] authorizationId;
/** Builds an instance for simple username/password authentication. */
public ProgrammaticPlainTextAuthProvider(@NonNull String username, @NonNull String password) {
- this(username, password, "");
- }
-
- /**
- * Builds an instance for username/password authentication, and proxy authentication with the
- * given authorizationId.
- *
- *
This feature is only available with DataStax Enterprise. If the target server is Apache
- * Cassandra, use {@link #ProgrammaticPlainTextAuthProvider(String, String)} instead, or set the
- * authorizationId to an empty string.
- */
- public ProgrammaticPlainTextAuthProvider(
- @NonNull String username, @NonNull String password, @NonNull String authorizationId) {
// This will typically be built before the session so we don't know the log prefix yet. Pass an
// empty string, it's only used in one log message.
super("");
this.username = Strings.requireNotEmpty(username, "username").toCharArray();
this.password = Strings.requireNotEmpty(password, "password").toCharArray();
- this.authorizationId =
- Objects.requireNonNull(authorizationId, "authorizationId cannot be null").toCharArray();
}
/**
@@ -106,21 +88,6 @@ public void setPassword(@NonNull String password) {
this.password = Strings.requireNotEmpty(password, "password").toCharArray();
}
- /**
- * Changes the authorization id.
- *
- *
The new credentials will be used for all connections initiated after this method was called.
- *
- *
This feature is only available with DataStax Enterprise. If the target server is Apache
- * Cassandra, this method should not be used.
- *
- * @param authorizationId the new authorization id.
- */
- public void setAuthorizationId(@NonNull String authorizationId) {
- this.authorizationId =
- Objects.requireNonNull(authorizationId, "authorizationId cannot be null").toCharArray();
- }
-
/**
* {@inheritDoc}
*
@@ -131,6 +98,6 @@ public void setAuthorizationId(@NonNull String authorizationId) {
@Override
protected Credentials getCredentials(
@NonNull EndPoint endPoint, @NonNull String serverAuthenticator) {
- return new Credentials(username.clone(), password.clone(), authorizationId.clone());
+ return new Credentials(username.clone(), password.clone());
}
}
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java b/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java
index af93e734ef1..031173d432e 100644
--- a/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java
+++ b/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java
@@ -708,21 +708,6 @@ public String toString() {
/** The version of the application using the session. */
public static final TypedDriverOption APPLICATION_VERSION =
new TypedDriverOption<>(DseDriverOption.APPLICATION_VERSION, GenericType.STRING);
- /** Proxy authentication for GSSAPI authentication: allows to login as another user or role. */
- public static final TypedDriverOption AUTH_PROVIDER_AUTHORIZATION_ID =
- new TypedDriverOption<>(DseDriverOption.AUTH_PROVIDER_AUTHORIZATION_ID, GenericType.STRING);
- /** Service name for GSSAPI authentication. */
- public static final TypedDriverOption AUTH_PROVIDER_SERVICE =
- new TypedDriverOption<>(DseDriverOption.AUTH_PROVIDER_SERVICE, GenericType.STRING);
- /** Login configuration for GSSAPI authentication. */
- public static final TypedDriverOption AUTH_PROVIDER_LOGIN_CONFIGURATION =
- new TypedDriverOption<>(
- DseDriverOption.AUTH_PROVIDER_LOGIN_CONFIGURATION, GenericType.STRING);
- /** Internal SASL properties, if any, such as QOP, for GSSAPI authentication. */
- public static final TypedDriverOption