-
Notifications
You must be signed in to change notification settings - Fork 693
Support camunda.security.multi-tenancy.checks-enabled
(kebab-case)
#36863
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
Support camunda.security.multi-tenancy.checks-enabled
(kebab-case)
#36863
Conversation
These four test cases show that the multi-tenancy checks can be enabled and disabled using both camelCase and kebab-case style of the properties: - camunda.security.multiTenancy.checksEnabled - camunda.security.multi-tenancy.checks-enabled
ec3306c
to
07ca837
Compare
07ca837
to
0334c69
Compare
These tests verify that the resource access controller has tenant access or not through the multi tenancy checks enabled property. As this property can be configured both using camelCase and kebab-case, we can verify the 4 combinations. Note that enabling it using kebab-case currently fails, we'll fix this in a following commit.
The property was only checked using multiTenancy specifically, which meant that the kebab-case style (multi-tenancy.checks-enabled) was ignored completely. We can easily resolve this by dynamically providing the bean using the SecurityConfiguration which correctly determines the config option regardless of camelCase or kebab-case because it's based on spring's own property loading.
Applies the same mechanism to the ResourceAccessProvider as used to configure the TenantAccessProvider. This ensures that the full spring configuration is used rather than relying on specific casing for the property.
0334c69
to
aaacddc
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.
@korthout changes look good to me, I really like testing here ⭐
It is a bit unclear what would happen if both styles are used at the same time (as per note in the PR description)?
I had another look at this, and it's not an actual problem. Spring normalizes property names so both |
Description
This PR adds support for configuring the multi-tenancy checks using kebab-case:
camunda.security.multi-tenancy.checks-enabled
This comes in addition to the already supported camelCase style:
camunda.security.multiTenancy.checksEnabled
It achieves this by depending on the SecurityConfiguration which correctly handle the different cases.
The PR adds test cases to show that the tenant provider can be configured using either of these properties.
Note
This PR does not add anything to discourage the conflicting configuration using a combination of both styles, e.g.:
Checklist
Related issues
closes #36597