-
Notifications
You must be signed in to change notification settings - Fork 693
Closed
Copy link
Labels
affects/8.8Issue is affecting 8.8 minor versionsIssue is affecting 8.8 minor versionscomponent/identityRelated to the Identity component/teamRelated to the Identity component/teamkind/bugCategorizes an issue or PR as a bugCategorizes an issue or PR as a buglikelihood/highA recurring issueA recurring issueseverity/midMarks a bug as having a noticeable impact but with a known workaroundMarks a bug as having a noticeable impact but with a known workaroundversion:8.8.0-alpha8version:8.8.0-alpha8-rc1
Description
Description
When configuring multi-tenancy using kebab case, e.g. camunda.security.multi-tenancy.checks-enabled
, then tenancy checks are not applied to the Operate and Tasklist V1/internal APIs. Since the UIs still use the V1 APIs in some areas, data becomes visible there, too.
Steps to reproduce
- Configure an application property to enable tenant checks as kebab-case, i.e.
camunda.security.multi-tenancy.checks-enabled: true
- Start the application
- Create two tenants with one user each
- Deploy a process model for each user
- Log in with one of the users to Operate
- Go to Operate at http://localhost:8080/operate/processes?tenant=all and check which processes are visible
Current behavior
- Both deployed processes are visible (since the internal API
/api/processes/grouped
is returning both)
Expected behavior
- Only the process to which the user has access to is displayed
Environment
SM
Version
- 8.8.0-alpha7 and later
Rootcause
The tenant access provider is conditionally created, based on an @ConditionalOnProperty
annotation. This seems to be case sensitive.
Lines 53 to 70 in 8c0e710
@Bean | |
@ConditionalOnProperty( | |
prefix = "camunda.security.multiTenancy", | |
name = "checksEnabled", | |
havingValue = "true") | |
public TenantAccessProvider tenantAccessProvider() { | |
return new DefaultTenantAccessProvider(); | |
} | |
@Bean | |
@ConditionalOnProperty( | |
prefix = "camunda.security.multiTenancy", | |
name = "checksEnabled", | |
havingValue = "false", | |
matchIfMissing = true) | |
public TenantAccessProvider disabledTenantAccessProvider() { | |
return new DisabledTenantAccessProvider(); | |
} |
Solution ideas
- Rewrite the condition into a programmatic check that takes care of both cases (or potentially even just use the configuration Java class to access the property value, if that is technicall possible)
- Consider checking the codebase for other occurrences of this pattern
Dev -> QA handover
- Resources:
- Versions to validate:
- Release version (in which version this feature will be released):
Links
Sub-issues
Metadata
Metadata
Assignees
Labels
affects/8.8Issue is affecting 8.8 minor versionsIssue is affecting 8.8 minor versionscomponent/identityRelated to the Identity component/teamRelated to the Identity component/teamkind/bugCategorizes an issue or PR as a bugCategorizes an issue or PR as a buglikelihood/highA recurring issueA recurring issueseverity/midMarks a bug as having a noticeable impact but with a known workaroundMarks a bug as having a noticeable impact but with a known workaroundversion:8.8.0-alpha8version:8.8.0-alpha8-rc1
Type
Projects
Status
Done