Implement swimlane Assignment Using Groups instead of the realm roles(bpm specific roles)#69
Merged
Conversation
PR Agent ReviewBlocking issues
Non-blocking suggestions
Recommended tests
Generated by model |
auslin-aot
reviewed
May 14, 2026
Collaborator
auslin-aot
left a comment
There was a problem hiding this comment.
The newly created tenant is missing the group claim in the token. Could you please check?
auslin-aot
reviewed
May 14, 2026
Collaborator
Author
Collaborator
Author
auslin-aot
approved these changes
May 15, 2026
Collaborator
auslin-aot
left a comment
There was a problem hiding this comment.
Please resolve conflicts
…groups-instead-of-the-realm-roles-bpm-specific-roles
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
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.










JIRA Ticket
https://aottech.atlassian.net/browse/M8F-268
Description
This PR moves swimlane assignment to tenant-scoped organizational groups and separates Keycloak permission roles from organizational groups in tokens. It also adds fail-fast task submission errors for unresolved lane assignment, tenant-aware group syncing on sign-in, and Keycloak bootstrap/template updates for the new token shape and default groups.
Key changes
lane_ownersfrom workflow/script data for the current lane, and otherwise resolves the lane against tenant-qualified local groups such astenant-a:/Finance.workflow.data["data_objects"], solane_ownersand other script outputs survive async execution and remain available during later gateway/task evaluation.task_lane_assignment_errorimmediately instead of failing later in background execution.groups, while M8Flow permission roles are emitted in a top-levelrolesclaim.tenant-a:/Financefor org groups andtenant-a:reviewerfor permission roles.m8flow-backendclient mappers, seed default groups, and create the requested default memberships./Approvers,/Designers,/Administrators, and/Support, withreviewer,editor,admin, andintegratorassigned respectively.Assigning roles and groups
editor,reviewer,integrator,viewer, ortenant-admin.rolesclaim./Manageror/Finance. M8Flow reads these from the token’sgroupsclaim and stores them locally as tenant-qualified identifiers such astenant-a:/Manager.lane_ownerswith usernames for the target lane.Token layout
Legacy mixed token shape:
{ "groups": ["/Finance", "reviewer"] }New token shape:
{ "groups": ["Finance"], "roles": ["reviewer"] }groupsclaim now carries normalized organizational group paths without the leading/.rolesclaim now carries M8Flow permission roles.rolesclaim, the backend still falls back torealm_access.roles.Type
Changes
Testing
Automated coverage in this branch
test_apply_promotes_submitted_form_data_into_workflow_data_objectsandtest_evaluate_exposes_rehydrated_data_objects_without_external_contextcover persistence and rehydration of script-producedlane_owners.test_get_potential_owners_from_task_lane_owners_win_over_group_assignmentcovers explicitlane_ownersoverriding lane group lookup.test_get_potential_owners_from_task_resolves_bare_lane_to_existing_org_groupandtest_get_potential_owners_from_task_resolves_full_path_lane_to_existing_org_groupcover lane assignment through Keycloak/M8Flow groups when nolane_ownersare present.test_get_potential_owners_from_task_keeps_lane_assignment_for_existing_empty_groupcovers the empty-group case where no error is raised if the local M8Flow group exists.test_get_potential_owners_from_task_raises_when_no_matching_group_exists,test_validate_queued_follow_up_work_turns_missing_lane_assignment_into_api_error, andtest_apply_preflights_queued_form_submissions_before_returningcover fail-fast errors when lane assignment cannot resolve locally.test_create_user_from_sign_in_syncs_roles_and_org_groups_separatelycovers separate syncing of organizational groups and permission roles from the new token layout.test_tenant_user_access_token_separates_groups_and_roles_claimscovers the new Keycloak token shape.test_apply_waiting_group_assignments_only_applies_current_tenant_groupscovers tenant-safe delayed assignment when a matching local group already exists and a user logs in later.Recommended regression scenarios
lane_ownersfor all lanes: verify every lane resolves to the explicit usernames and bypasses group lookup.lane_ownersfor only some lanes: verify lanes present inlane_ownersuse explicit users and omitted lanes fall back to group-based resolution.lane_owners: verify assignment resolves from Keycloak organizational groups synced into M8Flow local groups.lane_ownerthat does not exist in M8Flow DB: verify task processing fails withNo users found in task data lane owner list for lane ....Related Issues
Closes #