NIFI-11211 Removed deprecated SSLContextService methods

Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #6983.
This commit is contained in:
exceptionfactory 2023-02-21 20:56:45 -06:00 committed by Joe Gresock
parent a2b98e0c9c
commit 7b12545e5a
No known key found for this signature in database
GPG Key ID: 37F5B9B6E258C8B7
3 changed files with 0 additions and 81 deletions

View File

@ -35,10 +35,6 @@
<artifactId>nifi-security-utils</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-deprecation-log</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-mock</artifactId>

View File

@ -30,8 +30,6 @@ import org.apache.nifi.components.resource.ResourceType;
import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.deprecation.log.DeprecationLogger;
import org.apache.nifi.deprecation.log.DeprecationLoggerFactory;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
@ -130,8 +128,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme
.sensitive(false)
.build();
private static final DeprecationLogger deprecationLogger = DeprecationLoggerFactory.getLogger(StandardSSLContextService.class);
private static final List<PropertyDescriptor> properties;
protected ConfigurationContext configContext;
private boolean isValidated;
@ -261,39 +257,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme
}
}
/**
* Returns a configured {@link SSLContext} from the populated configuration values. This method is deprecated
* due to the Client Authentication policy not being applicable when initializing the SSLContext
*
* @param clientAuth the desired level of client authentication
* @return the configured SSLContext
* @throws ProcessException if there is a problem configuring the context
* @deprecated The {@link #createContext()} method should be used instead
*/
@Deprecated
@Override
public SSLContext createSSLContext(final org.apache.nifi.security.util.ClientAuth clientAuth) throws ProcessException {
deprecationLogger.warn("{}[id={}] createSSLContext() should be replaced with createContext()", getClass().getSimpleName(), getIdentifier());
return createContext();
}
/**
* Returns a configured {@link SSLContext} from the populated configuration values. This method is deprecated
* due to the use of the deprecated {@link ClientAuth} enum
* {@link #createContext()} method is preferred.
*
* @param clientAuth the desired level of client authentication
* @return the configured SSLContext
* @throws ProcessException if there is a problem configuring the context
* @deprecated The {@link #createContext()} method should be used instead
*/
@Deprecated
@Override
public SSLContext createSSLContext(final ClientAuth clientAuth) throws ProcessException {
deprecationLogger.warn("{}[id={}] createSSLContext() should be replaced with createContext()", getClass().getSimpleName(), getIdentifier());
return createContext();
}
/**
* Create X.509 Trust Manager using configured properties
*

View File

@ -22,7 +22,6 @@ import javax.net.ssl.X509TrustManager;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.controller.ControllerService;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.security.util.TlsConfiguration;
/**
@ -36,19 +35,6 @@ public interface SSLContextService extends ControllerService {
TlsConfiguration createTlsConfiguration();
/**
* This enum was removed in 1.12.0 but external custom code has been compiled against it, so it is returned
* in 1.12.1. This enum should no longer be used and any dependent code should now reference
* ClientAuth moving forward. This enum may be removed in a future release.
*
*/
@Deprecated
enum ClientAuth {
WANT,
REQUIRED,
NONE
}
/**
* Create and initialize {@link SSLContext} using configured properties. This method is preferred over deprecated
* create methods due to not requiring a client authentication policy.
@ -57,32 +43,6 @@ public interface SSLContextService extends ControllerService {
*/
SSLContext createContext();
/**
* Returns a configured {@link SSLContext} from the populated configuration values. This method is deprecated
* due to {@link org.apache.nifi.security.util.ClientAuth} not being applicable or used when initializing the
* {@link SSLContext}
*
* @param clientAuth the desired level of client authentication
* @return the configured SSLContext
* @throws ProcessException if there is a problem configuring the context
* @deprecated The {@link #createContext()} method should be used instead
*/
@Deprecated
SSLContext createSSLContext(org.apache.nifi.security.util.ClientAuth clientAuth) throws ProcessException;
/**
* Returns a configured {@link SSLContext} from the populated configuration values. This method is deprecated
* due to the use of the deprecated {@link ClientAuth} enum and the
* ({@link #createContext()}) method is preferred.
*
* @param clientAuth the desired level of client authentication
* @return the configured SSLContext
* @throws ProcessException if there is a problem configuring the context
* @deprecated The {@link #createContext()} method should be used instead
*/
@Deprecated
SSLContext createSSLContext(ClientAuth clientAuth) throws ProcessException;
/**
* Create X.509 Trust Manager using configured properties
*