diff --git a/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.common/pom.xml b/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.common/pom.xml index 3afc9929f7..313e49d51f 100644 --- a/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.expired.password.identification - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.v1/pom.xml b/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.v1/pom.xml index f44f46a05c..05f3fa8454 100644 --- a/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.expired.password.identification/org.wso2.carbon.identity.api.expired.password.identification.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.expired.password.identification - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.expired.password.identification/pom.xml b/components/org.wso2.carbon.identity.api.expired.password.identification/pom.xml index 8166dfeba4..64faabe4fe 100644 --- a/components/org.wso2.carbon.identity.api.expired.password.identification/pom.xml +++ b/components/org.wso2.carbon.identity.api.expired.password.identification/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.common/pom.xml b/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.common/pom.xml index e86a2587d6..0f16d10d9d 100644 --- a/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.idle.account.identification - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.v1/pom.xml b/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.v1/pom.xml index cc721c8058..e7f7ea9405 100644 --- a/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.idle.account.identification/org.wso2.carbon.identity.api.idle.account.identification.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.idle.account.identification - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.idle.account.identification/pom.xml b/components/org.wso2.carbon.identity.api.idle.account.identification/pom.xml index b97c9dc330..7509c28cc5 100644 --- a/components/org.wso2.carbon.identity.api.idle.account.identification/pom.xml +++ b/components/org.wso2.carbon.identity.api.idle.account.identification/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.common/pom.xml index 16d9d0e0b3..a5811b3d6f 100644 --- a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.action.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/pom.xml index 259e1b93e5..4c6096fadd 100644 --- a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.action.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml @@ -53,6 +53,11 @@ org.wso2.carbon.identity.user.pre.update.profile.action provided + + org.wso2.carbon.identity.organization.management.core + org.wso2.carbon.identity.organization.management.service + provided + com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider diff --git a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/constants/ActionMgtEndpointConstants.java b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/constants/ActionMgtEndpointConstants.java index 42c1585863..056c042c1c 100644 --- a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/constants/ActionMgtEndpointConstants.java +++ b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/constants/ActionMgtEndpointConstants.java @@ -51,6 +51,8 @@ public enum ErrorMessage { ERROR_INVALID_RULE("60013", "Invalid rule.", "%s"), ERROR_INVALID_PAYLOAD("60014", "Invalid Request body.", "Provided request body content is not in the expected format."), + ERROR_NOT_ALLOWED_ACTION_TYPE_IN_ORG_LEVEL("60015", "Action type is not allowed.", + "The requested action type: %s is not allowed at the organization level."), // Server errors. ERROR_NOT_IMPLEMENTED_ACTION_TYPE("650015", diff --git a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/core/ServerActionManagementService.java b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/core/ServerActionManagementService.java index eff09509da..afea047dd6 100644 --- a/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/core/ServerActionManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/src/main/java/org/wso2/carbon/identity/api/server/action/management/v1/core/ServerActionManagementService.java @@ -22,6 +22,7 @@ import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.action.management.api.exception.ActionMgtException; +import org.wso2.carbon.identity.action.management.api.exception.ActionMgtServerException; import org.wso2.carbon.identity.action.management.api.model.Action; import org.wso2.carbon.identity.action.management.api.service.ActionManagementService; import org.wso2.carbon.identity.api.server.action.management.v1.ActionBasicResponse; @@ -34,6 +35,8 @@ import org.wso2.carbon.identity.api.server.action.management.v1.mapper.ActionMapperFactory; import org.wso2.carbon.identity.api.server.action.management.v1.util.ActionDeserializer; import org.wso2.carbon.identity.api.server.action.management.v1.util.ActionMgtEndpointUtil; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; +import org.wso2.carbon.identity.organization.management.service.util.OrganizationManagementUtil; import java.util.ArrayList; import java.util.Arrays; @@ -45,6 +48,7 @@ import javax.ws.rs.core.Response; import static org.wso2.carbon.identity.api.server.action.management.v1.constants.ActionMgtEndpointConstants.ErrorMessage.ERROR_INVALID_ACTION_TYPE; +import static org.wso2.carbon.identity.api.server.action.management.v1.constants.ActionMgtEndpointConstants.ErrorMessage.ERROR_NOT_ALLOWED_ACTION_TYPE_IN_ORG_LEVEL; import static org.wso2.carbon.identity.api.server.action.management.v1.constants.ActionMgtEndpointConstants.ErrorMessage.ERROR_NOT_IMPLEMENTED_ACTION_TYPE; import static org.wso2.carbon.identity.api.server.action.management.v1.constants.ActionMgtEndpointConstants.ErrorMessage.ERROR_NO_ACTION_FOUND_ON_GIVEN_ACTION_TYPE_AND_ID; @@ -56,6 +60,7 @@ public class ServerActionManagementService { private final ActionManagementService actionManagementService; private static final Log LOG = LogFactory.getLog(ServerActionManagementService.class); private static final Set NOT_IMPLEMENTED_ACTION_TYPES = new HashSet<>(); + private static final Set NOT_ALLOWED_ACTION_TYPES_IN_ORG_LEVEL = new HashSet<>(); public ServerActionManagementService(ActionManagementService actionManagementService) { @@ -65,6 +70,8 @@ public ServerActionManagementService(ActionManagementService actionManagementSer static { NOT_IMPLEMENTED_ACTION_TYPES.add(Action.ActionTypes.PRE_REGISTRATION.getPathParam()); NOT_IMPLEMENTED_ACTION_TYPES.add(Action.ActionTypes.AUTHENTICATION.getPathParam()); + + NOT_ALLOWED_ACTION_TYPES_IN_ORG_LEVEL.add(Action.ActionTypes.PRE_ISSUE_ACCESS_TOKEN.getPathParam()); } public ActionResponse createAction(String actionType, String jsonBody) { @@ -170,15 +177,17 @@ public List getActionTypes() { List actionTypesResponseItems = new ArrayList<>(); for (Action.ActionTypes actionType : Action.ActionTypes.filterByCategory( Action.ActionTypes.Category.PRE_POST)) { - - if (!NOT_IMPLEMENTED_ACTION_TYPES.contains(actionType.getPathParam())) { - actionTypesResponseItems.add(new ActionTypesResponseItem() - .type(ActionType.valueOf(actionType.getActionType())) - .displayName(actionType.getDisplayName()) - .description(actionType.getDescription()) - .count(actionsCountPerType.getOrDefault(actionType.getActionType(), 0)) - .self(ActionMgtEndpointUtil.buildURIForActionType(actionType.getActionType()))); + if (NOT_IMPLEMENTED_ACTION_TYPES.contains(actionType.getPathParam()) || (isOrganization() && + NOT_ALLOWED_ACTION_TYPES_IN_ORG_LEVEL.contains(actionType.getPathParam()))) { + continue; } + + actionTypesResponseItems.add(new ActionTypesResponseItem() + .type(ActionType.valueOf(actionType.getActionType())) + .displayName(actionType.getDisplayName()) + .description(actionType.getDescription()) + .count(actionsCountPerType.getOrDefault(actionType.getActionType(), 0)) + .self(ActionMgtEndpointUtil.buildURIForActionType(actionType.getActionType()))); } return actionTypesResponseItems; @@ -245,7 +254,7 @@ private Action buildUpdatingAction(Action.ActionTypes actionType, String jsonBod return actionMapper.toAction(actionUpdateModel); } - private Action.ActionTypes validateActionType(String actionType) { + private Action.ActionTypes validateActionType(String actionType) throws ActionMgtException { Action.ActionTypes actionTypeEnum = getActionTypeFromPath(actionType); @@ -253,6 +262,10 @@ private Action.ActionTypes validateActionType(String actionType) { throw ActionMgtEndpointUtil.handleException(Response.Status.NOT_IMPLEMENTED, ERROR_NOT_IMPLEMENTED_ACTION_TYPE); } + if (isOrganization() && NOT_ALLOWED_ACTION_TYPES_IN_ORG_LEVEL.contains(actionTypeEnum.getPathParam())) { + throw ActionMgtEndpointUtil.handleException(Response.Status.FORBIDDEN, + ERROR_NOT_ALLOWED_ACTION_TYPE_IN_ORG_LEVEL, actionTypeEnum.getActionType()); + } return actionTypeEnum; } @@ -265,4 +278,13 @@ private Action.ActionTypes getActionTypeFromPath(String actionType) { .orElseThrow(() -> ActionMgtEndpointUtil.handleException(Response.Status.BAD_REQUEST, ERROR_INVALID_ACTION_TYPE)); } + + private boolean isOrganization() throws ActionMgtException { + + try { + return OrganizationManagementUtil.isOrganization(CarbonContext.getThreadLocalCarbonContext().getTenantId()); + } catch (OrganizationManagementException e) { + throw new ActionMgtServerException("Error while checking if the tenant is an organization.", e); + } + } } diff --git a/components/org.wso2.carbon.identity.api.server.action.management/pom.xml b/components/org.wso2.carbon.identity.api.server.action.management/pom.xml index bc8fd33556..721d6d4e69 100644 --- a/components/org.wso2.carbon.identity.api.server.action.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.action.management/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.common/pom.xml index d65e69f3dd..cd2a654de3 100644 --- a/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.common/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.api.server.admin.advisory.management org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.v1/pom.xml index 076ff6c58c..a626cae50f 100644 --- a/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.admin.advisory.management/org.wso2.carbon.identity.api.server.admin.advisory.management.v1/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.api.server.admin.advisory.management org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.admin.advisory.management/pom.xml b/components/org.wso2.carbon.identity.api.server.admin.advisory.management/pom.xml index 8f66894a79..f2140634f0 100644 --- a/components/org.wso2.carbon.identity.api.server.admin.advisory.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.admin.advisory.management/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml index 70c701b1aa..7e0ffe4ecc 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.api.resource - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml index 915170f310..98fb888d3c 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.api.resource - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/pom.xml index 33256e3450..d08563ef3b 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/pom.xml @@ -22,7 +22,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/pom.xml index 71c47dc50d..db4d7834e2 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.common/pom.xml @@ -22,12 +22,12 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.application.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml org.wso2.carbon.identity.api.server.application.management.common - 1.3.153 + 1.3.156-SNAPSHOT jar diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml index 2db26bb3dc..cca294883f 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.application.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml WSO2 Identity Server - Applications Rest API WSO2 Identity Server - Applications Rest API org.wso2.carbon.identity.api.server.application.management.v1 - 1.3.153 + 1.3.156-SNAPSHOT jar diff --git a/components/org.wso2.carbon.identity.api.server.application.management/pom.xml b/components/org.wso2.carbon.identity.api.server.application.management/pom.xml index f9c3bf28f1..b8d76fb8c2 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.application.management/pom.xml @@ -22,12 +22,12 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml org.wso2.carbon.identity.api.server.application.management - 1.3.153 + 1.3.156-SNAPSHOT pom diff --git a/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.common/pom.xml index 2e4ad09d5f..718b5100ca 100644 --- a/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.asynchronous.operation.status.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.v1/pom.xml index e6879c0e3b..11cf56bdd4 100644 --- a/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.asynchronous.operation.status.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/pom.xml b/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/pom.xml index 2231de4557..8d0a735b08 100644 --- a/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/pom.xml b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/pom.xml index 11a84f66f8..ca26cdcadf 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.authenticators - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.authenticators.common diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/pom.xml index d810121614..f7d789cfe8 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.authenticators - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.authenticators.v1 diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/pom.xml b/components/org.wso2.carbon.identity.api.server.authenticators/pom.xml index 59ea738768..2659ba5f62 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.authenticators/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.common/pom.xml index f07bc2089e..289ed3e53a 100644 --- a/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.common/pom.xml @@ -24,7 +24,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.branding.preference.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.server.api diff --git a/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.v1/pom.xml index 263b9f8f4b..6dacbc6375 100644 --- a/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.branding.preference.management/org.wso2.carbon.identity.api.server.branding.preference.management.v1/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.api.server.branding.preference.management org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.branding.preference.management/pom.xml b/components/org.wso2.carbon.identity.api.server.branding.preference.management/pom.xml index f5d2bd677a..d0c735e538 100644 --- a/components/org.wso2.carbon.identity.api.server.branding.preference.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.branding.preference.management/pom.xml @@ -22,7 +22,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.common/pom.xml index 3094487a04..b756164dce 100644 --- a/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.certificate.validation.management - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.certificate.validation.management.common diff --git a/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.v1/pom.xml index 69a4c4d944..5f02b8cfbc 100644 --- a/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.certificate.validation.management/org.wso2.carbon.identity.api.server.certificate.validation.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.certificate.validation.management - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.certificate.validation.management.v1 diff --git a/components/org.wso2.carbon.identity.api.server.certificate.validation.management/pom.xml b/components/org.wso2.carbon.identity.api.server.certificate.validation.management/pom.xml index 046fcedb85..086dcfe258 100644 --- a/components/org.wso2.carbon.identity.api.server.certificate.validation.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.certificate.validation.management/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml index 320989b253..cc5db8d4ab 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.api.server.claim.management org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.claim.management.common diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml index 337931dda7..9ae1fd4ebf 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.claim.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.rest.api.server.claim.management.v1 diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/pom.xml b/components/org.wso2.carbon.identity.api.server.claim.management/pom.xml index c2eb59eff9..44ce6880b0 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.claim.management/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.common/pom.xml b/components/org.wso2.carbon.identity.api.server.common/pom.xml index cb464938fa..572d8d6e79 100644 --- a/components/org.wso2.carbon.identity.api.server.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.common/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.common/pom.xml b/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.common/pom.xml index 0a56e9dccb..093819a276 100644 --- a/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.configs - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.configs.common diff --git a/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.v1/pom.xml index a5710757b0..43a50fd6e7 100644 --- a/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.configs/org.wso2.carbon.identity.api.server.configs.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.configs - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.configs.v1 diff --git a/components/org.wso2.carbon.identity.api.server.configs/pom.xml b/components/org.wso2.carbon.identity.api.server.configs/pom.xml index 281f0a0570..a0adb00f88 100644 --- a/components/org.wso2.carbon.identity.api.server.configs/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.configs/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.common/pom.xml b/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.common/pom.xml index b43b1be6ba..f871340a9d 100644 --- a/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.cors - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.cors.common diff --git a/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.v1/pom.xml index 88fa00d07b..055ee6e097 100644 --- a/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.cors/org.wso2.carbon.identity.api.server.cors.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.cors - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.cors.v1 diff --git a/components/org.wso2.carbon.identity.api.server.cors/pom.xml b/components/org.wso2.carbon.identity.api.server.cors/pom.xml index 8551087c41..aa5c098fe8 100644 --- a/components/org.wso2.carbon.identity.api.server.cors/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.cors/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.api.server.email.template.common/pom.xml b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.api.server.email.template.common/pom.xml index 6077880c98..917d9ef7af 100644 --- a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.api.server.email.template.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.api.server.email.template.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.email.template - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v1/pom.xml index c48902a44f..3c9cb9c7c1 100644 --- a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.email.template - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/pom.xml b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/pom.xml index f264410705..8b6a311d57 100644 --- a/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.email.template/org.wso2.carbon.identity.rest.api.server.email.template.v2/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.email.template - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.email.template/pom.xml b/components/org.wso2.carbon.identity.api.server.email.template/pom.xml index dc193cac68..121447d7d0 100644 --- a/components/org.wso2.carbon.identity.api.server.email.template/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.email.template/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.common/pom.xml index b9b6a3f61e..e8b2c154bf 100644 --- a/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.common/pom.xml @@ -19,7 +19,7 @@ org.wso2.carbon.identity.api.server.extension.management org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.v1/pom.xml index d24a7a0f3b..068f2fc48d 100644 --- a/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.extension.management/org.wso2.carbon.identity.api.server.extension.management.v1/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.extension.management - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.extension.management.v1 diff --git a/components/org.wso2.carbon.identity.api.server.extension.management/pom.xml b/components/org.wso2.carbon.identity.api.server.extension.management/pom.xml index 452227a050..3d7a0d6108 100644 --- a/components/org.wso2.carbon.identity.api.server.extension.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.extension.management/pom.xml @@ -19,7 +19,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.common/pom.xml b/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.common/pom.xml index 3888661368..0fcc259ec1 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.flow.execution ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.flow.execution.common diff --git a/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/pom.xml index 358e6ff79a..8c99ba79d9 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.flow.execution ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.flow.execution.v1 diff --git a/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java b/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java index 1e9ce9442a..a1a84eaa35 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java +++ b/components/org.wso2.carbon.identity.api.server.flow.execution/org.wso2.carbon.identity.api.server.flow.execution.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/execution/v1/utils/Utils.java @@ -291,7 +291,6 @@ public static void validateFlowInitiation(FlowExecutionRequest flowExecutionRequ String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); if (REGISTRATION.getType().equals(flowType)) { - Utils.isSelfRegistrationEnabled(tenantDomain); Utils.isDynamicRegistrationPortalEnabled(tenantDomain); } else if (PASSWORD_RECOVERY.getType().equals(flowType) || INVITED_USER_REGISTRATION.getType().equals(flowType)) { diff --git a/components/org.wso2.carbon.identity.api.server.flow.execution/pom.xml b/components/org.wso2.carbon.identity.api.server.flow.execution/pom.xml index 737cfaeaa7..8c689534fd 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.execution/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.flow.execution/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.common/pom.xml index 33b637c202..5597e4c25e 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.flow.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/pom.xml index c52f3eb3b7..f3af368514 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.flow.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/constants/FlowEndpointConstants.java b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/constants/FlowEndpointConstants.java index bad98b78ba..af85b3f532 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/constants/FlowEndpointConstants.java +++ b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/constants/FlowEndpointConstants.java @@ -79,7 +79,11 @@ public enum ErrorMessages { ERROR_CODE_DUPLICATE_COMPONENT_ID("10006", "Duplicate component ID found in the flow.", - "All component IDs must be unique across the entire flow."); + "All component IDs must be unique across the entire flow."), + + ERROR_CODE_INVALID_METADATA("10007", + "Invalid metadata provided for the executor.", + "The metadata provided for the executor is invalid."); private final String code; private final String message; diff --git a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/utils/Utils.java b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/utils/Utils.java index a7bfb2910d..3ccc07d7a7 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/utils/Utils.java +++ b/components/org.wso2.carbon.identity.api.server.flow.management/org.wso2.carbon.identity.api.server.flow.management.v1/src/main/java/org/wso2/carbon/identity/api/server/flow/management/v1/utils/Utils.java @@ -41,6 +41,7 @@ import org.wso2.carbon.identity.api.server.flow.management.v1.response.handlers.AbstractMetaResponseHandler; import org.wso2.carbon.identity.application.common.model.IdentityProvider; import org.wso2.carbon.identity.application.common.model.Property; +import org.wso2.carbon.identity.core.util.LambdaExceptionUtils; import org.wso2.carbon.identity.flow.mgt.Constants; import org.wso2.carbon.identity.flow.mgt.exception.FlowMgtClientException; import org.wso2.carbon.identity.flow.mgt.exception.FlowMgtFrameworkException; @@ -73,7 +74,6 @@ import static org.wso2.carbon.identity.api.server.flow.management.v1.constants.FlowEndpointConstants.ErrorMessages.ERROR_CODE_GET_GOVERNANCE_CONFIG; import static org.wso2.carbon.identity.api.server.flow.management.v1.constants.FlowEndpointConstants.ErrorMessages.ERROR_CODE_GET_LOCAL_AUTHENTICATORS; import static org.wso2.carbon.identity.api.server.flow.management.v1.constants.FlowEndpointConstants.ErrorMessages.ERROR_CODE_UNSUPPORTED_EXECUTOR; -import static org.wso2.carbon.identity.api.server.flow.management.v1.constants.FlowEndpointConstants.Schema.IDP_NAME; import static org.wso2.carbon.identity.api.server.flow.management.v1.constants.FlowEndpointConstants.USERNAME_IDENTIFIER; import static org.wso2.carbon.identity.api.server.flow.management.v1.constants.FlowEndpointConstants.USER_IDENTIFIER; @@ -204,15 +204,9 @@ private static Executor convertToExecutor(ExecutorDTO executorDTO) { return null; } - Executor executor = new Executor() - .name(executorDTO.getName()); - - if (executorDTO.getIdpName() != null) { - Map meta = new java.util.HashMap<>(); - meta.put(IDP_NAME, executorDTO.getIdpName()); - executor.meta(meta); - } - return executor; + return new Executor() + .name(executorDTO.getName()) + .meta(convertToMap(executorDTO.getMetadata())); } /** @@ -288,8 +282,20 @@ private static ExecutorDTO convertToExecutorDTO(Executor executor) { ExecutorDTO executorDTO = new ExecutorDTO.Builder().name(executor.getName()).build(); Map meta = convertToMap(executor.getMeta()); - if (meta != null && !meta.isEmpty() && meta.containsKey(IDP_NAME)) { - executorDTO.setIdpName(String.valueOf(meta.get(IDP_NAME))); + if (meta != null && !meta.isEmpty()) { + ObjectMapper objectMapper = new ObjectMapper(); + try { + meta.forEach(LambdaExceptionUtils.rethrowBiConsumer((name, value) -> { + executorDTO.addMetadata(name, value instanceof String + ? (String) value + : objectMapper.writeValueAsString(value)); + })); + } catch (Exception e) { + throw handleFlowMgtException(new FlowMgtClientException( + FlowEndpointConstants.ErrorMessages.ERROR_CODE_INVALID_METADATA.getCode(), + FlowEndpointConstants.ErrorMessages.ERROR_CODE_INVALID_METADATA.getMessage(), + FlowEndpointConstants.ErrorMessages.ERROR_CODE_INVALID_METADATA.getDescription(), e)); + } } return executorDTO; } diff --git a/components/org.wso2.carbon.identity.api.server.flow.management/pom.xml b/components/org.wso2.carbon.identity.api.server.flow.management/pom.xml index fb18efc1fd..d94e70b1b8 100644 --- a/components/org.wso2.carbon.identity.api.server.flow.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.flow.management/pom.xml @@ -22,7 +22,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.common/pom.xml b/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.common/pom.xml index d9a86ffb09..575ddf7e34 100644 --- a/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.common/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.api.server.identity.governance org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.v1/pom.xml index 195e06faf1..cb77aecdb5 100644 --- a/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.identity.governance/org.wso2.carbon.identity.api.server.identity.governance.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.identity.governance ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.identity.governance.v1 diff --git a/components/org.wso2.carbon.identity.api.server.identity.governance/pom.xml b/components/org.wso2.carbon.identity.api.server.identity.governance/pom.xml index 1594a50bb8..59a818da61 100644 --- a/components/org.wso2.carbon.identity.api.server.identity.governance/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.identity.governance/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.common/pom.xml b/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.common/pom.xml index 04571d8a04..c3b2502292 100644 --- a/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.api.server.idp org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.v1/pom.xml index 66396d570f..c0a4dc10cf 100644 --- a/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.idp/org.wso2.carbon.identity.api.server.idp.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.idp ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.idp/pom.xml b/components/org.wso2.carbon.identity.api.server.idp/pom.xml index ebc6031d1e..814ba674e8 100644 --- a/components/org.wso2.carbon.identity.api.server.idp/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.idp/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.common/pom.xml b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.common/pom.xml index 7cb509b51a..081308b5da 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.idv.provider ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.idv.provider.common diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/pom.xml index 8c4f49793d..0933323c40 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.idv.provider ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.idv.provider.v1 diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/pom.xml b/components/org.wso2.carbon.identity.api.server.idv.provider/pom.xml index 59b3480e28..abef10bffd 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.common/pom.xml b/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.common/pom.xml index ac09be9c34..8a46f89404 100644 --- a/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.api.server.input.validation org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.v1/pom.xml index 8f21099029..fc8d6b11ec 100644 --- a/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.input.validation/org.wso2.carbon.identity.api.server.input.validation.v1/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.input.validation - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml WSO2 Identity Server - Input Validation Rest API WSO2 Identity Server - Validation Rest API org.wso2.carbon.identity.api.server.input.validation.v1 - 1.3.153 + 1.3.156-SNAPSHOT jar diff --git a/components/org.wso2.carbon.identity.api.server.input.validation/pom.xml b/components/org.wso2.carbon.identity.api.server.input.validation/pom.xml index b0281b79f5..c30223d1ac 100644 --- a/components/org.wso2.carbon.identity.api.server.input.validation/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.input.validation/pom.xml @@ -22,7 +22,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.common/pom.xml index 2d563a7fa8..78d225c872 100644 --- a/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.keystore.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.keystore.management.common diff --git a/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.v1/pom.xml index a1d730062a..e25f35f6e5 100644 --- a/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.keystore.management/org.wso2.carbon.identity.api.server.keystore.management.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.keystore.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.keystore.management.v1 diff --git a/components/org.wso2.carbon.identity.api.server.keystore.management/pom.xml b/components/org.wso2.carbon.identity.api.server.keystore.management/pom.xml index a8246bbd34..f2248797ca 100644 --- a/components/org.wso2.carbon.identity.api.server.keystore.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.keystore.management/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.common/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.common/pom.xml index cf0d1a3382..6122876cd4 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.api.server.notification.sender org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v1/pom.xml index a1eb7e2273..1e606a942c 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.api.server.notification.sender org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v2/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v2/pom.xml index 7893ba1838..6fb6cda6ca 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v2/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.sender/org.wso2.carbon.identity.api.server.notification.sender.v2/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.api.server.notification.sender org.wso2.carbon.identity.server.api ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.notification.sender/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.sender/pom.xml index c6e02f557d..e02a648ae3 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.sender/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.sender/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.api.server.notification.template.common/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.api.server.notification.template.common/pom.xml index 909db8cf90..ff18f8c47a 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.api.server.notification.template.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.api.server.notification.template.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.notification.template - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.rest.api.server.notification.template.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.rest.api.server.notification.template.v1/pom.xml index e338d8a2af..86f5eb65ec 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.rest.api.server.notification.template.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.template/org.wso2.carbon.identity.rest.api.server.notification.template.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.notification.template - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.notification.template/pom.xml b/components/org.wso2.carbon.identity.api.server.notification.template/pom.xml index e1c14e965a..7f03353337 100644 --- a/components/org.wso2.carbon.identity.api.server.notification.template/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.notification.template/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.common/pom.xml index 7388fa5cda..05d6c4d5ff 100644 --- a/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.oidc.scope.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.v1/pom.xml index a6acba4d9a..4972196a5f 100644 --- a/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oidc.scope.management/org.wso2.carbon.identity.api.server.oidc.scope.management.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.oidc.scope.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.oidc.scope.management.v1 diff --git a/components/org.wso2.carbon.identity.api.server.oidc.scope.management/pom.xml b/components/org.wso2.carbon.identity.api.server.oidc.scope.management/pom.xml index ae8d9fed9c..b783b24c20 100644 --- a/components/org.wso2.carbon.identity.api.server.oidc.scope.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oidc.scope.management/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common/pom.xml new file mode 100644 index 0000000000..2a24e21b6a --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common/pom.xml @@ -0,0 +1,99 @@ + + + + 4.0.0 + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.organization.agent.sharing.management + 1.3.156-SNAPSHOT + ../pom.xml + + + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common + jar + + + + org.wso2.carbon.identity.organization.management + org.wso2.carbon.identity.organization.management.organization.user.sharing + + + org.wso2.carbon.identity.organization.management + org.wso2.carbon.identity.organization.resource.sharing.policy.management + provided + + + org.apache.cxf + cxf-rt-frontend-jaxrs + provided + + + org.apache.cxf + cxf-rt-rs-service-description + provided + + + javax.ws.rs + javax.ws.rs-api + provided + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + provided + + + io.swagger + swagger-jaxrs + provided + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + javax.ws.rs + jsr311-api + + + com.google.guava + guava + + + + + + + 8 + 8 + UTF-8 + + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/common/constants/AgentSharingMgtConstants.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/common/constants/AgentSharingMgtConstants.java new file mode 100644 index 0000000000..1dd036a2ba --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/common/constants/AgentSharingMgtConstants.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants; + +/** + * Holds the constants which the agent sharing management API component is using. + */ +public class AgentSharingMgtConstants { + + public static final String ERROR_PREFIX = "USM-"; + + public static final String AGENT_IDS = "agentIds"; + + public static final String RESPONSE_STATUS_PROCESSING = "Processing"; + public static final String RESPONSE_DETAIL_AGENT_SHARE = "Agent sharing process triggered successfully."; + public static final String RESPONSE_DETAIL_AGENT_UNSHARE = "Agent unsharing process triggered successfully."; + + /** + * Enum for agent sharing management related errors. + * Error Code - code to identify the error. + * Error Message - What went wrong. + * Error Description - Why it went wrong. + */ + public enum ErrorMessage { + + // Client errors. + INVALID_SELECTIVE_AGENT_SHARE_REQUEST_BODY("60000", + "Invalid selective agent share request body.", + "The agent criteria provided for selective sharing is either null or empty. " + + "Please provide valid selective agent sharing criteria."), + INVALID_GENERAL_AGENT_SHARE_REQUEST_BODY("60001", + "Invalid general agent share request body.", + "The agent criteria provided for general sharing is either null or empty. " + + "Please provide valid general agent sharing criteria."), + INVALID_SELECTIVE_AGENT_UNSHARE_REQUEST_BODY("60002", + "Invalid selective agent unshare request body.", + "The agent criteria provided for selective unsharing is either null or empty. " + + "Please provide valid selective agent unsharing criteria."), + INVALID_GENERAL_AGENT_UNSHARE_REQUEST_BODY("60003", + "Invalid general agent unshare request body.", + "The agent criteria provided for general unsharing is either null or empty. " + + "Please provide valid general agent unsharing criteria."), + INVALID_UUID_FORMAT("60004", + "Invalid UUID format.", + "The UUID provided in the request is not in a valid format. " + + "Please provide a valid UUID."), + + // Server errors. + ERROR_INITIATING_AGENTS_API_SERVICE("65001", + "Error initiating AgentsApiService.", + "Error occurred while initiating AgentsApiService."); + + private final String code; + private final String message; + private final String description; + + ErrorMessage(String code, String message, String description) { + + this.code = code; + this.message = message; + this.description = description; + } + + public String getCode() { + + return ERROR_PREFIX + code; + } + + public String getMessage() { + + return message; + } + + public String getDescription() { + + return description; + } + + @Override + public String toString() { + + return code + " | " + message; + } + } +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/pom.xml new file mode 100644 index 0000000000..0e0da11f8b --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/pom.xml @@ -0,0 +1,188 @@ + + + + 4.0.0 + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.organization.agent.sharing.management + 1.3.156-SNAPSHOT + ../pom.xml + + + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1 + jar + + + + javax.ws.rs + javax.ws.rs-api + provided + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + provided + + + org.apache.cxf + cxf-rt-frontend-jaxrs + provided + + + org.apache.cxf + cxf-rt-rs-service-description + provided + + + io.swagger + swagger-jaxrs + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + javax.ws.rs + jsr311-api + + + com.google.guava + guava + + + + + org.wso2.carbon.identity.framework + org.wso2.carbon.identity.core + provided + + + org.wso2.carbon + org.wso2.carbon.user.core + provided + + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common + + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.common + provided + + + org.wso2.carbon.identity.organization.management + org.wso2.carbon.identity.organization.management.organization.user.sharing + provided + + + org.wso2.carbon.identity.organization.management + org.wso2.carbon.identity.organization.resource.sharing.policy.management + provided + + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.organization.user.sharing.management.common + provided + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.8 + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.plugin.version} + + 1.8 + 1.8 + + + + + + + 8 + 8 + UTF-8 + + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/AgentsApi.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/AgentsApi.java new file mode 100644 index 0000000000..636807bcf6 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/AgentsApi.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1; + +import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.cxf.jaxrs.ext.multipart.Multipart; +import java.io.InputStream; +import java.util.List; + +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.factories.AgentsApiServiceFactory; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedRolesResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.Error; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.ProcessSuccessResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.AgentsApiService; + +import javax.validation.Valid; +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@Path("/agents") +@Api(description = "The agents API") + +public class AgentsApi { + + private final AgentsApiService delegate; + + public AgentsApi() { + + this.delegate = AgentsApiServiceFactory.getAgentsApi(); + } + + @Valid + @GET + @Path("/{agentId}/shared-organizations") + + @Produces({ "application/json" }) + @ApiOperation(value = "Get organizations a agent has access to", notes = "This API retrieves the list of organizations where the specified agent has shared access, with support for pagination and filtering. Scope(Permission) required: `internal_agent_shared_access_view` ", response = AgentSharedOrganizationsResponse.class, tags={ "Agent Accessible Organizations", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successful Response with Accessible Organizations", response = AgentSharedOrganizationsResponse.class), + @ApiResponse(code = 400, message = "Bad Request", response = Error.class), + @ApiResponse(code = 500, message = "Internal Server Error", response = Error.class) + }) + public Response agentsAgentIdSharedOrganizationsGet(@ApiParam(value = "The ID of the agent whose accessible organizations are being retrieved.",required=true) @PathParam("agentId") String agentId, @Valid@ApiParam(value = "The cursor pointing to the item after which the next page of results should be returned.") @QueryParam("after") String after, @Valid@ApiParam(value = "The cursor pointing to the item before which the previous page of results should be returned.") @QueryParam("before") String before, @Valid@ApiParam(value = "The maximum number of results to return per page.") @QueryParam("limit") Integer limit, @Valid@ApiParam(value = "A filter to apply to the results, such as by organization name or other criteria.") @QueryParam("filter") String filter, @Valid@ApiParam(value = "Whether to retrieve organizations recursively, including child organizations.", defaultValue="false") @DefaultValue("false") @QueryParam("recursive") Boolean recursive) { + + return delegate.agentsAgentIdSharedOrganizationsGet(agentId, after, before, limit, filter, recursive ); + } + + @Valid + @GET + @Path("/{agentId}/shared-roles") + + @Produces({ "application/json" }) + @ApiOperation(value = "Get roles assigned to a agent in an organization", notes = "This API fetches the roles assigned to the specified agent within a particular organization, with support for pagination, filtering, and recursion. Scope(Permission) required: `internal_agent_shared_access_view` ", response = AgentSharedRolesResponse.class, tags={ "Agent Accessible Roles", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successful Response with Accessible Roles", response = AgentSharedRolesResponse.class), + @ApiResponse(code = 400, message = "Bad Request", response = Error.class), + @ApiResponse(code = 500, message = "Internal Server Error", response = Error.class) + }) + public Response agentsAgentIdSharedRolesGet(@ApiParam(value = "The ID of the agent for whom roles are being retrieved.",required=true) @PathParam("agentId") String agentId, @Valid @NotNull(message = "Property cannot be null.") @ApiParam(value = "The organization ID for which roles are being fetched.",required=true) @QueryParam("orgId") String orgId, @Valid@ApiParam(value = "The cursor pointing to the item after which the next page of results should be returned.") @QueryParam("after") String after, @Valid@ApiParam(value = "The cursor pointing to the item before which the previous page of results should be returned.") @QueryParam("before") String before, @Valid@ApiParam(value = "The maximum number of results to return per page.") @QueryParam("limit") Integer limit, @Valid@ApiParam(value = "Filter to apply when retrieving the roles.") @QueryParam("filter") String filter, @Valid@ApiParam(value = "Set to true to retrieve roles recursively.") @QueryParam("recursive") Boolean recursive) { + + return delegate.agentsAgentIdSharedRolesGet(agentId, orgId, after, before, limit, filter, recursive ); + } + + @Valid + @POST + @Path("/share") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Share a agent across specific organizations", notes = "This API shares one or more agents across specified organizations, assigning roles based on the provided policy. The policy defines the sharing scope for each organization, including whether access extends to child organizations. Scope(Permission) required: `internal_org_user_share` ", response = ProcessSuccessResponse.class, tags={ "Agent Sharing", }) + @ApiResponses(value = { + @ApiResponse(code = 202, message = "Sharing process triggered successfully.", response = ProcessSuccessResponse.class), + @ApiResponse(code = 400, message = "Bad Request", response = Error.class), + @ApiResponse(code = 500, message = "Internal Server Error", response = Error.class) + }) + public Response processAgentSharing(@ApiParam(value = "" ,required=true) @Valid AgentShareRequestBody agentShareRequestBody) { + + return delegate.processAgentSharing(agentShareRequestBody ); + } + + @Valid + @POST + @Path("/share-with-all") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Share a agent with all organizations", notes = "This API shares agents across all organizations, applying the provided roles to each organization. The policy determines the scope of sharing, including whether it applies to all current organizations or future organizations as well. Scope(Permission) required: `internal_agent_share` ", response = ProcessSuccessResponse.class, tags={ "Agent Sharing", }) + @ApiResponses(value = { + @ApiResponse(code = 202, message = "Sharing process triggered successfully.", response = ProcessSuccessResponse.class), + @ApiResponse(code = 400, message = "Bad Request", response = Error.class), + @ApiResponse(code = 500, message = "Internal Server Error", response = Error.class) + }) + public Response processAgentSharingAll(@ApiParam(value = "" ,required=true) @Valid AgentShareWithAllRequestBody agentShareWithAllRequestBody) { + + return delegate.processAgentSharingAll(agentShareWithAllRequestBody ); + } + + @Valid + @POST + @Path("/unshare") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Unshare a agent from specific organizations", notes = "This API removes shared access for one or more agents from specified organizations. The payload includes the list of agent IDs and the organizations from which the agents should be unshared. Scope(Permission) required: `internal_agent_unshare` ", response = ProcessSuccessResponse.class, tags={ "Agent Sharing", }) + @ApiResponses(value = { + @ApiResponse(code = 202, message = "Unsharing process triggered successfully.", response = ProcessSuccessResponse.class), + @ApiResponse(code = 400, message = "Bad Request", response = Error.class), + @ApiResponse(code = 500, message = "Internal Server Error", response = Error.class) + }) + public Response processAgentUnsharing(@ApiParam(value = "" ,required=true) @Valid AgentUnshareRequestBody agentUnshareRequestBody) { + + return delegate.processAgentUnsharing(agentUnshareRequestBody ); + } + + @Valid + @POST + @Path("/unshare-with-all") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Remove a agent's shared access", notes = "This API removes all shared access for one or more agents, unsharing them from all organizations. Scope(Permission) required: `internal_agent_unshare` ", response = ProcessSuccessResponse.class, tags={ "Agent Sharing" }) + @ApiResponses(value = { + @ApiResponse(code = 202, message = "Share removal process triggered successfully.", response = ProcessSuccessResponse.class), + @ApiResponse(code = 400, message = "Bad Request", response = Error.class), + @ApiResponse(code = 500, message = "Internal Server Error", response = Error.class) + }) + public Response removeAgentSharing(@ApiParam(value = "" ,required=true) @Valid AgentUnshareWithAllRequestBody agentUnshareWithAllRequestBody) { + + return delegate.removeAgentSharing(agentUnshareWithAllRequestBody ); + } + +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/AgentsApiService.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/AgentsApiService.java new file mode 100644 index 0000000000..ac8029a89f --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/AgentsApiService.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1; + +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.*; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.*; +import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.cxf.jaxrs.ext.multipart.Multipart; +import java.io.InputStream; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedRolesResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.Error; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.ProcessSuccessResponse; +import javax.ws.rs.core.Response; + + +public interface AgentsApiService { + + public Response agentsAgentIdSharedOrganizationsGet(String agentId, String after, String before, Integer limit, String filter, Boolean recursive); + + public Response agentsAgentIdSharedRolesGet(String agentId, String orgId, String after, String before, Integer limit, String filter, Boolean recursive); + + public Response processAgentSharing(AgentShareRequestBody agentShareRequestBody); + + public Response processAgentSharingAll(AgentShareWithAllRequestBody agentShareWithAllRequestBody); + + public Response processAgentUnsharing(AgentUnshareRequestBody agentUnshareRequestBody); + + public Response removeAgentSharing(AgentUnshareWithAllRequestBody agentUnshareWithAllRequestBody); +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/factories/AgentsApiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/factories/AgentsApiServiceFactory.java new file mode 100644 index 0000000000..42b8d288b4 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/factories/AgentsApiServiceFactory.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.factories; + +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.AgentsApiService; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.impl.AgentsApiServiceImpl; + +public class AgentsApiServiceFactory { + + private final static AgentsApiService service = new AgentsApiServiceImpl(); + + public static AgentsApiService getAgentsApi() + { + return service; + } +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBody.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBody.java new file mode 100644 index 0000000000..16894449c3 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBody.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBodyAgentCriteria; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBodyOrganizations; +import javax.validation.constraints.*; + +/** + * The request body for sharing agents with multiple child organizations. Includes a list of agents, organizations, sharing scope as policy, and roles. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "The request body for sharing agents with multiple child organizations. Includes a list of agents, organizations, sharing scope as policy, and roles. ") +public class AgentShareRequestBody { + + private AgentShareRequestBodyAgentCriteria agentCriteria; + private List organizations = new ArrayList<>(); + + + /** + **/ + public AgentShareRequestBody agentCriteria(AgentShareRequestBodyAgentCriteria agentCriteria) { + + this.agentCriteria = agentCriteria; + return this; + } + + @ApiModelProperty(required = true, value = "") + @JsonProperty("agentCriteria") + @Valid + @NotNull(message = "Property agentCriteria cannot be null.") + + public AgentShareRequestBodyAgentCriteria getAgentCriteria() { + return agentCriteria; + } + public void setAgentCriteria(AgentShareRequestBodyAgentCriteria agentCriteria) { + this.agentCriteria = agentCriteria; + } + + /** + * List of organizations specifying sharing scope and roles. + **/ + public AgentShareRequestBody organizations(List organizations) { + + this.organizations = organizations; + return this; + } + + @ApiModelProperty(required = true, value = "List of organizations specifying sharing scope and roles.") + @JsonProperty("organizations") + @Valid + @NotNull(message = "Property organizations cannot be null.") + + public List getOrganizations() { + return organizations; + } + public void setOrganizations(List organizations) { + this.organizations = organizations; + } + + public AgentShareRequestBody addOrganizationsItem(AgentShareRequestBodyOrganizations organizationsItem) { + this.organizations.add(organizationsItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentShareRequestBody agentShareRequestBody = (AgentShareRequestBody) o; + return Objects.equals(this.agentCriteria, agentShareRequestBody.agentCriteria) && + Objects.equals(this.organizations, agentShareRequestBody.organizations); + } + + @Override + public int hashCode() { + return Objects.hash(agentCriteria, organizations); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentShareRequestBody {\n"); + + sb.append(" agentCriteria: ").append(toIndentedString(agentCriteria)).append("\n"); + sb.append(" organizations: ").append(toIndentedString(organizations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBodyAgentCriteria.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBodyAgentCriteria.java new file mode 100644 index 0000000000..76bb854703 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBodyAgentCriteria.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import javax.validation.constraints.*; + +/** + * Contains a list of agent IDs to be shared. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Contains a list of agent IDs to be shared.") +public class AgentShareRequestBodyAgentCriteria { + + private List agentIds = null; + + + /** + * List of agent IDs. + **/ + public AgentShareRequestBodyAgentCriteria agentIds(List agentIds) { + + this.agentIds = agentIds; + return this; + } + + @ApiModelProperty(value = "List of agent IDs.") + @JsonProperty("agentIds") + @Valid + public List getAgentIds() { + return agentIds; + } + public void setAgentIds(List agentIds) { + this.agentIds = agentIds; + } + + public AgentShareRequestBodyAgentCriteria addAgentIdsItem(String agentIdsItem) { + if (this.agentIds == null) { + this.agentIds = new ArrayList<>(); + } + this.agentIds.add(agentIdsItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentShareRequestBodyAgentCriteria agentShareRequestBodyAgentCriteria = (AgentShareRequestBodyAgentCriteria) o; + return Objects.equals(this.agentIds, agentShareRequestBodyAgentCriteria.agentIds); + } + + @Override + public int hashCode() { + return Objects.hash(agentIds); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentShareRequestBodyAgentCriteria {\n"); + + sb.append(" agentIds: ").append(toIndentedString(agentIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBodyOrganizations.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBodyOrganizations.java new file mode 100644 index 0000000000..1b741bf676 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareRequestBodyOrganizations.java @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.RoleWithAudience; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AgentShareRequestBodyOrganizations { + + private String orgId; + +@XmlType(name="PolicyEnum") +@XmlEnum(String.class) +public enum PolicyEnum { + + @XmlEnumValue("SELECTED_ORG_ONLY") SELECTED_ORG_ONLY(String.valueOf("SELECTED_ORG_ONLY")), @XmlEnumValue("SELECTED_ORG_WITH_ALL_EXISTING_CHILDREN_ONLY") SELECTED_ORG_WITH_ALL_EXISTING_CHILDREN_ONLY(String.valueOf("SELECTED_ORG_WITH_ALL_EXISTING_CHILDREN_ONLY")), @XmlEnumValue("SELECTED_ORG_WITH_ALL_EXISTING_AND_FUTURE_CHILDREN") SELECTED_ORG_WITH_ALL_EXISTING_AND_FUTURE_CHILDREN(String.valueOf("SELECTED_ORG_WITH_ALL_EXISTING_AND_FUTURE_CHILDREN")), @XmlEnumValue("SELECTED_ORG_WITH_EXISTING_IMMEDIATE_CHILDREN_ONLY") SELECTED_ORG_WITH_EXISTING_IMMEDIATE_CHILDREN_ONLY(String.valueOf("SELECTED_ORG_WITH_EXISTING_IMMEDIATE_CHILDREN_ONLY")), @XmlEnumValue("SELECTED_ORG_WITH_EXISTING_IMMEDIATE_AND_FUTURE_CHILDREN") SELECTED_ORG_WITH_EXISTING_IMMEDIATE_AND_FUTURE_CHILDREN(String.valueOf("SELECTED_ORG_WITH_EXISTING_IMMEDIATE_AND_FUTURE_CHILDREN")), @XmlEnumValue("NO_ORG") NO_ORG(String.valueOf("NO_ORG")); + + + private String value; + + PolicyEnum(String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyEnum fromValue(String value) { + for (PolicyEnum b : PolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + + private PolicyEnum policy; + private List roles = null; + + + /** + * The ID of the organization to share the agents with. + **/ + public AgentShareRequestBodyOrganizations orgId(String orgId) { + + this.orgId = orgId; + return this; + } + + @ApiModelProperty(required = true, value = "The ID of the organization to share the agents with.") + @JsonProperty("orgId") + @Valid + @NotNull(message = "Property orgId cannot be null.") + + public String getOrgId() { + return orgId; + } + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + /** + * The scope of sharing for this organization. + **/ + public AgentShareRequestBodyOrganizations policy(PolicyEnum policy) { + + this.policy = policy; + return this; + } + + @ApiModelProperty(required = true, value = "The scope of sharing for this organization.") + @JsonProperty("policy") + @Valid + @NotNull(message = "Property policy cannot be null.") + + public PolicyEnum getPolicy() { + return policy; + } + public void setPolicy(PolicyEnum policy) { + this.policy = policy; + } + + /** + * A list of roles to be shared with the organization. + **/ + public AgentShareRequestBodyOrganizations roles(List roles) { + + this.roles = roles; + return this; + } + + @ApiModelProperty(value = "A list of roles to be shared with the organization.") + @JsonProperty("roles") + @Valid + public List getRoles() { + return roles; + } + public void setRoles(List roles) { + this.roles = roles; + } + + public AgentShareRequestBodyOrganizations addRolesItem(RoleWithAudience rolesItem) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentShareRequestBodyOrganizations agentShareRequestBodyOrganizations = (AgentShareRequestBodyOrganizations) o; + return Objects.equals(this.orgId, agentShareRequestBodyOrganizations.orgId) && + Objects.equals(this.policy, agentShareRequestBodyOrganizations.policy) && + Objects.equals(this.roles, agentShareRequestBodyOrganizations.roles); + } + + @Override + public int hashCode() { + return Objects.hash(orgId, policy, roles); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentShareRequestBodyOrganizations {\n"); + + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareWithAllRequestBody.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareWithAllRequestBody.java new file mode 100644 index 0000000000..c23750c5a2 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentShareWithAllRequestBody.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBodyAgentCriteria; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.RoleWithAudience; +import javax.validation.constraints.*; + +/** + * Process a request to share agents with all organizations. The payload contains the roles applicable across all organizations and a policy that defines the scope of sharing. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Process a request to share agents with all organizations. The payload contains the roles applicable across all organizations and a policy that defines the scope of sharing. ") +public class AgentShareWithAllRequestBody { + + private AgentShareRequestBodyAgentCriteria agentCriteria; + +@XmlType(name="PolicyEnum") +@XmlEnum(String.class) +public enum PolicyEnum { + + @XmlEnumValue("ALL_EXISTING_ORGS_ONLY") ALL_EXISTING_ORGS_ONLY(String.valueOf("ALL_EXISTING_ORGS_ONLY")), @XmlEnumValue("ALL_EXISTING_AND_FUTURE_ORGS") ALL_EXISTING_AND_FUTURE_ORGS(String.valueOf("ALL_EXISTING_AND_FUTURE_ORGS")), @XmlEnumValue("IMMEDIATE_EXISTING_ORGS_ONLY") IMMEDIATE_EXISTING_ORGS_ONLY(String.valueOf("IMMEDIATE_EXISTING_ORGS_ONLY")), @XmlEnumValue("IMMEDIATE_EXISTING_AND_FUTURE_ORGS") IMMEDIATE_EXISTING_AND_FUTURE_ORGS(String.valueOf("IMMEDIATE_EXISTING_AND_FUTURE_ORGS")); + + + private String value; + + PolicyEnum(String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyEnum fromValue(String value) { + for (PolicyEnum b : PolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + + private PolicyEnum policy; + private List roles = null; + + + /** + **/ + public AgentShareWithAllRequestBody agentCriteria(AgentShareRequestBodyAgentCriteria agentCriteria) { + + this.agentCriteria = agentCriteria; + return this; + } + + @ApiModelProperty(required = true, value = "") + @JsonProperty("agentCriteria") + @Valid + @NotNull(message = "Property agentCriteria cannot be null.") + + public AgentShareRequestBodyAgentCriteria getAgentCriteria() { + return agentCriteria; + } + public void setAgentCriteria(AgentShareRequestBodyAgentCriteria agentCriteria) { + this.agentCriteria = agentCriteria; + } + + /** + * A policy to specify the sharing scope. + **/ + public AgentShareWithAllRequestBody policy(PolicyEnum policy) { + + this.policy = policy; + return this; + } + + @ApiModelProperty(required = true, value = "A policy to specify the sharing scope.") + @JsonProperty("policy") + @Valid + @NotNull(message = "Property policy cannot be null.") + + public PolicyEnum getPolicy() { + return policy; + } + public void setPolicy(PolicyEnum policy) { + this.policy = policy; + } + + /** + * A list of roles shared across all organizations. + **/ + public AgentShareWithAllRequestBody roles(List roles) { + + this.roles = roles; + return this; + } + + @ApiModelProperty(value = "A list of roles shared across all organizations.") + @JsonProperty("roles") + @Valid + public List getRoles() { + return roles; + } + public void setRoles(List roles) { + this.roles = roles; + } + + public AgentShareWithAllRequestBody addRolesItem(RoleWithAudience rolesItem) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentShareWithAllRequestBody agentShareWithAllRequestBody = (AgentShareWithAllRequestBody) o; + return Objects.equals(this.agentCriteria, agentShareWithAllRequestBody.agentCriteria) && + Objects.equals(this.policy, agentShareWithAllRequestBody.policy) && + Objects.equals(this.roles, agentShareWithAllRequestBody.roles); + } + + @Override + public int hashCode() { + return Objects.hash(agentCriteria, policy, roles); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentShareWithAllRequestBody {\n"); + + sb.append(" agentCriteria: ").append(toIndentedString(agentCriteria)).append("\n"); + sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponse.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponse.java new file mode 100644 index 0000000000..2b77994891 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponse.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponseLinks; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponseSharedOrganizations; +import javax.validation.constraints.*; + +/** + * Response listing organizations where a agent has shared access, including sharing policies, shared type and pagination links for navigating results. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Response listing organizations where a agent has shared access, including sharing policies, shared type and pagination links for navigating results. ") +public class AgentSharedOrganizationsResponse { + + private List links = null; + + private List sharedOrganizations = null; + + + /** + * Pagination links for navigating the result set. + **/ + public AgentSharedOrganizationsResponse links(List links) { + + this.links = links; + return this; + } + + @ApiModelProperty(value = "Pagination links for navigating the result set.") + @JsonProperty("links") + @Valid + public List getLinks() { + return links; + } + public void setLinks(List links) { + this.links = links; + } + + public AgentSharedOrganizationsResponse addLinksItem(AgentSharedOrganizationsResponseLinks linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * A list of shared access details for the agent across multiple organizations + **/ + public AgentSharedOrganizationsResponse sharedOrganizations(List sharedOrganizations) { + + this.sharedOrganizations = sharedOrganizations; + return this; + } + + @ApiModelProperty(value = "A list of shared access details for the agent across multiple organizations") + @JsonProperty("sharedOrganizations") + @Valid + public List getSharedOrganizations() { + return sharedOrganizations; + } + public void setSharedOrganizations(List sharedOrganizations) { + this.sharedOrganizations = sharedOrganizations; + } + + public AgentSharedOrganizationsResponse addSharedOrganizationsItem(AgentSharedOrganizationsResponseSharedOrganizations sharedOrganizationsItem) { + if (this.sharedOrganizations == null) { + this.sharedOrganizations = new ArrayList<>(); + } + this.sharedOrganizations.add(sharedOrganizationsItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentSharedOrganizationsResponse agentSharedOrganizationsResponse = (AgentSharedOrganizationsResponse) o; + return Objects.equals(this.links, agentSharedOrganizationsResponse.links) && + Objects.equals(this.sharedOrganizations, agentSharedOrganizationsResponse.sharedOrganizations); + } + + @Override + public int hashCode() { + return Objects.hash(links, sharedOrganizations); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentSharedOrganizationsResponse {\n"); + + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" sharedOrganizations: ").append(toIndentedString(sharedOrganizations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponseLinks.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponseLinks.java new file mode 100644 index 0000000000..d1ee2cab0a --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponseLinks.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AgentSharedOrganizationsResponseLinks { + + private String href; + private String rel; + + /** + * URL to navigate to the next or previous page. + **/ + public AgentSharedOrganizationsResponseLinks href(String href) { + + this.href = href; + return this; + } + + @ApiModelProperty(value = "URL to navigate to the next or previous page.") + @JsonProperty("href") + @Valid + public String getHref() { + return href; + } + public void setHref(String href) { + this.href = href; + } + + /** + * Indicates if the link is for the \"next\" or \"previous\" page. + **/ + public AgentSharedOrganizationsResponseLinks rel(String rel) { + + this.rel = rel; + return this; + } + + @ApiModelProperty(value = "Indicates if the link is for the \"next\" or \"previous\" page.") + @JsonProperty("rel") + @Valid + public String getRel() { + return rel; + } + public void setRel(String rel) { + this.rel = rel; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentSharedOrganizationsResponseLinks agentSharedOrganizationsResponseLinks = (AgentSharedOrganizationsResponseLinks) o; + return Objects.equals(this.href, agentSharedOrganizationsResponseLinks.href) && + Objects.equals(this.rel, agentSharedOrganizationsResponseLinks.rel); + } + + @Override + public int hashCode() { + return Objects.hash(href, rel); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentSharedOrganizationsResponseLinks {\n"); + + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" rel: ").append(toIndentedString(rel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponseSharedOrganizations.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponseSharedOrganizations.java new file mode 100644 index 0000000000..af27417dc2 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedOrganizationsResponseSharedOrganizations.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AgentSharedOrganizationsResponseSharedOrganizations { + + private String orgId; + private String orgName; + private String sharedAgentId; + private String sharedType; + private String rolesRef; + + /** + * ID of the child organization + **/ + public AgentSharedOrganizationsResponseSharedOrganizations orgId(String orgId) { + + this.orgId = orgId; + return this; + } + + @ApiModelProperty(example = "b028ca17-8f89-449c-ae27-fa955e66465d", value = "ID of the child organization") + @JsonProperty("orgId") + @Valid + public String getOrgId() { + return orgId; + } + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + /** + * Name of the child organization + **/ + public AgentSharedOrganizationsResponseSharedOrganizations orgName(String orgName) { + + this.orgName = orgName; + return this; + } + + @ApiModelProperty(example = "Organization Name", value = "Name of the child organization") + @JsonProperty("orgName") + @Valid + public String getOrgName() { + return orgName; + } + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + /** + * ID of the shared agent + **/ + public AgentSharedOrganizationsResponseSharedOrganizations sharedAgentId(String sharedAgentId) { + + this.sharedAgentId = sharedAgentId; + return this; + } + + @ApiModelProperty(example = "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8", value = "ID of the shared agent") + @JsonProperty("sharedAgentId") + @Valid + public String getSharedAgentId() { + return sharedAgentId; + } + public void setSharedAgentId(String sharedAgentId) { + this.sharedAgentId = sharedAgentId; + } + + /** + * Shared type of the agent (SHARED/INVITED) + **/ + public AgentSharedOrganizationsResponseSharedOrganizations sharedType(String sharedType) { + + this.sharedType = sharedType; + return this; + } + + @ApiModelProperty(example = "SHARED", value = "Shared type of the agent (SHARED/INVITED)") + @JsonProperty("sharedType") + @Valid + public String getSharedType() { + return sharedType; + } + public void setSharedType(String sharedType) { + this.sharedType = sharedType; + } + + /** + * URL reference to retrieve paginated roles for the shared agent in this organization + **/ + public AgentSharedOrganizationsResponseSharedOrganizations rolesRef(String rolesRef) { + + this.rolesRef = rolesRef; + return this; + } + + @ApiModelProperty(example = "/api/server/v1/agents/{agentId}/shared-roles?orgId=b028ca17-8f89-449c-ae27-fa955e66465d&after=&before=&limit=2&filter=&recursive=false", value = "URL reference to retrieve paginated roles for the shared agent in this organization") + @JsonProperty("rolesRef") + @Valid + public String getRolesRef() { + return rolesRef; + } + public void setRolesRef(String rolesRef) { + this.rolesRef = rolesRef; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentSharedOrganizationsResponseSharedOrganizations agentSharedOrganizationsResponseSharedOrganizations = (AgentSharedOrganizationsResponseSharedOrganizations) o; + return Objects.equals(this.orgId, agentSharedOrganizationsResponseSharedOrganizations.orgId) && + Objects.equals(this.orgName, agentSharedOrganizationsResponseSharedOrganizations.orgName) && + Objects.equals(this.sharedAgentId, agentSharedOrganizationsResponseSharedOrganizations.sharedAgentId) && + Objects.equals(this.sharedType, agentSharedOrganizationsResponseSharedOrganizations.sharedType) && + Objects.equals(this.rolesRef, agentSharedOrganizationsResponseSharedOrganizations.rolesRef); + } + + @Override + public int hashCode() { + return Objects.hash(orgId, orgName, sharedAgentId, sharedType, rolesRef); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentSharedOrganizationsResponseSharedOrganizations {\n"); + + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); + sb.append(" sharedAgentId: ").append(toIndentedString(sharedAgentId)).append("\n"); + sb.append(" sharedType: ").append(toIndentedString(sharedType)).append("\n"); + sb.append(" rolesRef: ").append(toIndentedString(rolesRef)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedRolesResponse.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedRolesResponse.java new file mode 100644 index 0000000000..928006492b --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentSharedRolesResponse.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponseLinks; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.RoleWithAudience; +import javax.validation.constraints.*; + +/** + * Response showing the roles assigned to a agent within a specific organization, with pagination support for large role sets. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Response showing the roles assigned to a agent within a specific organization, with pagination support for large role sets. ") +public class AgentSharedRolesResponse { + + private List links = null; + + private List roles = null; + + + /** + * Pagination links for navigating the result set. + **/ + public AgentSharedRolesResponse links(List links) { + + this.links = links; + return this; + } + + @ApiModelProperty(value = "Pagination links for navigating the result set.") + @JsonProperty("links") + @Valid + public List getLinks() { + return links; + } + public void setLinks(List links) { + this.links = links; + } + + public AgentSharedRolesResponse addLinksItem(AgentSharedOrganizationsResponseLinks linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * A list of roles with audience details + **/ + public AgentSharedRolesResponse roles(List roles) { + + this.roles = roles; + return this; + } + + @ApiModelProperty(value = "A list of roles with audience details") + @JsonProperty("roles") + @Valid + public List getRoles() { + return roles; + } + public void setRoles(List roles) { + this.roles = roles; + } + + public AgentSharedRolesResponse addRolesItem(RoleWithAudience rolesItem) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentSharedRolesResponse agentSharedRolesResponse = (AgentSharedRolesResponse) o; + return Objects.equals(this.links, agentSharedRolesResponse.links) && + Objects.equals(this.roles, agentSharedRolesResponse.roles); + } + + @Override + public int hashCode() { + return Objects.hash(links, roles); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentSharedRolesResponse {\n"); + + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareRequestBody.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareRequestBody.java new file mode 100644 index 0000000000..cc78c0200e --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareRequestBody.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareRequestBodyAgentCriteria; +import javax.validation.constraints.*; + +/** + * The request body for unsharing agents from multiple organizations. Includes a list of agent IDs and a list of organization IDs. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "The request body for unsharing agents from multiple organizations. Includes a list of agent IDs and a list of organization IDs. ") +public class AgentUnshareRequestBody { + + private AgentUnshareRequestBodyAgentCriteria agentCriteria; + private List organizations = new ArrayList<>(); + + + /** + **/ + public AgentUnshareRequestBody agentCriteria(AgentUnshareRequestBodyAgentCriteria agentCriteria) { + + this.agentCriteria = agentCriteria; + return this; + } + + @ApiModelProperty(required = true, value = "") + @JsonProperty("agentCriteria") + @Valid + @NotNull(message = "Property agentCriteria cannot be null.") + + public AgentUnshareRequestBodyAgentCriteria getAgentCriteria() { + return agentCriteria; + } + public void setAgentCriteria(AgentUnshareRequestBodyAgentCriteria agentCriteria) { + this.agentCriteria = agentCriteria; + } + + /** + * List of organization IDs from which the agents should be unshared. + **/ + public AgentUnshareRequestBody organizations(List organizations) { + + this.organizations = organizations; + return this; + } + + @ApiModelProperty(required = true, value = "List of organization IDs from which the agents should be unshared.") + @JsonProperty("organizations") + @Valid + @NotNull(message = "Property organizations cannot be null.") + + public List getOrganizations() { + return organizations; + } + public void setOrganizations(List organizations) { + this.organizations = organizations; + } + + public AgentUnshareRequestBody addOrganizationsItem(String organizationsItem) { + this.organizations.add(organizationsItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentUnshareRequestBody agentUnshareRequestBody = (AgentUnshareRequestBody) o; + return Objects.equals(this.agentCriteria, agentUnshareRequestBody.agentCriteria) && + Objects.equals(this.organizations, agentUnshareRequestBody.organizations); + } + + @Override + public int hashCode() { + return Objects.hash(agentCriteria, organizations); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentUnshareRequestBody {\n"); + + sb.append(" agentCriteria: ").append(toIndentedString(agentCriteria)).append("\n"); + sb.append(" organizations: ").append(toIndentedString(organizations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareRequestBodyAgentCriteria.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareRequestBodyAgentCriteria.java new file mode 100644 index 0000000000..0e76c880ab --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareRequestBodyAgentCriteria.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import javax.validation.constraints.*; + +/** + * Contains a list of agent IDs to be unshared. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Contains a list of agent IDs to be unshared.") +public class AgentUnshareRequestBodyAgentCriteria { + + private List agentIds = null; + + + /** + * List of agent IDs. + **/ + public AgentUnshareRequestBodyAgentCriteria agentIds(List agentIds) { + + this.agentIds = agentIds; + return this; + } + + @ApiModelProperty(value = "List of agent IDs.") + @JsonProperty("agentIds") + @Valid + public List getAgentIds() { + return agentIds; + } + public void setAgentIds(List agentIds) { + this.agentIds = agentIds; + } + + public AgentUnshareRequestBodyAgentCriteria addAgentIdsItem(String agentIdsItem) { + if (this.agentIds == null) { + this.agentIds = new ArrayList<>(); + } + this.agentIds.add(agentIdsItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentUnshareRequestBodyAgentCriteria agentUnshareRequestBodyAgentCriteria = (AgentUnshareRequestBodyAgentCriteria) o; + return Objects.equals(this.agentIds, agentUnshareRequestBodyAgentCriteria.agentIds); + } + + @Override + public int hashCode() { + return Objects.hash(agentIds); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentUnshareRequestBodyAgentCriteria {\n"); + + sb.append(" agentIds: ").append(toIndentedString(agentIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareWithAllRequestBody.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareWithAllRequestBody.java new file mode 100644 index 0000000000..d0b3ef1448 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/AgentUnshareWithAllRequestBody.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareRequestBodyAgentCriteria; +import javax.validation.constraints.*; + +/** + * The request body for unsharing agents from all organizations. Includes a list of agent IDs. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "The request body for unsharing agents from all organizations. Includes a list of agent IDs. ") +public class AgentUnshareWithAllRequestBody { + + private AgentUnshareRequestBodyAgentCriteria agentCriteria; + + /** + **/ + public AgentUnshareWithAllRequestBody agentCriteria(AgentUnshareRequestBodyAgentCriteria agentCriteria) { + + this.agentCriteria = agentCriteria; + return this; + } + + @ApiModelProperty(required = true, value = "") + @JsonProperty("agentCriteria") + @Valid + @NotNull(message = "Property agentCriteria cannot be null.") + + public AgentUnshareRequestBodyAgentCriteria getAgentCriteria() { + return agentCriteria; + } + public void setAgentCriteria(AgentUnshareRequestBodyAgentCriteria agentCriteria) { + this.agentCriteria = agentCriteria; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentUnshareWithAllRequestBody agentUnshareWithAllRequestBody = (AgentUnshareWithAllRequestBody) o; + return Objects.equals(this.agentCriteria, agentUnshareWithAllRequestBody.agentCriteria); + } + + @Override + public int hashCode() { + return Objects.hash(agentCriteria); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AgentUnshareWithAllRequestBody {\n"); + + sb.append(" agentCriteria: ").append(toIndentedString(agentCriteria)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/Error.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/Error.java new file mode 100644 index 0000000000..130baf9c16 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/Error.java @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.UUID; +import javax.validation.constraints.*; + +/** + * Details of an error, including code, message, description, and a trace ID to help with debugging. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Details of an error, including code, message, description, and a trace ID to help with debugging. ") +public class Error { + + private String code; + private String message; + private String description; + private UUID traceId; + + /** + * An error code. + **/ + public Error code(String code) { + + this.code = code; + return this; + } + + @ApiModelProperty(example = "OUI-00000", required = true, value = "An error code.") + @JsonProperty("code") + @Valid + @NotNull(message = "Property code cannot be null.") + + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + + /** + * An error message. + **/ + public Error message(String message) { + + this.message = message; + return this; + } + + @ApiModelProperty(example = "Some Error Message", required = true, value = "An error message.") + @JsonProperty("message") + @Valid + @NotNull(message = "Property message cannot be null.") + + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + + /** + * An error description. + **/ + public Error description(String description) { + + this.description = description; + return this; + } + + @ApiModelProperty(example = "Some Error Description", value = "An error description.") + @JsonProperty("description") + @Valid + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + + /** + * A trace ID in UUID format to help with debugging. + **/ + public Error traceId(UUID traceId) { + + this.traceId = traceId; + return this; + } + + @ApiModelProperty(example = "e0fbcfeb-7fc2-4b62-8b82-72d3c5fbcdeb", required = true, value = "A trace ID in UUID format to help with debugging.") + @JsonProperty("traceId") + @Valid + @NotNull(message = "Property traceId cannot be null.") + + public UUID getTraceId() { + return traceId; + } + public void setTraceId(UUID traceId) { + this.traceId = traceId; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.message, error.message) && + Objects.equals(this.description, error.description) && + Objects.equals(this.traceId, error.traceId); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, description, traceId); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/ProcessSuccessResponse.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/ProcessSuccessResponse.java new file mode 100644 index 0000000000..ed009907d1 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/ProcessSuccessResponse.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * Indicates that the sharing or unsharing process has started successfully, with the current status and relevant details. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Indicates that the sharing or unsharing process has started successfully, with the current status and relevant details. ") +public class ProcessSuccessResponse { + + private String status; + private String details; + + /** + * Status of the process. + **/ + public ProcessSuccessResponse status(String status) { + + this.status = status; + return this; + } + + @ApiModelProperty(example = "Processing", value = "Status of the process.") + @JsonProperty("status") + @Valid + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + + /** + * Additional information about the process. + **/ + public ProcessSuccessResponse details(String details) { + + this.details = details; + return this; + } + + @ApiModelProperty(example = "Agent sharing process triggered successfully.", value = "Additional information about the process.") + @JsonProperty("details") + @Valid + public String getDetails() { + return details; + } + public void setDetails(String details) { + this.details = details; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProcessSuccessResponse processSuccessResponse = (ProcessSuccessResponse) o; + return Objects.equals(this.status, processSuccessResponse.status) && + Objects.equals(this.details, processSuccessResponse.details); + } + + @Override + public int hashCode() { + return Objects.hash(status, details); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class ProcessSuccessResponse {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/RoleWithAudience.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/RoleWithAudience.java new file mode 100644 index 0000000000..2ec51f1e45 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/RoleWithAudience.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.RoleWithAudienceAudience; +import javax.validation.constraints.*; + +/** + * Represents a agent role within a specific audience (organization or application), defined by its display name and audience type. + **/ + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; +@ApiModel(description = "Represents a agent role within a specific audience (organization or application), defined by its display name and audience type. ") +public class RoleWithAudience { + + private String displayName; + private RoleWithAudienceAudience audience; + + /** + * Display name of the role + **/ + public RoleWithAudience displayName(String displayName) { + + this.displayName = displayName; + return this; + } + + @ApiModelProperty(example = "role_1", required = true, value = "Display name of the role") + @JsonProperty("displayName") + @Valid + @NotNull(message = "Property displayName cannot be null.") + + public String getDisplayName() { + return displayName; + } + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + **/ + public RoleWithAudience audience(RoleWithAudienceAudience audience) { + + this.audience = audience; + return this; + } + + @ApiModelProperty(required = true, value = "") + @JsonProperty("audience") + @Valid + @NotNull(message = "Property audience cannot be null.") + + public RoleWithAudienceAudience getAudience() { + return audience; + } + public void setAudience(RoleWithAudienceAudience audience) { + this.audience = audience; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoleWithAudience roleWithAudience = (RoleWithAudience) o; + return Objects.equals(this.displayName, roleWithAudience.displayName) && + Objects.equals(this.audience, roleWithAudience.audience); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, audience); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class RoleWithAudience {\n"); + + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" audience: ").append(toIndentedString(audience)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/RoleWithAudienceAudience.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/RoleWithAudienceAudience.java new file mode 100644 index 0000000000..8ff0cdd0b1 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/model/RoleWithAudienceAudience.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class RoleWithAudienceAudience { + + private String display; + private String type; + + /** + * Display name of the audience + **/ + public RoleWithAudienceAudience display(String display) { + + this.display = display; + return this; + } + + @ApiModelProperty(example = "My Org 1", required = true, value = "Display name of the audience") + @JsonProperty("display") + @Valid + @NotNull(message = "Property display cannot be null.") + + public String getDisplay() { + return display; + } + public void setDisplay(String display) { + this.display = display; + } + + /** + * Type of the audience, e.g., 'organization' or 'application' + **/ + public RoleWithAudienceAudience type(String type) { + + this.type = type; + return this; + } + + @ApiModelProperty(example = "organization", required = true, value = "Type of the audience, e.g., 'organization' or 'application'") + @JsonProperty("type") + @Valid + @NotNull(message = "Property type cannot be null.") + + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoleWithAudienceAudience roleWithAudienceAudience = (RoleWithAudienceAudience) o; + return Objects.equals(this.display, roleWithAudienceAudience.display) && + Objects.equals(this.type, roleWithAudienceAudience.type); + } + + @Override + public int hashCode() { + return Objects.hash(display, type); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class RoleWithAudienceAudience {\n"); + + sb.append(" display: ").append(toIndentedString(display)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/core/AgentsApiServiceCore.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/core/AgentsApiServiceCore.java new file mode 100644 index 0000000000..804b772cf0 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/core/AgentsApiServiceCore.java @@ -0,0 +1,494 @@ +/* + * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.core; + +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBodyOrganizations; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponseLinks; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedOrganizationsResponseSharedOrganizations; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentSharedRolesResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.Error; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.ProcessSuccessResponse; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.RoleWithAudience; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.RoleWithAudienceAudience; +import org.wso2.carbon.identity.core.util.IdentityUtil; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.UserSharingPolicyHandlerService; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.exception.UserSharingMgtClientException; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.exception.UserSharingMgtException; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.GeneralUserShareDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.GeneralUserUnshareDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.ResponseLinkDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.ResponseOrgDetailsDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.ResponseSharedOrgsDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.ResponseSharedRolesDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.RoleWithAudienceDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.SelectiveUserShareDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.SelectiveUserShareOrgDetailsDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.dos.SelectiveUserUnshareDO; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.usercriteria.UserCriteriaType; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.usercriteria.UserIdList; +import org.wso2.carbon.identity.organization.resource.sharing.policy.management.constant.PolicyEnum; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import javax.ws.rs.core.Response; + +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.ErrorMessage.INVALID_GENERAL_AGENT_SHARE_REQUEST_BODY; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.ErrorMessage.INVALID_GENERAL_AGENT_UNSHARE_REQUEST_BODY; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.ErrorMessage.INVALID_SELECTIVE_AGENT_SHARE_REQUEST_BODY; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.ErrorMessage.INVALID_SELECTIVE_AGENT_UNSHARE_REQUEST_BODY; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.ErrorMessage.INVALID_UUID_FORMAT; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.RESPONSE_DETAIL_AGENT_SHARE; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.RESPONSE_DETAIL_AGENT_UNSHARE; +import static org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common.constants.AgentSharingMgtConstants.RESPONSE_STATUS_PROCESSING; +import static org.wso2.carbon.identity.api.server.organization.user.sharing.management.common.constants.UserSharingMgtConstants.IS_AGENT_SHARING; +import static org.wso2.carbon.identity.api.server.organization.user.sharing.management.common.constants.UserSharingMgtConstants.USER_IDS; + +/** + * Core service class for handling agent sharing management APIs. + */ +public class AgentsApiServiceCore { + + private final UserSharingPolicyHandlerService userSharingPolicyHandlerService; + + public AgentsApiServiceCore(UserSharingPolicyHandlerService userSharingPolicyHandlerService) { + + this.userSharingPolicyHandlerService = userSharingPolicyHandlerService; + } + + /** + * Handles sharing an agent across specific organizations. + * + * @param agentShareRequestBody Contains details for agent sharing. + */ + public Response shareAgent(AgentShareRequestBody agentShareRequestBody) { + + if (agentShareRequestBody == null) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(buildErrorResponse(makeRequestError(INVALID_SELECTIVE_AGENT_SHARE_REQUEST_BODY))).build(); + } + + IdentityUtil.threadLocalProperties.get().put(IS_AGENT_SHARING, true); + + // Populate selectiveAgentShareDO object from the request body. + SelectiveUserShareDO selectiveAgentShareDO = populateSelectiveAgentShareDO(agentShareRequestBody); + + try { + userSharingPolicyHandlerService.populateSelectiveUserShare(selectiveAgentShareDO); + return Response.status(Response.Status.ACCEPTED) + .entity(getProcessSuccessResponse(RESPONSE_DETAIL_AGENT_SHARE)).build(); + } catch (UserSharingMgtClientException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(buildErrorResponse(e)).build(); + } catch (UserSharingMgtException e) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(buildErrorResponse(e)).build(); + } finally { + IdentityUtil.threadLocalProperties.get().put(IS_AGENT_SHARING, false); + } + } + + /** + * Handles sharing an agent across all organizations. + * + * @param agentShareWithAllRequestBody Contains details for sharing agents with all organizations. + */ + public Response shareAgentWithAll(AgentShareWithAllRequestBody agentShareWithAllRequestBody) { + + if (agentShareWithAllRequestBody == null) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(buildErrorResponse(makeRequestError(INVALID_GENERAL_AGENT_SHARE_REQUEST_BODY))).build(); + } + + IdentityUtil.threadLocalProperties.get().put("isAgentSharing", true); + + // Populate GeneralUserShareDO object from the request body. + GeneralUserShareDO generalAgentShareDO = populateGeneralAgentShareDO(agentShareWithAllRequestBody); + + try { + userSharingPolicyHandlerService.populateGeneralUserShare(generalAgentShareDO); + return Response.status(Response.Status.ACCEPTED) + .entity(getProcessSuccessResponse(RESPONSE_DETAIL_AGENT_SHARE)).build(); + } catch (UserSharingMgtClientException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(buildErrorResponse(e)).build(); + } catch (UserSharingMgtException e) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(buildErrorResponse(e)).build(); + } finally { + IdentityUtil.threadLocalProperties.get().put("isAgentSharing", true); + } + } + + /** + * Handles unsharing an agent from specific organizations. + * + * @param agentUnshareRequestBody Contains details for agent unsharing. + */ + public Response unshareAgent(AgentUnshareRequestBody agentUnshareRequestBody) { + + if (agentUnshareRequestBody == null) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(buildErrorResponse(makeRequestError(INVALID_SELECTIVE_AGENT_UNSHARE_REQUEST_BODY))).build(); + } + + // Populate SelectiveUserUnshareDO object from the request body. + SelectiveUserUnshareDO selectiveUserUnshareDO = populateSelectiveAgentUnshareDO(agentUnshareRequestBody); + + try { + userSharingPolicyHandlerService.populateSelectiveUserUnshare(selectiveUserUnshareDO); + return Response.status(Response.Status.ACCEPTED) + .entity(getProcessSuccessResponse(RESPONSE_DETAIL_AGENT_UNSHARE)) + .build(); + } catch (UserSharingMgtClientException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(buildErrorResponse(e)).build(); + } catch (UserSharingMgtException e) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(buildErrorResponse(e)).build(); + } + } + + /** + * Handles removing an agent's shared access from all organizations. + * + * @param agentUnshareWithAllRequestBody Contains details for removing shared access. + */ + public Response unshareAgentWithAll(AgentUnshareWithAllRequestBody agentUnshareWithAllRequestBody) { + + if (agentUnshareWithAllRequestBody == null) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(buildErrorResponse(makeRequestError(INVALID_GENERAL_AGENT_UNSHARE_REQUEST_BODY))).build(); + } + + // Populate GeneralAgentUnshareDO object from the request body. + GeneralUserUnshareDO generalAgentUnshareDO = populateGeneralUserUnshareDO(agentUnshareWithAllRequestBody); + + try { + userSharingPolicyHandlerService.populateGeneralUserUnshare(generalAgentUnshareDO); + return Response.status(Response.Status.ACCEPTED) + .entity(getProcessSuccessResponse(RESPONSE_DETAIL_AGENT_UNSHARE)) + .build(); + } catch (UserSharingMgtClientException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(buildErrorResponse(e)).build(); + } catch (UserSharingMgtException e) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(buildErrorResponse(e)).build(); + } + } + + /** + * Retrieves the organizations that an agent has access to. + * + * @param agentId The ID of the agent. + * @param after The cursor for the next page. + * @param before The cursor for the previous page. + * @param limit The maximum number of results per page. + * @param filter The filter criteria. + * @param recursive Whether to include child organizations. + * @return AgentSharedOrganizationsResponse containing accessible organizations. + */ + public Response getSharedOrganizations(String agentId, String after, String before, + Integer limit, String filter, Boolean recursive) { + + if (agentId == null) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(buildErrorResponse(makeRequestError(INVALID_UUID_FORMAT))).build(); + } + + try { + ResponseSharedOrgsDO result = + userSharingPolicyHandlerService.getSharedOrganizationsOfUser(agentId, after, before, limit, filter, + recursive); + + AgentSharedOrganizationsResponse response = populateAgentSharedOrganizationsResponse(result); + return Response.ok().entity(response).build(); + } catch (UserSharingMgtClientException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(buildErrorResponse(e)).build(); + } catch (UserSharingMgtException e) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(buildErrorResponse(e)).build(); + } + } + + /** + * Retrieves the roles assigned to an agent within a specified organization. + * + * @param agentId The ID of the agent. + * @param orgId The ID of the organization. + * @param after The cursor for the next page. + * @param before The cursor for the previous page. + * @param limit The maximum number of results per page. + * @param filter The filter criteria. + * @param recursive Whether to include child roles. + * @return AgentSharedRolesResponse containing shared roles. + */ + public Response getSharedRoles(String agentId, String orgId, String after, String before, + Integer limit, String filter, Boolean recursive) { + + if (agentId == null || orgId == null) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(buildErrorResponse(makeRequestError(INVALID_UUID_FORMAT))).build(); + } + + try { + ResponseSharedRolesDO result = + userSharingPolicyHandlerService.getRolesSharedWithUserInOrganization(agentId, orgId, after, before, + limit, filter, recursive); + + AgentSharedRolesResponse response = populateAgentSharedRolesResponse(result); + return Response.ok().entity(response).build(); + } catch (UserSharingMgtClientException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(buildErrorResponse(e)).build(); + } catch (UserSharingMgtException e) { + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(buildErrorResponse(e)).build(); + } + } + + /** + * Populates a SelectiveAgentShareDO object from the provided AgentShareRequestBody. + * + * @param agentShareRequestBody Contains details for agent sharing. + * @return A populated SelectiveAgentShareDO object. + */ + private SelectiveUserShareDO populateSelectiveAgentShareDO(AgentShareRequestBody agentShareRequestBody) { + + SelectiveUserShareDO selectiveAgentShareDO = new SelectiveUserShareDO(); + + // Set user criteria. + Map agentCriteria = + populateAgentCriteria(agentShareRequestBody.getAgentCriteria().getAgentIds()); + selectiveAgentShareDO.setUserCriteria(agentCriteria); + + // Set organizations. + List organizationsList = new ArrayList<>(); + for (AgentShareRequestBodyOrganizations org : agentShareRequestBody.getOrganizations()) { + SelectiveUserShareOrgDetailsDO selectiveAgentShareOrgDetailsDO = new SelectiveUserShareOrgDetailsDO(); + selectiveAgentShareOrgDetailsDO.setOrganizationId(org.getOrgId()); + selectiveAgentShareOrgDetailsDO.setPolicy(PolicyEnum.getPolicyByValue(org.getPolicy().value())); + selectiveAgentShareOrgDetailsDO.setRoles(populateRoleWithAudienceDO(org.getRoles())); + organizationsList.add(selectiveAgentShareOrgDetailsDO); + } + selectiveAgentShareDO.setOrganizations(organizationsList); + + return selectiveAgentShareDO; + } + + private Map populateAgentCriteria(List agentIdList) { + + Map userCriteria = new HashMap<>(); + UserCriteriaType userIds = new UserIdList(agentIdList); + userCriteria.put(USER_IDS, userIds); + return userCriteria; + } + + /** + * Populates a GeneralAgentShareDO object from the provided AgentShareWithAllRequestBody. + * + * @param userShareWithAllRequestBody Contains details for sharing agents with all organizations. + * @return A populated GeneralAgentShareDO object. + */ + private GeneralUserShareDO populateGeneralAgentShareDO(AgentShareWithAllRequestBody userShareWithAllRequestBody) { + + GeneralUserShareDO generalAgentShareDO = new GeneralUserShareDO(); + + // Set user criteria. + Map userCriteria = + populateAgentCriteria(userShareWithAllRequestBody.getAgentCriteria().getAgentIds()); + generalAgentShareDO.setUserCriteria(userCriteria); + + // Set policy. + generalAgentShareDO.setPolicy(PolicyEnum.getPolicyByValue(userShareWithAllRequestBody.getPolicy().value())); + + // Set roles. + List rolesList = populateRoleWithAudienceDO(userShareWithAllRequestBody.getRoles()); + generalAgentShareDO.setRoles(rolesList); + return generalAgentShareDO; + } + + /** + * Populates a SelectiveUserUnshareDO object from the provided AgentUnshareRequestBody. + * + * @param agentUnshareRequestBody Contains details for agent unsharing. + * @return A populated SelectiveAgentUnshareDO object. + */ + private SelectiveUserUnshareDO populateSelectiveAgentUnshareDO(AgentUnshareRequestBody agentUnshareRequestBody) { + + SelectiveUserUnshareDO selectiveUserUnshareDO = new SelectiveUserUnshareDO(); + + // Set user criteria. + Map userCriteria = + populateAgentCriteria(agentUnshareRequestBody.getAgentCriteria().getAgentIds()); + selectiveUserUnshareDO.setUserCriteria(userCriteria); + + // Set organizations. + selectiveUserUnshareDO.setOrganizations(agentUnshareRequestBody.getOrganizations()); + + return selectiveUserUnshareDO; + } + + /** + * Populates a GeneralAgentUnshareDO object from the provided AgentUnshareWithAllRequestBody. + * + * @param agentUnshareWithAllRequestBody Contains details for removing shared access. + * @return A populated GeneralAgentUnshareDO object. + */ + private GeneralUserUnshareDO populateGeneralUserUnshareDO(AgentUnshareWithAllRequestBody + agentUnshareWithAllRequestBody) { + + GeneralUserUnshareDO generalUserUnshareDO = new GeneralUserUnshareDO(); + + // Set user criteria. + Map userCriteria = + populateAgentCriteria(agentUnshareWithAllRequestBody.getAgentCriteria().getAgentIds()); + generalUserUnshareDO.setUserCriteria(userCriteria); + + return generalUserUnshareDO; + } + + /** + * Populates a AgentSharedOrganizationsResponse object from the provided ResponseSharedOrgsDO. + * + * @param result The ResponseSharedOrgsDO containing the shared organization's data. + * @return A populated AgentSharedOrganizationsResponse object. + */ + private AgentSharedOrganizationsResponse populateAgentSharedOrganizationsResponse(ResponseSharedOrgsDO result) { + + List responseLinks = + populateAgentSharedOrganizationsResponseLinks(result.getResponseLinks()); + + List responseOrgs = new ArrayList<>(); + List resultOrgDetails = result.getSharedOrgs(); + for (ResponseOrgDetailsDO resultOrgDetail : resultOrgDetails) { + AgentSharedOrganizationsResponseSharedOrganizations org = + new AgentSharedOrganizationsResponseSharedOrganizations().orgId( + resultOrgDetail.getOrganizationId()) + .orgName(resultOrgDetail.getOrganizationName()) + .sharedAgentId(resultOrgDetail.getSharedUserId()) + .sharedType(resultOrgDetail.getSharedType().toString()) + .rolesRef(resultOrgDetail.getRolesRef()); + responseOrgs.add(org); + } + + return new AgentSharedOrganizationsResponse().links(responseLinks).sharedOrganizations(responseOrgs); + } + + /** + * Populates a AgentSharedRolesResponse object from the provided ResponseSharedRolesDO. + * + * @param result The ResponseSharedRolesDO containing the shared role's data. + * @return A populated AgentSharedRolesResponse object. + */ + private AgentSharedRolesResponse populateAgentSharedRolesResponse(ResponseSharedRolesDO result) { + + List responseLinks = + populateAgentSharedOrganizationsResponseLinks(result.getResponseLinks()); + + List responseRoles = new ArrayList<>(); + List resultRoleDetails = result.getSharedRoles(); + for (RoleWithAudienceDO resultRoleDetail : resultRoleDetails) { + RoleWithAudience roleWithAudience = new RoleWithAudience(); + roleWithAudience.setDisplayName(resultRoleDetail.getRoleName()); + roleWithAudience.setAudience(new RoleWithAudienceAudience() + .display(resultRoleDetail.getAudienceName()) + .type(resultRoleDetail.getAudienceType())); + responseRoles.add(roleWithAudience); + } + + return new AgentSharedRolesResponse().links(responseLinks).roles(responseRoles); + } + + /** + * Populates a list of RoleWithAudienceDO objects from the provided list of RoleWithAudience. + * + * @param roles The list of RoleWithAudience objects to be converted. + * @return A list of RoleWithAudienceDO objects. + */ + private List populateRoleWithAudienceDO(List roles) { + + List rolesList = new ArrayList<>(); + if (roles != null) { + for (RoleWithAudience role : roles) { + RoleWithAudienceDO roleDetails = new RoleWithAudienceDO(); + roleDetails.setRoleName(role.getDisplayName()); + roleDetails.setAudienceName(role.getAudience().getDisplay()); + roleDetails.setAudienceType(role.getAudience().getType()); + rolesList.add(roleDetails); + } + } + return rolesList; + } + + /** + * Populates a list of AgentSharedOrganizationsResponseLinks objects from the provided list of ResponseLinkDO. + * + * @param resultLinks The list of ResponseLinkDO objects to be converted. + * @return A list of AgentSharedOrganizationsResponseLinks objects. + */ + private List populateAgentSharedOrganizationsResponseLinks( + List resultLinks) { + + List responseLinks = new ArrayList<>(); + for (ResponseLinkDO resultLink : resultLinks) { + AgentSharedOrganizationsResponseLinks links = new AgentSharedOrganizationsResponseLinks(); + links.href(resultLink.getHref()); + links.rel(resultLink.getRel()); + responseLinks.add(links); + } + return responseLinks; + } + + /** + * Constructs a success response object for a completed process. + * + * @param details Additional details or description about the process. + * @return A {@link ProcessSuccessResponse} object containing the status and details of the process. + */ + private ProcessSuccessResponse getProcessSuccessResponse(String details) { + + ProcessSuccessResponse processSuccessResponse = new ProcessSuccessResponse(); + processSuccessResponse.status(RESPONSE_STATUS_PROCESSING); + processSuccessResponse.setDetails(details); + return processSuccessResponse; + } + + /** + * Creates a AgentSharingMgtClientException based on the provided error message. + * + * @param error The error message containing the code, message, and description. + * @return A AgentSharingMgtClientException with the specified error details. + */ + private UserSharingMgtClientException makeRequestError(AgentSharingMgtConstants.ErrorMessage error) { + + return new UserSharingMgtClientException(error.getCode(), error.getMessage(), error.getDescription()); + } + + /** + * Builds a structured error response. + * + * @param e The exception containing error details. + * @return An Error object containing the error code, message, description, and a trace ID. + */ + private Error buildErrorResponse(UserSharingMgtException e) { + + return new Error().code(e.getErrorCode()).message(e.getMessage()).description(e.getDescription()) + .traceId(UUID.randomUUID()); + } +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/factories/AgentsApiServiceCoreFactory.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/factories/AgentsApiServiceCoreFactory.java new file mode 100644 index 0000000000..c7991a79de --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/factories/AgentsApiServiceCoreFactory.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.factories; + +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.core.AgentsApiServiceCore; +import org.wso2.carbon.identity.api.server.organization.user.sharing.management.common.UserSharingMgtServiceHolder; +import org.wso2.carbon.identity.organization.management.organization.user.sharing.UserSharingPolicyHandlerService; + +/** + * Factory class for UsersApiService. + */ +public class AgentsApiServiceCoreFactory { + + private static final AgentsApiServiceCore SERVICE; + + static { + UserSharingPolicyHandlerService userSharingPolicyHandlerService = UserSharingMgtServiceHolder + .getUserSharingPolicyHandlerService(); + if (userSharingPolicyHandlerService == null) { + throw new IllegalStateException("UserSharingPolicyHandlerService is not available from the OSGi context."); + } + SERVICE = new AgentsApiServiceCore(userSharingPolicyHandlerService); + } + + /** + * Get AgentsApiServiceCore. + * + * @return AgentsApiServiceCore. + */ + public static AgentsApiServiceCore getAgentsApiServiceCore() { + + return SERVICE; + } +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/impl/AgentsApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/impl/AgentsApiServiceImpl.java new file mode 100644 index 0000000000..f8b101a591 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/java/org/wso2/carbon/identity/api/server/organization/agent/sharing/management/v1/impl/AgentsApiServiceImpl.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.impl; + + +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.AgentsApiService; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.core.AgentsApiServiceCore; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.factories.AgentsApiServiceCoreFactory; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentShareWithAllRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareRequestBody; +import org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1.model.AgentUnshareWithAllRequestBody; + +import javax.ws.rs.core.Response; + +/** + * Implementation of the agent sharing management APIs. + */ +public class AgentsApiServiceImpl implements AgentsApiService { + + private final AgentsApiServiceCore agentsApiServiceCore; + + public AgentsApiServiceImpl() { + + try { + this.agentsApiServiceCore = AgentsApiServiceCoreFactory.getAgentsApiServiceCore(); + } catch (IllegalStateException e) { + throw new RuntimeException("Error initializing Agents API Service Core.", e); + } + } + + @Override + public Response agentsAgentIdSharedOrganizationsGet(String agentId, String after, String before, Integer limit, + String filter, Boolean recursive) { + + return agentsApiServiceCore.getSharedOrganizations(agentId, after, before, limit, filter, recursive); + } + + @Override + public Response agentsAgentIdSharedRolesGet(String agentId, String orgId, String after, String before, + Integer limit, String filter, Boolean recursive) { + + return agentsApiServiceCore.getSharedRoles(agentId, orgId, after, before, limit, filter, recursive); + } + + @Override + public Response processAgentSharing(AgentShareRequestBody agentShareRequestBody) { + + return agentsApiServiceCore.shareAgent(agentShareRequestBody); + } + + @Override + public Response processAgentSharingAll(AgentShareWithAllRequestBody agentShareWithAllRequestBody) { + + return agentsApiServiceCore.shareAgentWithAll(agentShareWithAllRequestBody); + } + + @Override + public Response processAgentUnsharing(AgentUnshareRequestBody agentUnshareRequestBody) { + + return agentsApiServiceCore.unshareAgent(agentUnshareRequestBody); + } + + @Override + public Response removeAgentSharing(AgentUnshareWithAllRequestBody agentUnshareWithAllRequestBody) { + + return agentsApiServiceCore.unshareAgentWithAll(agentUnshareWithAllRequestBody); + } +} diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/resources/organization-agent-share.yaml b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/resources/organization-agent-share.yaml new file mode 100644 index 0000000000..f1e1be2234 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1/src/main/resources/organization-agent-share.yaml @@ -0,0 +1,638 @@ +openapi: 3.0.0 +info: + version: 1.0.2 + title: 'Agent Sharing API Definition' + description: |- + This API provides organization administrators with the ability to manage agent access across child organizations. It supports operations to share agents with specific or all child organizations, retrieve shared access details, and remove shared access as needed. The API also includes features for paginated retrieval of organizations and roles associated with shared agents. + contact: + name: WSO2 + url: 'http://wso2.com/products/identity-server/' + email: iam-dev@wso2.org + license: + name: Apache 2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +servers: + - url: 'https://{server-url}/t/{tenant-domain}/api/server/v1' + variables: + tenant-domain: + default: "carbon.super" + server-url: + default: "localhost:9443" +paths: + /agents/share: + post: + tags: + - Agent Sharing + summary: Share a agent across specific organizations + description: | + This API shares one or more agents across specified organizations, assigning roles based on the provided policy. The policy defines the sharing scope for each organization, including whether access extends to child organizations. + + Scope(Permission) required: `internal_org_user_share` + operationId: processAgentSharing + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentShareRequestBody' + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + organizations: + - orgId: "b028ca17-8f89-449c-ae27-fa955e66465d" + policy: "SELECTED_ORG_ONLY" + roles: + - displayName: "role_2" + audience: + display: "My Org 1" + type: "organization" + - orgId: "a17b28ca-9f89-449c-ae27-fa955e66465f" + policy: "SELECTED_ORG_ONLY" + roles: [] + required: true + responses: + '202': + description: Sharing process triggered successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessSuccessResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + /agents/share-with-all: + post: + tags: + - Agent Sharing + summary: Share a agent with all organizations + description: | + This API shares agents across all organizations, applying the provided roles to each organization. The policy determines the scope of sharing, including whether it applies to all current organizations or future organizations as well. + + Scope(Permission) required: `internal_agent_share` + operationId: processAgentSharingAll + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentShareWithAllRequestBody' + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + policy: "ALL_EXISTING_ORGS_ONLY" + roles: + - displayName: "role_1" + audience: + display: "My Org 1" + type: "organization" + - displayName: "role_2" + audience: + display: "My App 1" + type: "application" + required: true + responses: + '202': + description: Sharing process triggered successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessSuccessResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + /agents/unshare: + post: + tags: + - Agent Sharing + summary: Unshare a agent from specific organizations + description: | + This API removes shared access for one or more agents from specified organizations. + The payload includes the list of agent IDs and the organizations from which the agents should be unshared. + + Scope(Permission) required: `internal_agent_unshare` + operationId: processAgentUnsharing + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentUnshareRequestBody' + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + organizations: + - "b028ca17-8f89-449c-ae27-fa955e66465d" + - "a17b28ca-9f89-449c-ae27-fa955e66465f" + required: true + responses: + '202': + description: Unsharing process triggered successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessSuccessResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + /agents/unshare-with-all: + post: + tags: + - Agent Sharing + summary: Remove a agent's shared access + description: | + This API removes all shared access for one or more agents, unsharing them from all organizations. + + Scope(Permission) required: `internal_agent_unshare` + operationId: removeAgentSharing + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentUnshareWithAllRequestBody' + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + required: true + responses: + '202': + description: Share removal process triggered successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessSuccessResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + /agents/{agentId}/shared-organizations: + get: + tags: + - Agent Accessible Organizations + summary: Get organizations a agent has access to + description: | + This API retrieves the list of organizations where the specified agent has shared access, with support for pagination and filtering. + + Scope(Permission) required: `internal_agent_shared_access_view` + parameters: + - in: path + name: agentId + required: true + schema: + type: string + description: The ID of the agent whose accessible organizations are being retrieved. + - in: query + name: after + schema: + type: string + description: The cursor pointing to the item after which the next page of results should be returned. + - in: query + name: before + schema: + type: string + description: The cursor pointing to the item before which the previous page of results should be returned. + - in: query + name: limit + schema: + type: integer + description: The maximum number of results to return per page. + - in: query + name: filter + schema: + type: string + description: A filter to apply to the results, such as by organization name or other criteria. + - in: query + name: recursive + schema: + type: boolean + default: false + description: Whether to retrieve organizations recursively, including child organizations. + responses: + '200': + description: Successful Response with Accessible Organizations + content: + application/json: + schema: + $ref: '#/components/schemas/AgentSharedOrganizationsResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + /agents/{agentId}/shared-roles: + get: + tags: + - Agent Accessible Roles + summary: Get roles assigned to a agent in an organization + description: | + This API fetches the roles assigned to the specified agent within a particular organization, with support for pagination, filtering, and recursion. + + Scope(Permission) required: `internal_agent_shared_access_view` + parameters: + - in: path + name: agentId + required: true + schema: + type: string + description: The ID of the agent for whom roles are being retrieved. + - in: query + name: orgId + required: true + schema: + type: string + description: The organization ID for which roles are being fetched. + - in: query + name: after + schema: + type: string + description: The cursor pointing to the item after which the next page of results should be returned. + - in: query + name: before + schema: + type: string + description: The cursor pointing to the item before which the previous page of results should be returned. + - in: query + name: limit + schema: + type: integer + description: The maximum number of results to return per page. + - in: query + name: filter + schema: + type: string + description: Filter to apply when retrieving the roles. + - in: query + name: recursive + schema: + type: boolean + description: Set to true to retrieve roles recursively. + responses: + '200': + description: Successful Response with Accessible Roles + content: + application/json: + schema: + $ref: '#/components/schemas/AgentSharedRolesResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + +components: + schemas: + + AgentShareRequestBody: + type: object + description: | + The request body for sharing agents with multiple child organizations. + Includes a list of agents, organizations, sharing scope as policy, and roles. + required: + - agentCriteria + - organizations + properties: + agentCriteria: + type: object + description: Contains a list of agent IDs to be shared. + properties: + agentIds: + type: array + description: List of agent IDs. + items: + type: string + description: The ID of a agent to be shared. + organizations: + type: array + description: List of organizations specifying sharing scope and roles. + items: + type: object + required: + - orgId + - policy + properties: + orgId: + type: string + description: The ID of the organization to share the agents with. + policy: + type: string + description: The scope of sharing for this organization. + enum: ["SELECTED_ORG_ONLY", "SELECTED_ORG_WITH_ALL_EXISTING_CHILDREN_ONLY", + "SELECTED_ORG_WITH_ALL_EXISTING_AND_FUTURE_CHILDREN", + "SELECTED_ORG_WITH_EXISTING_IMMEDIATE_CHILDREN_ONLY", + "SELECTED_ORG_WITH_EXISTING_IMMEDIATE_AND_FUTURE_CHILDREN", "NO_ORG"] + roles: + type: array + description: A list of roles to be shared with the organization. + items: + $ref: '#/components/schemas/RoleWithAudience' + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + organizations: + - orgId: "b028ca17-8f89-449c-ae27-fa955e66465d" + policy: "SELECTED_ORG_ONLY" + roles: + - displayName: "role_2" + audience: + display: "My Org 1" + type: "organization" + - orgId: "a17b28ca-9f89-449c-ae27-fa955e66465f" + policy: "SELECTED_ORG_ONLY" + roles: [] + + AgentShareWithAllRequestBody: + type: object + description: | + Process a request to share agents with all organizations. + The payload contains the roles applicable across all organizations and a policy that defines the scope of sharing. + required: + - agentCriteria + - policy + properties: + agentCriteria: + type: object + description: Contains a list of agent IDs to be shared. + properties: + agentIds: + type: array + description: List of agent IDs. + items: + type: string + description: The ID of a agent to be shared. + policy: + type: string + description: A policy to specify the sharing scope. + enum: ["ALL_EXISTING_ORGS_ONLY", "ALL_EXISTING_AND_FUTURE_ORGS", "IMMEDIATE_EXISTING_ORGS_ONLY", "IMMEDIATE_EXISTING_AND_FUTURE_ORGS"] + roles: + type: array + description: A list of roles shared across all organizations. + items: + $ref: '#/components/schemas/RoleWithAudience' + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + policy: "ALL_EXISTING_ORGS_ONLY" + roles: + - displayName: "role_1" + audience: + display: "My Org 1" + type: "organization" + - displayName: "role_2" + audience: + display: "My App 1" + type: "application" + + AgentUnshareRequestBody: + type: object + description: | + The request body for unsharing agents from multiple organizations. + Includes a list of agent IDs and a list of organization IDs. + required: + - agentCriteria + - organizations + properties: + agentCriteria: + type: object + description: Contains a list of agent IDs to be unshared. + properties: + agentIds: + type: array + description: List of agent IDs. + items: + type: string + description: The ID of a agent to be unshared. + organizations: + type: array + description: List of organization IDs from which the agents should be unshared. + items: + type: string + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + organizations: + - "b028ca17-8f89-449c-ae27-fa955e66465d" + - "a17b28ca-9f89-449c-ae27-fa955e66465f" + + AgentUnshareWithAllRequestBody: + type: object + description: | + The request body for unsharing agents from all organizations. + Includes a list of agent IDs. + required: + - agentCriteria + properties: + agentCriteria: + type: object + description: Contains a list of agent IDs to be unshared. + properties: + agentIds: + type: array + description: List of agent IDs. + items: + type: string + description: The ID of a agent to be unshared. + example: + agentCriteria: + agentIds: + - "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + - "5d2a1c84-9f7a-43cd-b12e-6e52d7f87e16" + + AgentSharedOrganizationsResponse: + type: object + description: | + Response listing organizations where a agent has shared access, including sharing policies, shared type and pagination links for navigating results. + properties: + links: + type: array + description: Pagination links for navigating the result set. + items: + type: object + properties: + href: + type: string + description: URL to navigate to the next or previous page. + rel: + type: string + description: Indicates if the link is for the "next" or "previous" page. + sharedOrganizations: + type: array + description: A list of shared access details for the agent across multiple organizations + items: + type: object + properties: + orgId: + type: string + description: ID of the child organization + example: "b028ca17-8f89-449c-ae27-fa955e66465d" + orgName: + type: string + description: Name of the child organization + example: "Organization Name" + sharedAgentId: + type: string + description: ID of the shared agent + example: "7a1b7d63-8cfc-4dc9-9332-3f84641b72d8" + sharedType: + type: string + description: Shared type of the agent (SHARED/INVITED) + example: "SHARED" + rolesRef: + type: string + description: URL reference to retrieve paginated roles for the shared agent in this organization + example: "/api/server/v1/agents/{agentId}/shared-roles?orgId=b028ca17-8f89-449c-ae27-fa955e66465d&after=&before=&limit=2&filter=&recursive=false" + + AgentSharedRolesResponse: + type: object + description: | + Response showing the roles assigned to a agent within a specific organization, with pagination support for large role sets. + properties: + links: + type: array + description: Pagination links for navigating the result set. + items: + type: object + properties: + href: + type: string + description: URL to navigate to the next or previous page. + rel: + type: string + description: Indicates if the link is for the "next" or "previous" page. + roles: + type: array + description: A list of roles with audience details + items: + $ref: '#/components/schemas/RoleWithAudience' + + RoleWithAudience: + type: object + description: | + Represents a agent role within a specific audience (organization or application), defined by its display name and audience type. + required: + - displayName + - audience + properties: + displayName: + type: string + description: Display name of the role + example: "role_1" + audience: + type: object + required: + - display + - type + properties: + display: + type: string + description: Display name of the audience + example: "My Org 1" + type: + type: string + description: Type of the audience, e.g., 'organization' or 'application' + example: "organization" + + ProcessSuccessResponse: + type: object + description: | + Indicates that the sharing or unsharing process has started successfully, with the current status and relevant details. + properties: + status: + type: string + description: Status of the process. + example: "Processing" + details: + type: string + description: Additional information about the process. + example: "Agent sharing process triggered successfully." + + Error: + type: object + description: | + Details of an error, including code, message, description, and a trace ID to help with debugging. + required: + - code + - message + - traceId + properties: + code: + type: string + example: "OUI-00000" + description: An error code. + message: + type: string + example: "Some Error Message" + description: An error message. + description: + type: string + example: "Some Error Description" + description: An error description. + traceId: + type: string + format: uuid + example: "e0fbcfeb-7fc2-4b62-8b82-72d3c5fbcdeb" + description: A trace ID in UUID format to help with debugging. diff --git a/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/pom.xml new file mode 100644 index 0000000000..5b13d4d3ab --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management/pom.xml @@ -0,0 +1,36 @@ + + + + + org.wso2.carbon.identity.server.api + identity-api-server + 1.3.156-SNAPSHOT + ../../pom.xml + + + 4.0.0 + org.wso2.carbon.identity.api.server.organization.agent.sharing.management + pom + + + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1 + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common + + + diff --git a/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.common/pom.xml index 1406f028a5..9cc12cf02f 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.configs - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.organization.configs.common diff --git a/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.v1/pom.xml index ae8d8c772c..d9cc09ca14 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.configs/org.wso2.carbon.identity.api.server.organization.configs.v1/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.configs - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.organization.configs.v1 diff --git a/components/org.wso2.carbon.identity.api.server.organization.configs/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.configs/pom.xml index 6c61b765c8..f31a56279f 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.configs/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.configs/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.common/pom.xml index 49bb617014..a1fc24966a 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.v1/pom.xml index fad4b7b906..03b87451b5 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.management/org.wso2.carbon.identity.api.server.organization.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.management/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.management/pom.xml index 047a769413..b4f2f7b060 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.management/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.common/pom.xml index 34837fecfc..707e54eb75 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.role.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.v1/pom.xml index 2cfa2171ce..44e3552e2e 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.role.management/org.wso2.carbon.identity.api.server.organization.role.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.role.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.role.management/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.role.management/pom.xml index eda49349f8..fd2ef8366d 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.role.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.role.management/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.common/pom.xml index 6b322a21b7..9bb363c965 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.selfservice ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.v1/pom.xml index 6f1479b040..0b03151a8b 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.selfservice/org.wso2.carbon.identity.api.server.organization.selfservice.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.selfservice ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.organization.selfservice.v1 diff --git a/components/org.wso2.carbon.identity.api.server.organization.selfservice/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.selfservice/pom.xml index f6f0865114..f72e239799 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.selfservice/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.selfservice/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.common/pom.xml index 4e0774a4cc..61480fa44e 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.user.invitation.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.v1/pom.xml index 2c069a7a2b..50669238a2 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/org.wso2.carbon.identity.api.server.organization.user.invitation.management.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.user.invitation.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/pom.xml index b7f27b16c4..a3e8cb2e04 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.user.invitation.management/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/pom.xml index b2c8c57a2d..edf24158f2 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.user.sharing.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/user/sharing/management/common/constants/UserSharingMgtConstants.java b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/user/sharing/management/common/constants/UserSharingMgtConstants.java index 3a85b578c6..3efe602e78 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/user/sharing/management/common/constants/UserSharingMgtConstants.java +++ b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.common/src/main/java/org/wso2/carbon/identity/api/server/organization/user/sharing/management/common/constants/UserSharingMgtConstants.java @@ -31,6 +31,8 @@ public class UserSharingMgtConstants { public static final String RESPONSE_DETAIL_USER_SHARE = "User sharing process triggered successfully."; public static final String RESPONSE_DETAIL_USER_UNSHARE = "User unsharing process triggered successfully."; + public static final String IS_AGENT_SHARING = "isAgentSharing"; + /** * Enum for user sharing management related errors. * Error Code - code to identify the error. diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.v1/pom.xml index bd815ef238..9fad5a8f1a 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/org.wso2.carbon.identity.api.server.organization.user.sharing.management.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.organization.user.sharing.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/pom.xml b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/pom.xml index 315985b340..8268a19fce 100644 --- a/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.organization.user.sharing.management/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.common/pom.xml index a5511b663a..9a591ebc1c 100644 --- a/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.permission.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT WSO2 Identity Server - Common Permission Management WSO2 Identity Server - PCommon Permission Management diff --git a/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.v1/pom.xml index a0db1bb0de..114e9c44dc 100644 --- a/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.permission.management/org.wso2.carbon.identity.api.server.permission.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.permission.management ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.permission.management.v1 diff --git a/components/org.wso2.carbon.identity.api.server.permission.management/pom.xml b/components/org.wso2.carbon.identity.api.server.permission.management/pom.xml index 0f276a0716..255db56ece 100644 --- a/components/org.wso2.carbon.identity.api.server.permission.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.permission.management/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.common/pom.xml b/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.common/pom.xml index 8439f23faa..8f34a81dff 100644 --- a/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.rule.metadata - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.v1/pom.xml index 7428250800..8c7ead405a 100644 --- a/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.rule.metadata/org.wso2.carbon.identity.api.server.rule.metadata.v1/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.rule.metadata - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.rule.metadata/pom.xml b/components/org.wso2.carbon.identity.api.server.rule.metadata/pom.xml index e54a671baf..475fcbee06 100644 --- a/components/org.wso2.carbon.identity.api.server.rule.metadata/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.rule.metadata/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.common/pom.xml b/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.common/pom.xml index e822bf4c17..2e064e820f 100644 --- a/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.common/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.api.server.script.library org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.v1/pom.xml index 2f378fe842..1cfb82ff72 100644 --- a/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.script.library/org.wso2.carbon.identity.api.server.script.library.v1/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.script.library/pom.xml b/components/org.wso2.carbon.identity.api.server.script.library/pom.xml index fa06c9fde8..4987e48960 100644 --- a/components/org.wso2.carbon.identity.api.server.script.library/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.script.library/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.common/pom.xml index b906dda509..7d0b865a46 100644 --- a/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.secret.management - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.v1/pom.xml index 105f053381..6e65e40467 100644 --- a/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.secret.management/org.wso2.carbon.identity.api.server.secret.management.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.secret.management - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.secret.management/pom.xml b/components/org.wso2.carbon.identity.api.server.secret.management/pom.xml index 4a61f1c7b9..89bd3b65fb 100644 --- a/components/org.wso2.carbon.identity.api.server.secret.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.secret.management/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.common/pom.xml index 61ceef6965..f2ac3f1b4a 100644 --- a/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.common/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.api.server.tenant.management org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.v1/pom.xml index c1394bb6c3..7a3d9bdbda 100644 --- a/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.tenant.management/org.wso2.carbon.identity.api.server.tenant.management.v1/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.tenant.management/pom.xml b/components/org.wso2.carbon.identity.api.server.tenant.management/pom.xml index 00f00684e2..a7ea7aea91 100644 --- a/components/org.wso2.carbon.identity.api.server.tenant.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.tenant.management/pom.xml @@ -18,7 +18,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.common/pom.xml b/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.common/pom.xml index 602ef659d2..3bf360d15e 100644 --- a/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.common/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.identity.api.server.userstore org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.v1/pom.xml index 2c4200fec4..8feff6b655 100644 --- a/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.userstore/org.wso2.carbon.identity.api.server.userstore.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.userstore ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 org.wso2.carbon.identity.api.server.userstore.v1 diff --git a/components/org.wso2.carbon.identity.api.server.userstore/pom.xml b/components/org.wso2.carbon.identity.api.server.userstore/pom.xml index ffee2fc8a1..861362847f 100644 --- a/components/org.wso2.carbon.identity.api.server.userstore/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.userstore/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.common/pom.xml index db1a5a0da9..8d0b4d52a9 100644 --- a/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.webhook.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.v1/pom.xml index d02733d507..2795029ac7 100644 --- a/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.webhook.management/org.wso2.carbon.identity.api.server.webhook.management.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.webhook.management - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.webhook.management/pom.xml b/components/org.wso2.carbon.identity.api.server.webhook.management/pom.xml index 5b45919f4c..666b5700e4 100644 --- a/components/org.wso2.carbon.identity.api.server.webhook.management/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.webhook.management/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api identity-api-server - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.common/pom.xml b/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.common/pom.xml index bf8943ea61..955bd3826e 100644 --- a/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.webhook.metadata - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.v1/pom.xml index 7415efa538..b227661276 100644 --- a/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.webhook.metadata/org.wso2.carbon.identity.api.server.webhook.metadata.v1/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.webhook.metadata - 1.3.153 + 1.3.156-SNAPSHOT ../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.webhook.metadata/pom.xml b/components/org.wso2.carbon.identity.api.server.webhook.metadata/pom.xml index 77028edfd1..db3102ec09 100644 --- a/components/org.wso2.carbon.identity.api.server.webhook.metadata/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.webhook.metadata/pom.xml @@ -21,7 +21,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.api.server.workflow.common/pom.xml b/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.api.server.workflow.common/pom.xml index 72122775d7..dc206d7f3b 100644 --- a/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.api.server.workflow.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.api.server.workflow.common/pom.xml @@ -24,7 +24,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.workflow ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT org.wso2.carbon.identity.api.server.workflow.common diff --git a/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.rest.api.server.workflow.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.rest.api.server.workflow.v1/pom.xml index a305428352..4237044e06 100644 --- a/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.rest.api.server.workflow.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.workflow/org.wso2.carbon.identity.rest.api.server.workflow.v1/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.workflow ../pom.xml - 1.3.153 + 1.3.156-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.api.server.workflow/pom.xml b/components/org.wso2.carbon.identity.api.server.workflow/pom.xml index 70c0d2bff4..eed9484d94 100644 --- a/components/org.wso2.carbon.identity.api.server.workflow/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.workflow/pom.xml @@ -20,7 +20,7 @@ identity-api-server org.wso2.carbon.identity.server.api - 1.3.153 + 1.3.156-SNAPSHOT ../../pom.xml pom diff --git a/pom.xml b/pom.xml index ed42a903a6..be059a39a5 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ 4.0.0 identity-api-server pom - 1.3.153 + 1.3.156-SNAPSHOT WSO2 Identity Server - Server API Module @@ -41,7 +41,7 @@ scm:git:https://github.com/wso2/identity-api-server.git scm:git:https://github.com/wso2/identity-api-server.git - v1.3.153 + HEAD @@ -726,6 +726,18 @@ ${org.wso2.carbon.identity.organization.management.version} provided + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.common + ${project.version} + provided + + + org.wso2.carbon.identity.server.api + org.wso2.carbon.identity.api.server.organization.agent.sharing.management.v1 + ${project.version} + provided + org.wso2.carbon.identity.organization.management org.wso2.carbon.identity.organization.resource.sharing.policy.management @@ -953,7 +965,7 @@ 1.4 1.2.4 1.11.27 - 7.8.305 + 7.8.317 3.0.5 1.12.0 **/gen/**/* @@ -1040,6 +1052,7 @@ components/org.wso2.carbon.identity.api.server.webhook.metadata components/org.wso2.carbon.identity.api.server.workflow components/org.wso2.carbon.identity.api.server.asynchronous.operation.status.management + components/org.wso2.carbon.identity.api.server.organization.agent.sharing.management