This is an automated email from the ASF dual-hosted git repository.
jgresock pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 7b12545e5a NIFI-11211 Removed deprecated SSLContextService methods
7b12545e5a is described below
commit 7b12545e5afb39ffdaaf50e1f34f335e635eaa65
Author: exceptionfactory <[email protected]>
AuthorDate: Tue Feb 21 20:56:45 2023 -0600
NIFI-11211 Removed deprecated SSLContextService methods
Signed-off-by: Joe Gresock <[email protected]>
This closes #6983.
---
.../nifi-ssl-context-service/pom.xml | 4 ---
.../apache/nifi/ssl/StandardSSLContextService.java | 37 --------------------
.../org/apache/nifi/ssl/SSLContextService.java | 40 ----------------------
3 files changed, 81 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/pom.xml
b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/pom.xml
index f566dadca8..8f1508eb03 100644
---
a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/pom.xml
+++
b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/pom.xml
@@ -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>
diff --git
a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
index 653df19700..3055233ee3 100644
---
a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
+++
b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
@@ -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
*
diff --git
a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java
b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java
index 4e6cd43057..8bae4c1ecd 100644
---
a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java
+++
b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java
@@ -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
*