exceptionfactory opened a new pull request, #7651: URL: https://github.com/apache/nifi/pull/7651
# Summary [NIFI-12001](https://issues.apache.org/jira/browse/NIFI-12001) Refactors the `CertificateUtils` class into discrete modules and components for improved dependency management and testing. The new `nifi-security-cert` module includes utilities for reading Subject Alternative Names and deriving TLS peer identities from certificates. These components use standard Java classes and do not require any additional dependencies, making this module more portable for framework and extension integration. The new `nifi-security-cert-builder` module depends on the Bouncy Castle Provider and PKIX libraries for generating X.509 certificates. The Bouncy Castle Provider is over 8 MB at the time of this writing. This separation from other certificate utilities provides the groundwork for subsequent efforts to refactor Key Store generation, which requires certificate generation. Refactored changes include simplifying the certificate generation methods, which no longer require reordering distinguished names. The standard Java `X500Principal` class provides a contract for subject and issuer distinguished names, and the Bouncy Castle `RFC4519Style` class avoids the need to reverse distinguished name elements. The `StandardCertificateBuilder` provides a simplified constructor for self-signed certificates. The builder also includes methods for setting Subject DN and Subject Public Key properties to support certificates issued from a Certificate Authority. Several test classes for the TLS toolkit included references to the Bouncy Castle Provider, which are not necessary on Java 8 and following given the availability of standard algorithms and key sizes. # 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 17 ### 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]
