...
Migrating deprecated features requires changes to application properties or custom component implementations. The steps involved will be different based on implementation details and deployment use cases.
...
Legacy and Alternative Sensitive Properties Algorithms
Component | org.apache.nifi.processorencrypt.ProcessContextPropertyEncryptorBuilder |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-property-apiencryptor |
Deprecation Type | Interface MethodAllowed Values |
Deprecated Version | 1.2021.0 |
Migration Difficulty | HIGHLOW |
Migration Type | Implementation redesignProperty Update |
Migration
The ProcessContext interface provides property and component configuration information to Processors through the onTrigger method. The encrypt and decrypt methods supported enciphering and deciphering component-provided strings using the Sensitive Properties Key and Sensitive Properties Algorithm configured in nifi.properties.
These methods did not provide any persistent storage mechanism and also did not provide any guarantees of compatible behavior when changing application properties. Most components depend on framework capabilities to store and retrieve sensitive property values, obviating the need for these methods.
Custom components should use Property Descriptors with the sensitive field enabled to store and retrieve sensitive property values. Alternative uses of the encrypt and decrypt methods require custom implementation.
SSLContextService createSSLContext methods
...
org.apache.nifi.ssl.SSLContextService
...
Migration
...
nifi.sensitive.props.algorithm property in the nifi.properties configuration has supported a large number of possible values, including improved algorithms introduced in NiFi 1.14.0.
Starting with NiFi 1.14.0, the default value of the Sensitive Properties Algorithm changed from PBEWITHMD5AND256BITAES-CBC-OPENSSL to NIFI_PBKDF2_AES_GCM_256.
NiFi 1.18.0 added deprecation warnings for all algorithms starting with PBE.
NiFi 1.21.0 added deprecation for the following values using the bcrypt or scrypt algorithms, as well as other values using 128 bit keys.
- NIFI_ARGON2_AES_GCM_128
- NIFI_BCRYPT_AES_GCM_128
- NIFI_BCRYPT_AES_GCM_256
- NIFI_PBKDF2_AES_GCM_128
- NIFI_SCRYPT_AES_GCM_128
- NIFI_SCRYPT_AES_GCM_256
NiFi 2.0.0 supports the following options:
- NIFI_ARGON2_AES_GCM_256
- NIFI_PBKDF2_AES_GCM_256
Running the nifi.sh command supports migrating from a deprecated algorithm to a supported algorithm.
nifi.sh set-sensitive-properties-algorithm NIFI_PBKDF2_AES_GCM_256
The Administrator's Guide provides additional details related to setting the Sensitive Properties Algorithm.
ProcessContext encrypt and decrypt methods
Component | org.apache.nifi.processor.ProcessContext |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-api |
Deprecation Type | Interface Method |
Deprecated Version | 1.20.0 |
Migration Difficulty | HIGH |
Migration Type | Implementation redesign |
Migration
The ProcessContext interface provides property and component configuration information to Processors through the onTrigger method. The encrypt and decrypt methods supported enciphering and deciphering component-provided strings using the Sensitive Properties Key and Sensitive Properties Algorithm configured in nifi.properties.
These methods did not provide any persistent storage mechanism and also did not provide any guarantees of compatible behavior when changing application properties. Most components depend on framework capabilities to store and retrieve sensitive property values, obviating the need for these methods.
Custom components should use Property Descriptors with the sensitive field enabled to store and retrieve sensitive property values. Alternative uses of the encrypt and decrypt methods require custom implementation.
SSLContextService createSSLContext methods
Component | org.apache.nifi.ssl.SSLContextService |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-ssl-context-service-api |
Deprecation Type | Interface Method |
Deprecated Version | 1.13.0 |
Migration Difficulty | LOW |
Migration Type | Method invocation changes |
Migration
The SSLContextService interface is a standard Controller Service that supports TLS communication for network services. The createSSLContext methods accepted a Client Authentication argument that did not apply to SSLContext instances. The replacement createContext method provides the same runtime behavior without requiring any arguments. Updating custom code to compile against Apache NiFi 1.13.0 or greater and switching to the createContext method provides compatibility with Apache NiFi 2.0.0.
CRON Scheduling Changes
Component | org.apache.nifi.controller.scheduling.CronSchedulingAgent |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-framework-core |
Deprecation Type | Method Argument Values |
Deprecated Version | 1.24.0 |
Migration Difficulty | LOW |
Migration Type | Method argument changes |
Migration
Component run scheduling using cron expression changed from using Quartz to Spring Framework CronExpression for parsing the scheduling period in NIFI-12290.
The new parsing approach does not impact most cron expressions, but does introduce the following changes:
- Removed support for the optional Year field as the seventh field in an expression
- Integer definitions for day of the week span from 0 to 7 instead of 1 to 7
Components can no longer be scheduled to run for a particular year, so any referenced to a seventh field in an expression must be removed. Using named day of the week references such as SUN or MON are preferred over integer references.
ExpressionLanguageScope VARIABLE_REGISTRY
In Apache NiFi 2.0, the ExpressionLanguageScope VARIABLE_REGISTRY has been removed. An alternate expression language scope ENVIRONMENT is now available, allowing for similar configurability via JVM system properties or system environment variables. Further detail on this change may be found in NIFI-12079.
Migration
- Logic of existing flow definitions should be updated to no longer depend on the presence of variables at any process group scope, or in the file registry file. Usage of parameter contexts and parameters is recommended to mitigate any gaps in flow definition logic.
- Existing custom NARs should be rebuilt using the NiFi 2.0 API. Any component properties that provide configurability via VARIABLE_REGISTRY should be adjusted to reference one of the current ExpressionLanguageScope options.
Processors
Migrating deprecated Processors and properties requires flow design changes. The steps required range from setting different property values to replacing one Processor with one or more Processors providing similar capabilities.
...
Component Class | org.apache.nifi.processors.standard.EncodeContent |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-standard-nar |
Migration
Base64EncodeContent supports a single Mode property that can be set to Encode or Decode.
...
Component Class | org.apache.nifi.processors.standard.InvokeHTTP |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-standard-nar |
Migration
GetHTTP supports a number of configurable properties to retrieve data using the HTTP GET method. The URL property controls the primary behavior of the Processor.
...
Component Class | org.apache.nifi.jms.processors.ConsumeJMS |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-jms-processors-nar |
Migration
GetJMSQueue supports retrieving messages using the Java Message Service Queue interface to access Apache ActiveMQ.
...
Component Class | org.apache.nifi.jms.processors.ConsumeJMS |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-jms-processors-nar |
Migration
GetJMSTopic supports retrieving messages using the Java Message Service Topic interface to access Apache ActiveMQ.
...
Component Class | org.apache.nifi.processors.twitter.ConsumeTwitter |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-social-media-nar |
Migration
GetTwitter uses Version 1 of the Twitter REST API and relies on the retired Twitter Hosebird Client library.
...
Component Class | org.apache.nifi.processors.standard.UpdateAttribute |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-standard-nar |
Migration
HashAttribute supports generating an MD5 digest of one more FlowFile attribute name and value pairs. The MD5 algorithm is not secure for cryptographic operations, and alternatives such as the SHA-2 or SHA-3 algorithms should be used.
...
Component Class | org.apache.nifi.processors.standard.CryptographicHashContent |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-standard-nar |
Migration
HashContent supports generating a digest of FlowFile content using a configurable algorithm and writing the hash to a specified FlowFile attribute.
...
Component Class | org.apache.nifi.processors.standard.InvokeHTTP |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-standard-nar |
Deprecation Type | Component Properties |
Deprecated Version | 1.18.0 |
Migration Difficulty | LOW |
Migration Type | Property Replacement |
Migration
InvokeHTTP includes several deprecated properties for configuring access through a proxy server.
...
Component Class | org.apache.nifi.processors.standard.InvokeHTTP |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-standard-nar |
Migration
PostHTTP supports sending FlowFile content to a configurable HTTP URL using the HTTP POST method.
...
Component Class | org.apache.nifi.jms.processors.PublishJMS |
Bundle Group | org.apache.nifi |
Bundle Artifact | nifi-jms-processors-nar |
Migration
PutJMS supports sending messages using the Java Message Service interface to access Apache ActiveMQ.
...