-
Notifications
You must be signed in to change notification settings - Fork 408
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
[ANSIENG-3858] Fix mTLS super.users in kraft upgrades #1907
Conversation
cert principal as input and make kraft and kafka roles independently executable thus allowing the use of --tags kafka_controller and --tags kafka_broker seperately even when mTLS is enabled
…on kraft case
…cy between kafka and kraft
…ovided ks or custom certs
…essage
molecule/rbac-kafka-connect-replicator-kerberos-mtls-custom-debian10/molecule.yml
Outdated
Show resolved
Hide resolved
…put it in docs
…s per pr review comments
e6a5abb
to
fe3a002
Compare
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!
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.
we can also consider if this variable can be made generic for all rbac cases. i.e the variable does not depend on mtls and in any of the cases where the customers need to add super users, they can simply use this variable and the values defined in this variable will be internally added to super users list along with internal values that ansible creates.
I'll add that the warning would still be present in case the customer does not specify this variable in case of mtls but this variable can be used in other cases as well. In short, good to have for other auth whereas required for mtls rbac
…s per pr review comments
…take rbac super users input
…take rbac super users input for molecule tests
Description
Behaviour before the PR
During any kind of update to a KRaft cluster which has mTLS enabled we currently cant pass tags to run controller and broker separately and also need to give kraft and kafka super users in the custom properties of broker and controller.
Reason is during controller update phase, the super.users list is initially constructed with only the controllers' cert principals, after which the controllers are restarted. At this juncture, the broker - controller communication breaks as broker's cert principals are also needed in kraft controller super.users leading to cluster going down until we also update brokers. This breakdown is avoided by passing in super.users from custom_properties variables to kraft controller.
When we update brokers they go and fetch controller's cert principals and write to their super.users and also send their own cert principals to controllers and restart the controllers.
Solution Approach
Take the kraft and kafka cert principals from users as input via new variable
rbac_mtls_kafka_kraft_cert_principals
1.1 Must use --tags kafka_controller,kafka_broker (both must be given)
1.2
super.users
must be defined in the custom properties in the inventory file1.1 This variable contains cert principals of kafka and kraft both. So while controller gets setup it doesnt lose on kafka cert principals.
1.2 Also when broker gets setup it doesnt need to go into controller to get its mtls cert principals and send its own cert principals. Thus making both roles not dependent on each other.
Fixes # (issue)
Type of change
How Has This Been Tested?
tests run1
tests run2
Manual vm based testing
Checklist: