Class SharedEncryptConfig

java.lang.Object
org.apache.nifi.toolkit.config.command.SharedEncryptConfig
Direct Known Subclasses:
RegistryEncryptConfig, StandardEncryptConfig

public class SharedEncryptConfig extends Object
Shared Encrypt Configuration for NiFi and NiFi Registry
  • Field Details

    • DEFAULT_PROTECTION_SCHEME

      private static final String DEFAULT_PROTECTION_SCHEME
      See Also:
    • WORKING_FILE_NAME_FORMAT

      private static final String WORKING_FILE_NAME_FORMAT
      See Also:
    • derivedKeyGenerator

      private static final DerivedKeyGenerator derivedKeyGenerator
    • verboseModeEnabled

      boolean verboseModeEnabled
    • authorizersPath

      Path authorizersPath
    • outputAuthorizersPath

      Path outputAuthorizersPath
    • bootstrapConfPath

      Path bootstrapConfPath
    • outputBootstrapConf

      Path outputBootstrapConf
    • protectionScheme

      ProtectionScheme protectionScheme
    • oldProtectionScheme

      ProtectionScheme oldProtectionScheme
    • key

      String key
    • oldKey

      String oldKey
    • password

      String password
    • oldPassword

      String oldPassword
    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • SharedEncryptConfig

      public SharedEncryptConfig()
  • Method Details

    • processBootstrapConf

      protected void processBootstrapConf(String rootKeyProperty)
      Process bootstrap.conf writing new Root Key to specified Root Key Property when bootstrap.conf is specified
      Parameters:
      rootKeyProperty - Root Key Property in bootstrap.conf to be updated
    • processAuthorizers

      protected void processAuthorizers()
      Process authorizers.xml decrypting sensitive values when required and encrypting sensitive values with new settings
    • runFileTransformer

      protected void runFileTransformer(FileTransformer fileTransformer, Path inputPath, Path outputPath)
      Run File Transformer using working path based on output path
      Parameters:
      fileTransformer - File Transformer to be invoked
      inputPath - Input path of file to be transformed
      outputPath - Output path for transformed file that defaults to the input path when not specified
    • getSensitivePropertyProviderFactory

      protected SensitivePropertyProviderFactory getSensitivePropertyProviderFactory()
      Get Sensitive Property Provider Factory using provided Root Key or Password for derived Root Key
      Returns:
      Sensitive Property Provider Factory
    • getInputSensitivePropertyProvider

      protected SensitivePropertyProvider getInputSensitivePropertyProvider()
      Get Input Sensitive Property Provider for decrypting previous values
      Returns:
      Input Sensitive Property Provider
    • getRootKey

      protected String getRootKey()
      Get Bootstrap Root Key provided as hexadecimal encoded key or derived from password
      Returns:
      Root Key or null when neither Root Key nor Password specified
    • getInputRootKey

      protected String getInputRootKey()
      Get Previous Bootstrap Root Key provided as hexadecimal encoded key or derived from password for decrypting previous values
      Returns:
      Root Key or null when neither Root Key nor Password specified
    • getWorkingPath

      private Path getWorkingPath(Path resourcePath)
    • getInputSensitivePropertyProviderFactory

      private SensitivePropertyProviderFactory getInputSensitivePropertyProviderFactory()
    • getBootstrapPropertiesSupplier

      private Supplier<BootstrapProperties> getBootstrapPropertiesSupplier()