@Tags(value={"ssl","secure","certificate","keystore","truststore","jks","p12","pkcs12","pkcs"}) @CapabilityDescription(value="Standard implementation of the SSLContextService. Provides the ability to configure keystore and/or truststore properties once and reuse that configuration throughout the application") public class StandardSSLContextService extends AbstractControllerService implements SSLContextService
| Modifier and Type | Class and Description |
|---|---|
static class |
StandardSSLContextService.KeystoreValidationGroup |
SSLContextService.ClientAuth| Modifier and Type | Field and Description |
|---|---|
private ConfigurationContext |
configContext |
static PropertyDescriptor |
KEYSTORE |
static PropertyDescriptor |
KEYSTORE_PASSWORD |
static PropertyDescriptor |
KEYSTORE_TYPE |
private static List<PropertyDescriptor> |
properties |
static PropertyDescriptor |
SSL_ALGORITHM |
static String |
STORE_TYPE_JKS |
static String |
STORE_TYPE_PKCS12 |
static PropertyDescriptor |
TRUSTSTORE |
static PropertyDescriptor |
TRUSTSTORE_PASSWORD |
static PropertyDescriptor |
TRUSTSTORE_TYPE |
| Constructor and Description |
|---|
StandardSSLContextService() |
getControllerServiceLookup, getIdentifier, getLogger, getProperties, getProperty, init, initialize, onConfigurationChangeequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitinitializegetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final String STORE_TYPE_JKS
public static final String STORE_TYPE_PKCS12
public static final PropertyDescriptor TRUSTSTORE
public static final PropertyDescriptor TRUSTSTORE_TYPE
public static final PropertyDescriptor TRUSTSTORE_PASSWORD
public static final PropertyDescriptor KEYSTORE
public static final PropertyDescriptor KEYSTORE_TYPE
public static final PropertyDescriptor KEYSTORE_PASSWORD
public static final PropertyDescriptor SSL_ALGORITHM
private static final List<PropertyDescriptor> properties
private ConfigurationContext configContext
@OnEnabled public void onConfigured(ConfigurationContext context) throws InitializationException
InitializationExceptionprivate static Validator createFileExistsAndReadableValidator()
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentprivate void verifySslConfig(ValidationContext validationContext) throws ProcessException
ProcessExceptionpublic SSLContext createSSLContext(SSLContextService.ClientAuth clientAuth) throws ProcessException
createSSLContext in interface SSLContextServiceProcessExceptionpublic String getTrustStoreFile()
getTrustStoreFile in interface SSLContextServicepublic String getTrustStoreType()
getTrustStoreType in interface SSLContextServicepublic String getTrustStorePassword()
getTrustStorePassword in interface SSLContextServicepublic boolean isTrustStoreConfigured()
isTrustStoreConfigured in interface SSLContextServicepublic String getKeyStoreFile()
getKeyStoreFile in interface SSLContextServicepublic String getKeyStoreType()
getKeyStoreType in interface SSLContextServicepublic String getKeyStorePassword()
getKeyStorePassword in interface SSLContextServicepublic boolean isKeyStoreConfigured()
isKeyStoreConfigured in interface SSLContextServicepublic String getSslAlgorithm()
getSslAlgorithm in interface SSLContextServiceprivate static Collection<ValidationResult> validateStore(Map<PropertyDescriptor,String> properties, StandardSSLContextService.KeystoreValidationGroup keyStoreOrTrustStore)
private static int countNulls(Object... objects)
private static AllowableValue[] buildAlgorithmAllowableValues()
public String toString()
toString in class AbstractConfigurableComponentCopyright © 2015 Apache NiFi(incubating) Project. All rights reserved.