Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@
1) The driver's packages (API and internal);
2) All shaded packages, except Guava which resides in a separate bundle.
-->
<!-- DSE-namespaced exports retain reactive APIs and metadata compatibility shells. -->
<Export-Package>com.datastax.oss.driver.api.core.*, com.datastax.oss.driver.internal.core.*, com.datastax.dse.driver.api.core.cql.reactive, com.datastax.dse.driver.api.core.metadata.*, com.datastax.dse.driver.internal.core.cql.reactive, com.datastax.dse.driver.internal.core.util.concurrent, com.datastax.oss.driver.shaded.netty.*, com.datastax.oss.driver.shaded.fasterxml.jackson.*,</Export-Package>
<!-- DSE-namespaced exports contain APIs retained for compatibility. -->
<Export-Package>com.datastax.oss.driver.api.core.*, com.datastax.oss.driver.internal.core.*, com.datastax.dse.driver.api.core.auth, com.datastax.dse.driver.api.core.config, com.datastax.dse.driver.api.core.cql.reactive, com.datastax.dse.driver.api.core.metadata.*, com.datastax.dse.driver.internal.core.cql.reactive, com.datastax.dse.driver.internal.core.util.concurrent, com.datastax.oss.driver.shaded.netty.*, com.datastax.oss.driver.shaded.fasterxml.jackson.*,</Export-Package>
</instructions>
<rebuildBundle>true</rebuildBundle>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@
optional for dependencies declared as non-optional in the pom files.
-->jnr.*;resolution:=optional, org.reactivestreams.*;resolution:=optional, reactor.blockhound.*;resolution:=optional, *
</Import-Package>
<!-- The DSE-namespaced packages below retain reactive APIs and metadata compatibility shells. -->
<Export-Package>com.datastax.oss.driver.*.core.*, com.datastax.dse.driver.api.core.cql.reactive, com.datastax.dse.driver.api.core.metadata.*, com.datastax.dse.driver.internal.core.cql.reactive, com.datastax.dse.driver.internal.core.util.concurrent</Export-Package>
<!-- The DSE-namespaced packages below contain APIs retained for compatibility. -->
<Export-Package>com.datastax.oss.driver.*.core.*, com.datastax.dse.driver.api.core.auth, com.datastax.dse.driver.api.core.config, com.datastax.dse.driver.api.core.cql.reactive, com.datastax.dse.driver.api.core.metadata.*, com.datastax.dse.driver.internal.core.cql.reactive, com.datastax.dse.driver.internal.core.util.concurrent</Export-Package>
</instructions>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* 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 java.util.Objects;
import net.jcip.annotations.ThreadSafe;

/**
* Base class retained for ordinary authentication by existing subclasses.
*
* @deprecated DSE authentication negotiation is no longer supported.
*/
@Deprecated
@ThreadSafe
public abstract class BaseDseAuthenticator implements SyncAuthenticator {

protected BaseDseAuthenticator(@NonNull String serverAuthenticator) {
if (Objects.requireNonNull(serverAuthenticator)
.equals("com.datastax.bdp.cassandra.auth.DseAuthenticator")) {
Comment thread
dkropachev marked this conversation as resolved.
throw new UnsupportedOperationException(
"DSE authentication negotiation is no longer supported");
}
}

@NonNull
protected abstract ByteBuffer getMechanism();

@NonNull
protected abstract ByteBuffer getInitialServerChallenge();

@Nullable
@Override
public ByteBuffer initialResponseSync() {
return evaluateChallengeSync(getInitialServerChallenge());
}

@Override
public void onAuthenticationSuccessSync(@Nullable ByteBuffer token) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
/*
* 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.Authenticator;
import com.datastax.oss.driver.api.core.metadata.EndPoint;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import java.nio.ByteBuffer;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.login.Configuration;
import net.jcip.annotations.Immutable;
import net.jcip.annotations.NotThreadSafe;
import net.jcip.annotations.ThreadSafe;

/** @deprecated DSE GSSAPI authentication is no longer supported. */
@Deprecated
@ThreadSafe
public abstract class DseGssApiAuthProviderBase implements AuthProvider {

public static final String DEFAULT_SASL_SERVICE_NAME = "dse";
public static final String SASL_SERVICE_NAME_PROPERTY = "dse.sasl.service";

protected DseGssApiAuthProviderBase(@NonNull String logPrefix) {
throw unsupported();
}

@NonNull
protected abstract GssApiOptions getOptions(
@NonNull EndPoint endPoint, @NonNull String serverAuthenticator);

@NonNull
@Override
public Authenticator newAuthenticator(
@NonNull EndPoint endPoint, @NonNull String serverAuthenticator) {
throw unsupported();
}

@Override
public void onMissingChallenge(@NonNull EndPoint endPoint) {
throw unsupported();
}

@Override
public void close() {}

private static UnsupportedOperationException unsupported() {
return new UnsupportedOperationException("DSE GSSAPI authentication is no longer supported");
}

/** @deprecated DSE GSSAPI authentication is no longer supported. */
@Deprecated
@Immutable
public static class GssApiOptions {

private GssApiOptions() {}

@NonNull
public static Builder builder() {
return new Builder();
}

@Nullable
public Configuration getLoginConfiguration() {
throw unsupported();
}

@Nullable
public Subject getSubject() {
throw unsupported();
}

@Nullable
public String getSaslProtocol() {
throw unsupported();
}

@Nullable
public String getAuthorizationId() {
throw unsupported();
}

@NonNull
public Map<String, String> getSaslProperties() {
throw unsupported();
}

/** @deprecated DSE GSSAPI authentication is no longer supported. */
@Deprecated
@NotThreadSafe
public static class Builder {

public Builder() {}

@NonNull
public Builder withLoginConfiguration(@Nullable Configuration loginConfiguration) {
throw unsupported();
}

@NonNull
public Builder withLoginConfiguration(@Nullable Map<String, String> loginConfiguration) {
throw unsupported();
}

@NonNull
public Builder withSubject(@Nullable Subject subject) {
throw unsupported();
}

@NonNull
public Builder withSaslProtocol(@Nullable String saslProtocol) {
throw unsupported();
}

@NonNull
public Builder withAuthorizationId(@Nullable String authorizationId) {
throw unsupported();
}

@NonNull
public Builder addSaslProperty(@NonNull String name, @NonNull String value) {
throw unsupported();
}

@NonNull
public GssApiOptions build() {
throw unsupported();
}

@SuppressWarnings("DoNotCallSuggester")
public static Configuration fetchLoginConfiguration(@Nullable Map<String, String> options) {
throw unsupported();
}
}
}

/** @deprecated DSE GSSAPI authentication is no longer supported. */
@Deprecated
@ThreadSafe
protected static class GssApiAuthenticator extends BaseDseAuthenticator {

// Keep the unused parameters for compatibility with existing subclasses.
@SuppressWarnings("unused")
protected GssApiAuthenticator(
@Nullable GssApiOptions options,
@Nullable EndPoint endPoint,
@Nullable String serverAuthenticator) {
// Do not validate the unused server name before rejecting unsupported GSSAPI.
super("org.apache.cassandra.auth.PasswordAuthenticator");
throw unsupported();
}

@NonNull
@Override
protected ByteBuffer getMechanism() {
throw unsupported();
}

@NonNull
@Override
protected ByteBuffer getInitialServerChallenge() {
throw unsupported();
}

@Nullable
@Override
public ByteBuffer evaluateChallengeSync(@Nullable ByteBuffer challenge) {
throw unsupported();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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 Retained for source and binary compatibility. Use {@link PlainTextAuthProviderBase}
* for standard plaintext authentication.
*/
@Deprecated
@ThreadSafe
public abstract class DsePlainTextAuthProviderBase extends PlainTextAuthProviderBase {

protected DsePlainTextAuthProviderBase(@NonNull String logPrefix) {
super(logPrefix);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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.metadata.EndPoint;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import net.jcip.annotations.ThreadSafe;

/** @deprecated DSE GSSAPI authentication is no longer supported. */
@Deprecated
@ThreadSafe
public class ProgrammaticDseGssApiAuthProvider extends DseGssApiAuthProviderBase {

// Keep the unused parameter for compatibility with existing callers.
@SuppressWarnings("unused")
public ProgrammaticDseGssApiAuthProvider(@Nullable GssApiOptions options) {
Comment thread
dkropachev marked this conversation as resolved.
super("");
}

@NonNull
@Override
protected GssApiOptions getOptions(
@NonNull EndPoint endPoint, @NonNull String serverAuthenticator) {
throw new UnsupportedOperationException("DSE GSSAPI authentication is no longer supported");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.cql.Statement;
import edu.umd.cs.findbugs.annotations.NonNull;

/** @deprecated DSE proxy execution is no longer supported. */
@Deprecated
@SuppressWarnings("DoNotCallSuggester")
public class ProxyAuthentication {

/** @deprecated DSE proxy execution is no longer supported. */
@Deprecated
@NonNull
public static <StatementT extends Statement<StatementT>> StatementT executeAs(
@NonNull String userOrRole, @NonNull StatementT statement) {
throw new UnsupportedOperationException("DSE proxy execution is no longer supported");
}
}
Loading
Loading