NIFI-14048 Add fallback to RSA for Framework Application Tokens #9603
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
NIFI-14048 Adjusts the framework web application security configuration to support fallback to the
RSA
key algorithm and thePS512
JSON Web Signature algorithm when the runtime Java Security Provider does not support theEd25519
key algorithm.NiFi versions prior to 2.0.0 used
RSA
withPS512
for signing and verifying Application Bearer Tokens. NiFi 2.0.0 changed the implementation to useEd25519
withEdDSA
for smaller key and signature sizes providing similar or better security than RSA.At the time of this writing, Java Security Providers that enforce Federal Information Processing Standards do not include
Ed25519
in the list of approved algorithms. FIPS 186-5 published in February 2023 addsEd25519
to the list of approved algorithms, and FIPS providers such as Bouncy Castle have submitted versions for approval that includeEd25519
.Although the project does not provide official support for operating in a mode compatible with FIPS providers, enabling fallback support for
RSA
enables a transitional upgrade path for current deployments. Instead of introducing a new framework configuration property, changes in this pull request use java.security.Security to determine whetherEd25519
is supported on startup. In absence of support forEd25519
, the framework selectsRSA
for rotating JWT key pair generation andPS512
for token signing. The framework logs a message indicating the selected algorithm. This approach also provides the opportunity for subsequent removal when support forEd25519
is incorporated in providers such as Bouncy Castle.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation