-
Notifications
You must be signed in to change notification settings - Fork 66
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
Resolve role sharing conflicts in app sharing #413
base: main
Are you sure you want to change the base?
Resolve role sharing conflicts in app sharing #413
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #413 +/- ##
============================================
- Coverage 29.01% 28.69% -0.33%
Complexity 385 385
============================================
Files 50 50
Lines 4146 4193 +47
Branches 478 483 +5
============================================
Hits 1203 1203
- Misses 2842 2889 +47
Partials 101 101 ☔ View full report in Codecov by Sentry. |
private static final String ALLOWED_AUDIENCE_FOR_ASSOCIATED_ROLES = "allowedAudienceForAssociatedRoles"; | ||
private final ExecutorService executorService = Executors.newFixedThreadPool(5); | ||
public static final String AUDIT_MESSAGE_TEMPLATE = "Initiator : %s | Action : %s | Data : { %s } | Result : %s "; |
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 no longer use this approach to do audit logs
Need to use central logger components audit log publishing
throw new IdentityEventException(String.format("Role %s already exists in the shared " + | ||
"organization %s.", roleV2.getName(), sharedOrganizationId)); |
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.
throw new IdentityEventException(String.format("Role %s already exists in the shared " + | |
"organization %s.", roleV2.getName(), sharedOrganizationId)); | |
throw new IdentityEventException(String.format("Organization %s has a non shared role with name %s, ", sharedOrganizationId, roleV2.getName())); |
@@ -72,6 +76,9 @@ public void handleEvent(Event event) throws IdentityEventException { | |||
case IdentityEventConstants.Event.POST_ADD_ROLE_V2_EVENT: | |||
createSharedRolesOnNewRoleCreation(eventProperties); | |||
break; | |||
case "PRE_SHARE_APPLICATION": |
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.
Use OrgApplicationMgtConstants defined for this event
Add unit tests |
Purpose
role01
and an organization audience application will be shared from the root organization and root organization contains a role namedrole01
role01
and already an organization audienace app is shared. Now in the root organization a new organization role will be created with a namerole01
.role01
and already an organization audienace app is shared. Now in the root organization an existing role is renamed torole01
.[1] wso2/product-is#21208
Goals
Approach