exceptionfactory opened a new pull request, #8967:
URL: https://github.com/apache/nifi/pull/8967

   # Summary
   
   [NIFI-12125](https://issues.apache.org/jira/browse/NIFI-12125) Refactors the 
[SSLContext](https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html)
 loading process for system framework components to streamline the process and 
support unified automatic reloading.
   
   NiFi 1.14.0 introduced support for configurable automatic reloading of 
security key store and trust store files for the Jetty web server. Subsequent 
versions refined support, but automatic reloading remained limited to Jetty web 
server. This pull request extends automatic reloading to apply to other 
framework uses of the security `SSLContext`, including cluster communication.
   
   The changes include replacing XML-based Spring Framework configuration with 
Java-based Spring Framework for Flow Controller components. Instead of loading 
the configured key store and trust store files in different classes using 
methods from `SslContextFactory`, this pull request introduces a 
`FrameworkSslContextProvider` that is responsible for loading supporting 
components and making them available to both the Jetty Server and other Flow 
Controller components.
   
   The Spring Framework configuration classes introduce new directory 
monitoring components that use the 
[WatchService](https://docs.oracle.com/javase/8/docs/api/java/nio/file/WatchService.html)
 to register for file change events. After detecting changes, the configured 
listener reloads key store and trust store files, then updates instances of 
`X509ExtendedKeyManager` and `X509ExtendedTrustManager`, which provide the 
security handling necessary for the shared instance of the `SSLContext`. The 
`StandardX509ExtendedKeyManager` and `StandardX509ExtendedTrustManager`classes 
include set methods that support changing the underlying reference object that 
performs to associated functions.
   
   The changes enabled the removal of `SslContextFactory.fromNiFiProperties()` 
methods as well as the custom Jetty-specific `StoreScanner` class.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [X] Build completed using `mvn clean install -P contrib-check`
     - [X] JDK 21
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to