-
Notifications
You must be signed in to change notification settings - Fork 76
Add support for mTLS #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add support for mTLS #382
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added Python3.10 as it historically had urllib3 changes that caused issues. renamed the 'secure' test mode to 'secure-ldap' distinguish it from 'secure-mtls'. Added 'secure-mtls' test mode with docker configuration and pytest setup. Added including 'reporting tasks' to some controller functions as the management controllers fall into that group and the SSL Context controller required for secure registry falls into that category. Changed the default_proxy_user in config.py to user1 instead of localhost to match the certs. Added optional 'purpose' overide to security/set_service_ssl_context to handle certificates needing to be either CLIENT or SERVER auth. Should fix issue #370. bootstrap_security_policies changed to read system_diagnostics and policies by default. Added mtls handling. Added default registry policy setup for the nifi proxy user. Added security.py function to create_ssl_context_controller_service which is required to create the registry client in an mTLS environment. Updated utils/set_endpoint to handle correctly setting the SSL Context for mTLS when login is not requested, and not just LDAPS. This allows easy mTLS usage as shown in conftest. updated versioning/create_registry_client to accept an SSL Context Service to setup the secure registry connection under mTLS. Locked latest for testing to be 1.28.1 for this branch of NiPyAPI as testing against 2.x is not a full test suite. pytest now has an additional mode secure_mtls, which clones the secure_ldap setup. You can only use either mtls or ldap concurrently as they share network names in the certificates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a small question
ChrisSamo632
reviewed
Mar 3, 2025
ottobackwards
approved these changes
Mar 4, 2025
ChrisSamo632
approved these changes
Mar 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Chaffelson 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Tested all test modes using Docker Desktop on Windows10