From 979250554bda206a430cf91e81451b2dd63034cf Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Wed, 22 Jan 2025 05:34:09 +0530 Subject: [PATCH 01/15] Allow handle claim mappings with idp group to role assigment resolving --- .../identity/oauth2/util/ClaimsUtil.java | 65 +++++++++++++++++-- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java index e611d36715..84b4f2a9f6 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java @@ -30,6 +30,7 @@ import org.w3c.dom.Element; import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; +import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants; import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.identity.application.common.model.ClaimConfig; @@ -291,6 +292,25 @@ private static List getRequestedLocalClaims(ClaimMapping[] spClaimMappin return requestedLocalClaims; } + /** + * Handle claims from identity provider based on claim configurations. + * + * @param identityProvider Identity Provider. + * @param attributes Relevant Claims coming from IDP + * @param tenantDomain Tenant Domain. + * @param tokenReqMsgCtx Token request message context. + * @return Mapped local claims. + * @throws IdentityException + * @throws IdentityApplicationManagementException + */ + public static Map handleClaimMapping(IdentityProvider identityProvider, + Map attributes, String tenantDomain, + OAuthTokenReqMessageContext tokenReqMsgCtx) + throws IdentityException, IdentityApplicationManagementException { + + return handleClaimMapping(identityProvider, attributes, tenantDomain, tokenReqMsgCtx, false); + } + /** * Handle claims from identity provider based on claim configurations. * @@ -298,26 +318,38 @@ private static List getRequestedLocalClaims(ClaimMapping[] spClaimMappin * @param attributes Relevant Claims coming from IDP * @param tenantDomain Tenant Domain. * @param tokenReqMsgCtx Token request message context. - * @return mapped local claims. + * @return Mapped local claims. * @throws IdentityException * @throws IdentityApplicationManagementException */ public static Map handleClaimMapping(IdentityProvider identityProvider, - Map attributes, String tenantDomain, OAuthTokenReqMessageContext tokenReqMsgCtx) + Map attributes, String tenantDomain, + OAuthTokenReqMessageContext tokenReqMsgCtx, + boolean resolveIdPGroupAssignments) throws IdentityException, IdentityApplicationManagementException { + List assignedRoles = null; + ServiceProvider serviceProvider = null; + if (resolveIdPGroupAssignments) { + serviceProvider = getServiceProvider(tokenReqMsgCtx); + String applicationId = serviceProvider.getApplicationResourceId(); + assignedRoles = getAssignedRolesFromIdPGroups(identityProvider, attributes, applicationId, + tenantDomain); + } boolean proxyUserAttributes = !OAuthServerConfiguration.getInstance() .isConvertOriginalClaimsFromAssertionsToOIDCDialect(); if (proxyUserAttributes) { setHasNonOIDCClaimsProperty(tokenReqMsgCtx); - return attributes; + return appendIdPMappedUserRolesAttributes(attributes, assignedRoles); } ClaimMapping[] idPClaimMappings = identityProvider.getClaimConfig().getClaimMappings(); Map claimsAfterIdpMapping; Map claimsAfterSPMapping = new HashMap<>(); - ServiceProvider serviceProvider = getServiceProvider(tokenReqMsgCtx); + if (serviceProvider == null) { + serviceProvider = getServiceProvider(tokenReqMsgCtx); + } if (ArrayUtils.isNotEmpty(idPClaimMappings)) { if (log.isDebugEnabled()) { @@ -378,7 +410,30 @@ public static Map handleClaimMapping(IdentityProvider identityPr } } } - return claimsAfterSPMapping; + return appendIdPMappedUserRolesAttributes(claimsAfterSPMapping, assignedRoles); + } + + private static List getAssignedRolesFromIdPGroups(IdentityProvider identityProvider, + Map attributes, String applicationId, + String tenantDomain) { + + String idpGroupClaimURI = FrameworkUtils.getEffectiveIdpGroupClaimUri(identityProvider, tenantDomain); + if (StringUtils.isBlank(idpGroupClaimURI)) { + return new ArrayList<>(); + } + + return FrameworkUtils.getAppAssociatedRolesFromFederatedUserAttributes(attributes, identityProvider, + applicationId, idpGroupClaimURI, tenantDomain); + } + + private static Map appendIdPMappedUserRolesAttributes(Map attributes, + List assignedRoles) { + + if (CollectionUtils.isNotEmpty(assignedRoles)) { + attributes.put(FrameworkConstants.IDP_MAPPED_USER_ROLES, + String.join(FrameworkUtils.getMultiAttributeSeparator(), assignedRoles)); + } + return attributes; } /** From da35c4c2ade98f170f8afcd3855a773adee1c9db Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Thu, 23 Jan 2025 13:29:12 +0530 Subject: [PATCH 02/15] Exclude identityProviderMappedUserRoles claim when returning user claims --- .../openidconnect/DefaultOIDCClaimsCallbackHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultOIDCClaimsCallbackHandler.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultOIDCClaimsCallbackHandler.java index 28ecc6a82e..21624bcc0c 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultOIDCClaimsCallbackHandler.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultOIDCClaimsCallbackHandler.java @@ -28,6 +28,7 @@ import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; +import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants; import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.identity.application.common.model.ClaimMapping; @@ -172,6 +173,8 @@ private Map getUserClaimsInOIDCDialect(OAuthTokenReqMessageConte // Get claim map from the cached attributes userClaimsInOIDCDialect = getOIDCClaimsFromUserAttributes(userAttributes, requestMsgCtx); } + // Remove the identityProviderMappedUserRoles claim since it is not an OIDC claim. + userClaimsInOIDCDialect.remove(FrameworkConstants.IDP_MAPPED_USER_ROLES); Object hasNonOIDCClaimsProperty = requestMsgCtx.getProperty(OIDCConstants.HAS_NON_OIDC_CLAIMS); if (isPreserverClaimUrisInAssertion(requestMsgCtx) || (hasNonOIDCClaimsProperty != null From f9bfb6c59bdf00fa45c59fa02499cdd7d5fac9aa Mon Sep 17 00:00:00 2001 From: ashirwadadayarathne Date: Fri, 24 Jan 2025 08:32:20 +0530 Subject: [PATCH 03/15] Fix issue in DCR Additional attribute filter not working as OSGI --- .../pom.xml | 4 +- .../oauth/dcr/internal/DCRDataHolder.java | 12 +++++ .../dcr/internal/DCRServiceComponent.java | 14 ++++++ .../oauth/dcr/service/DCRMService.java | 48 +++---------------- 4 files changed, 36 insertions(+), 42 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index e9ebb182db..164ff19205 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -180,8 +180,10 @@ !org.wso2.carbon.identity.oauth.dcr.internal, - org.wso2.carbon.identity.oauth.dcr.*;version="${identity.inbound.auth.oauth.exp.pkg.version}" + org.wso2.carbon.identity.oauth.dcr.*;version="${identity.inbound.auth.oauth.exp.pkg.version}", + org.wso2.carbon.identity.oauth.dcr.handler.*;version="${identity.inbound.auth.oauth.exp.pkg.version}" + * diff --git a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRDataHolder.java b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRDataHolder.java index 25bf98dbe3..b6150a49f9 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRDataHolder.java +++ b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRDataHolder.java @@ -20,6 +20,7 @@ import org.wso2.carbon.identity.application.mgt.ApplicationManagementService; import org.wso2.carbon.identity.configuration.mgt.core.ConfigurationManager; +import org.wso2.carbon.identity.oauth.dcr.handler.AdditionalAttributeFilter; import org.wso2.carbon.identity.oauth.dcr.handler.RegistrationHandler; import org.wso2.carbon.identity.oauth.dcr.handler.UnRegistrationHandler; import org.wso2.carbon.identity.oauth2.token.bindings.TokenBinder; @@ -41,6 +42,7 @@ public class DCRDataHolder { private List registrationHandlerList = new ArrayList<>(); private List unRegistrationHandlerList = new ArrayList<>(); private List tokenBinders = new ArrayList<>(); + private AdditionalAttributeFilter additionalAttributeFilter = null; private ConfigurationManager configurationManager; private OrganizationManager organizationManager; @@ -122,4 +124,14 @@ public void setOrganizationManager(OrganizationManager organizationManager) { this.organizationManager = organizationManager; } + + public AdditionalAttributeFilter getAdditionalAttributeFilter() { + + return additionalAttributeFilter; + } + + public void setAdditionalAttributeFilter(AdditionalAttributeFilter additionalAttributeFilter) { + + this.additionalAttributeFilter = additionalAttributeFilter; + } } diff --git a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java index 6a0b63318a..286224c2bc 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java +++ b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java @@ -30,6 +30,8 @@ import org.wso2.carbon.identity.application.authentication.framework.inbound.IdentityProcessor; import org.wso2.carbon.identity.application.mgt.ApplicationManagementService; import org.wso2.carbon.identity.configuration.mgt.core.ConfigurationManager; +import org.wso2.carbon.identity.core.util.IdentityUtil; +import org.wso2.carbon.identity.oauth.common.OAuthConstants; import org.wso2.carbon.identity.oauth.common.token.bindings.TokenBinderInfo; import org.wso2.carbon.identity.oauth.dcr.DCRConfigurationMgtService; import org.wso2.carbon.identity.oauth.dcr.DCRConfigurationMgtServiceImpl; @@ -37,6 +39,7 @@ import org.wso2.carbon.identity.oauth.dcr.factory.HttpUnregistrationResponseFactory; import org.wso2.carbon.identity.oauth.dcr.factory.RegistrationRequestFactory; import org.wso2.carbon.identity.oauth.dcr.factory.UnregistrationRequestFactory; +import org.wso2.carbon.identity.oauth.dcr.handler.AdditionalAttributeFilter; import org.wso2.carbon.identity.oauth.dcr.handler.RegistrationHandler; import org.wso2.carbon.identity.oauth.dcr.handler.UnRegistrationHandler; import org.wso2.carbon.identity.oauth.dcr.processor.DCRProcessor; @@ -85,6 +88,17 @@ protected void activate(ComponentContext componentContext) { new DCRMService(), null); componentContext.getBundleContext().registerService(DCRConfigurationMgtService.class.getName(), new DCRConfigurationMgtServiceImpl(), null); + + String attributeFilterName = IdentityUtil.getProperty(OAuthConstants.ADDITIONAL_ATTRIBUTE_FILTER); + if (attributeFilterName != null) { + Class clazz = Thread.currentThread().getContextClassLoader() + .loadClass(attributeFilterName); + Object attributeFilter = clazz.newInstance(); + if (attributeFilter instanceof AdditionalAttributeFilter) { + DCRDataHolder.getInstance() + .setAdditionalAttributeFilter((AdditionalAttributeFilter) attributeFilter); + } + } } catch (Throwable e) { log.error("Error occurred while activating DCRServiceComponent", e); } diff --git a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMService.java b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMService.java index ae87ca10fe..39d6ab9f99 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMService.java +++ b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMService.java @@ -27,7 +27,6 @@ import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; -import org.wso2.carbon.identity.application.common.IdentityApplicationManagementValidationException; import org.wso2.carbon.identity.application.common.model.AssociatedRolesConfig; import org.wso2.carbon.identity.application.common.model.InboundAuthenticationConfig; import org.wso2.carbon.identity.application.common.model.InboundAuthenticationRequestConfig; @@ -41,7 +40,6 @@ import org.wso2.carbon.identity.oauth.IdentityOAuthAdminException; import org.wso2.carbon.identity.oauth.IdentityOAuthClientException; import org.wso2.carbon.identity.oauth.OAuthAdminService; -import org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes; import org.wso2.carbon.identity.oauth.common.OAuthConstants; import org.wso2.carbon.identity.oauth.common.exception.InvalidOAuthClientException; import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration; @@ -67,7 +65,6 @@ import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import org.wso2.carbon.user.api.UserStoreException; -import java.lang.reflect.InvocationTargetException; import java.text.ParseException; import java.util.ArrayList; import java.util.Arrays; @@ -120,18 +117,8 @@ public Application getApplication(String clientId) throws DCRMException { Application application = buildResponse(consumerAppDTO, tenantDomain); application.setExtAllowedAudience(serviceProvider.getAssociatedRolesConfig().getAllowedAudience()); - String attributeFilterName = IdentityUtil.getProperty(OAuthConstants.ADDITIONAL_ATTRIBUTE_FILTER); - if (StringUtils.isNotBlank(attributeFilterName)) { - AdditionalAttributeFilter attributeHandler; - try { - attributeHandler = (AdditionalAttributeFilter) - Class.forName(attributeFilterName).getDeclaredConstructor().newInstance(); - } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | - IllegalAccessException | InvocationTargetException e) { - log.error("Configured DCR additional attribute handler cannot be loaded"); - throw new DCRMServerException(OAuth2ErrorCodes.SERVER_ERROR, - DCRMConstants.ErrorMessages.ADDITIONAL_ATTRIBUTE_ERROR.getMessage(), e); - } + AdditionalAttributeFilter attributeHandler = DCRDataHolder.getInstance().getAdditionalAttributeFilter(); + if (attributeHandler != null) { List responseAttributes = attributeHandler.getResponseAttributeKeys(); Map storedAttributes = Arrays.stream(serviceProvider.getSpProperties()) .filter(entry -> responseAttributes.contains(entry.getName())) @@ -285,17 +272,8 @@ public Application updateApplication(ApplicationUpdateRequest updateRequest, Str } //Validating and filtering additional attributes via extension - String attributeFilterName = IdentityUtil.getProperty(OAuthConstants.ADDITIONAL_ATTRIBUTE_FILTER); - if (StringUtils.isNotBlank(attributeFilterName)) { - try { - attributeHandler = (AdditionalAttributeFilter) - Class.forName(attributeFilterName).getDeclaredConstructor().newInstance(); - } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | - IllegalAccessException | InvocationTargetException e) { - log.error("Configured DCR additional attribute handler cannot be loaded"); - throw new DCRMServerException(OAuth2ErrorCodes.SERVER_ERROR, - DCRMConstants.ErrorMessages.ADDITIONAL_ATTRIBUTE_ERROR.getMessage(), e); - } + attributeHandler = DCRDataHolder.getInstance().getAdditionalAttributeFilter(); + if (attributeHandler != null) { if (ssaClaims != null || !updateRequest.getAdditionalAttributes().isEmpty()) { processedAttributes = attributeHandler.filterDCRUpdateAttributes(updateRequest, ssaClaims, sp.getSpProperties()); @@ -595,20 +573,11 @@ private Application createOAuthApplication(ApplicationRegistrationRequest regist ServiceProvider serviceProvider; Map processedAttributes = null; - AdditionalAttributeFilter attributeHandler = null; //Validating and filtering additional attributes via extension - String attributeFilterName = IdentityUtil.getProperty(OAuthConstants.ADDITIONAL_ATTRIBUTE_FILTER); - if (StringUtils.isNotBlank(attributeFilterName)) { - try { - attributeHandler = (AdditionalAttributeFilter) - Class.forName(attributeFilterName).getDeclaredConstructor().newInstance(); - } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | - InvocationTargetException e) { - log.error("Configured DCR additional attribute handler cannot be loaded"); - throw new DCRMServerException(OAuth2ErrorCodes.SERVER_ERROR, - DCRMConstants.ErrorMessages.ADDITIONAL_ATTRIBUTE_ERROR.getMessage(), e); - } + AdditionalAttributeFilter attributeHandler = DCRDataHolder.getInstance().getAdditionalAttributeFilter(); + if (attributeHandler != null) { + if (ssaClaims != null || !registrationRequest.getAdditionalAttributes().isEmpty()) { processedAttributes = attributeHandler.filterDCRRegisterAttributes(registrationRequest, ssaClaims); } @@ -978,9 +947,6 @@ private void updateServiceProvider(ServiceProvider serviceProvider, String tenan try { DCRDataHolder.getInstance().getApplicationManagementService() .updateApplication(serviceProvider, tenantDomain, userName); - } catch (IdentityApplicationManagementValidationException e) { - throw DCRMUtils.generateClientException(DCRMConstants.ErrorMessages.BAD_REQUEST_INVALID_SP_INPUT, - serviceProvider.getApplicationName()); } catch (IdentityApplicationManagementException e) { throw DCRMUtils.generateServerException( DCRMConstants.ErrorMessages.FAILED_TO_UPDATE_SP, serviceProvider.getApplicationName(), e); From 4f907769fd1323b460ebd4406b257338fefdd6f6 Mon Sep 17 00:00:00 2001 From: ashirwadadayarathne Date: Fri, 24 Jan 2025 10:05:53 +0530 Subject: [PATCH 04/15] Improving unit tests --- .../oauth/dcr/service/DCRMServiceTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/org.wso2.carbon.identity.oauth.dcr/src/test/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMServiceTest.java b/components/org.wso2.carbon.identity.oauth.dcr/src/test/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMServiceTest.java index 8edaea61d9..94ca757209 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/src/test/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMServiceTest.java +++ b/components/org.wso2.carbon.identity.oauth.dcr/src/test/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMServiceTest.java @@ -53,6 +53,7 @@ import org.wso2.carbon.identity.oauth.dcr.exception.DCRMClientException; import org.wso2.carbon.identity.oauth.dcr.exception.DCRMException; import org.wso2.carbon.identity.oauth.dcr.exception.DCRMServerException; +import org.wso2.carbon.identity.oauth.dcr.handler.AdditionalAttributeFilter; import org.wso2.carbon.identity.oauth.dcr.internal.DCRDataHolder; import org.wso2.carbon.identity.oauth.dcr.util.DCRConstants; import org.wso2.carbon.identity.oauth.dcr.util.ErrorCodes; @@ -132,6 +133,7 @@ public void setUp() throws Exception { mockOAuthAdminService = mock(OAuthAdminService.class); applicationRegistrationRequest = new ApplicationRegistrationRequest(); applicationRegistrationRequest.setClientName(dummyClientName); + applicationRegistrationRequest.setAdditionalAttributes(new HashMap<>()); dcrmService = new DCRMService(); mockApplicationManagementService = mock(ApplicationManagementService.class); DCRDataHolder dcrDataHolder = DCRDataHolder.getInstance(); @@ -148,6 +150,17 @@ public void setUp() throws Exception { mockedUserStoreManager = mock(AbstractUserStoreManager.class); mockConfigurationManager = mock(ConfigurationManager.class); DCRDataHolder.getInstance().setConfigurationManager(mockConfigurationManager); + + List responseKeys = new ArrayList<>(); + Map processedAttributes = new HashMap<>(); + AdditionalAttributeFilter additionalAttributeFilter = mock(AdditionalAttributeFilter.class); + lenient().when(additionalAttributeFilter.filterDCRRegisterAttributes(any(), any())) + .thenReturn(processedAttributes); + lenient().when(additionalAttributeFilter.filterDCRUpdateAttributes(any(), any(), any())) + .thenReturn(processedAttributes); + lenient().when(additionalAttributeFilter.processDCRGetAttributes(any())).thenReturn(processedAttributes); + lenient().when(additionalAttributeFilter.getResponseAttributeKeys()).thenReturn(responseKeys); + DCRDataHolder.getInstance().setAdditionalAttributeFilter(additionalAttributeFilter); } @AfterMethod @@ -1104,6 +1117,8 @@ private OAuthConsumerAppDTO updateApplication() applicationUpdateRequest.setGrantTypes(dummyGrantTypes); applicationUpdateRequest.setTokenType(dummyTokenType); applicationUpdateRequest.setBackchannelLogoutUri(dummyBackchannelLogoutUri); + applicationUpdateRequest.setAdditionalAttributes(new HashMap<>()); + OAuthConsumerAppDTO dto = new OAuthConsumerAppDTO(); dto.setApplicationName(dummyClientName); From 581e6f2eb88d255b51bc4cc6bb86846443c6eae0 Mon Sep 17 00:00:00 2001 From: ashirwadadayarathne Date: Fri, 24 Jan 2025 12:18:49 +0530 Subject: [PATCH 05/15] Fix issue in DCR Additional attribute filter not working as OSGI --- .../pom.xml | 1 - .../dcr/internal/DCRServiceComponent.java | 28 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index 164ff19205..5c7a42a2f8 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -183,7 +183,6 @@ org.wso2.carbon.identity.oauth.dcr.*;version="${identity.inbound.auth.oauth.exp.pkg.version}", org.wso2.carbon.identity.oauth.dcr.handler.*;version="${identity.inbound.auth.oauth.exp.pkg.version}" - * diff --git a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java index 286224c2bc..add4f5d39d 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java +++ b/components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/internal/DCRServiceComponent.java @@ -30,8 +30,6 @@ import org.wso2.carbon.identity.application.authentication.framework.inbound.IdentityProcessor; import org.wso2.carbon.identity.application.mgt.ApplicationManagementService; import org.wso2.carbon.identity.configuration.mgt.core.ConfigurationManager; -import org.wso2.carbon.identity.core.util.IdentityUtil; -import org.wso2.carbon.identity.oauth.common.OAuthConstants; import org.wso2.carbon.identity.oauth.common.token.bindings.TokenBinderInfo; import org.wso2.carbon.identity.oauth.dcr.DCRConfigurationMgtService; import org.wso2.carbon.identity.oauth.dcr.DCRConfigurationMgtServiceImpl; @@ -88,17 +86,6 @@ protected void activate(ComponentContext componentContext) { new DCRMService(), null); componentContext.getBundleContext().registerService(DCRConfigurationMgtService.class.getName(), new DCRConfigurationMgtServiceImpl(), null); - - String attributeFilterName = IdentityUtil.getProperty(OAuthConstants.ADDITIONAL_ATTRIBUTE_FILTER); - if (attributeFilterName != null) { - Class clazz = Thread.currentThread().getContextClassLoader() - .loadClass(attributeFilterName); - Object attributeFilter = clazz.newInstance(); - if (attributeFilter instanceof AdditionalAttributeFilter) { - DCRDataHolder.getInstance() - .setAdditionalAttributeFilter((AdditionalAttributeFilter) attributeFilter); - } - } } catch (Throwable e) { log.error("Error occurred while activating DCRServiceComponent", e); } @@ -287,4 +274,19 @@ protected void unsetOrganizationManager(OrganizationManager organizationManager) DCRDataHolder.getInstance().setOrganizationManager(null); log.debug("Unset organization management service."); } + + @Reference(name = "identity.oauth.dcr.attribute.filter", + service = AdditionalAttributeFilter.class, + cardinality = ReferenceCardinality.MULTIPLE, + policy = ReferencePolicy.DYNAMIC, + unbind = "unsetAdditionalAttributeFilter") + protected void setAdditionalAttributeFilter(AdditionalAttributeFilter additionalAttributeFilter) { + + DCRDataHolder.getInstance().setAdditionalAttributeFilter(additionalAttributeFilter); + } + + protected void unsetAdditionalAttributeFilter(AdditionalAttributeFilter tokenBinderInfo) { + + DCRDataHolder.getInstance().setAdditionalAttributeFilter(null); + } } From d7194b3526f0096f92d2387ffa43397e926f0816 Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Sun, 26 Jan 2025 06:14:26 +0530 Subject: [PATCH 06/15] Bump framework version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 98a2fa4e96..264e862478 100644 --- a/pom.xml +++ b/pom.xml @@ -944,7 +944,7 @@ [1.0.1, 2.0.0) - 7.7.49 + 7.7.140 [5.25.234, 8.0.0) [2.0.0, 3.0.0) From d7dd463d165b1ddb4c4b733acdbfc6dbe0d8c112 Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Sun, 26 Jan 2025 06:34:51 +0530 Subject: [PATCH 07/15] Refactor code --- .../identity/oauth2/util/ClaimsUtil.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java index 84b4f2a9f6..23a84d7c85 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java @@ -19,6 +19,7 @@ package org.wso2.carbon.identity.oauth2.util; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; @@ -29,6 +30,7 @@ import org.opensaml.saml.saml2.core.AttributeStatement; import org.w3c.dom.Element; import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.identity.application.authentication.framework.exception.FrameworkException; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants; import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils; @@ -329,11 +331,9 @@ public static Map handleClaimMapping(IdentityProvider identityPr throws IdentityException, IdentityApplicationManagementException { List assignedRoles = null; - ServiceProvider serviceProvider = null; + ServiceProvider serviceProvider = getServiceProvider(tokenReqMsgCtx); if (resolveIdPGroupAssignments) { - serviceProvider = getServiceProvider(tokenReqMsgCtx); - String applicationId = serviceProvider.getApplicationResourceId(); - assignedRoles = getAssignedRolesFromIdPGroups(identityProvider, attributes, applicationId, + assignedRoles = getAssignedRolesFromIdPGroups(identityProvider, attributes, serviceProvider, tenantDomain); } boolean proxyUserAttributes = !OAuthServerConfiguration.getInstance() @@ -347,9 +347,6 @@ public static Map handleClaimMapping(IdentityProvider identityPr ClaimMapping[] idPClaimMappings = identityProvider.getClaimConfig().getClaimMappings(); Map claimsAfterIdpMapping; Map claimsAfterSPMapping = new HashMap<>(); - if (serviceProvider == null) { - serviceProvider = getServiceProvider(tokenReqMsgCtx); - } if (ArrayUtils.isNotEmpty(idPClaimMappings)) { if (log.isDebugEnabled()) { @@ -414,8 +411,14 @@ public static Map handleClaimMapping(IdentityProvider identityPr } private static List getAssignedRolesFromIdPGroups(IdentityProvider identityProvider, - Map attributes, String applicationId, - String tenantDomain) { + Map attributes, + ServiceProvider serviceProvider, + String tenantDomain) throws FrameworkException { + + if (serviceProvider == null || MapUtils.isEmpty(attributes)) { + return new ArrayList<>(); + } + String applicationId = serviceProvider.getApplicationResourceId(); String idpGroupClaimURI = FrameworkUtils.getEffectiveIdpGroupClaimUri(identityProvider, tenantDomain); if (StringUtils.isBlank(idpGroupClaimURI)) { From cbe31dbad53ee34546a245196081b962fd31d95c Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Sun, 26 Jan 2025 06:42:58 +0530 Subject: [PATCH 08/15] Deprecate previous method and fix comments --- .../identity/oauth2/util/ClaimsUtil.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java index 23a84d7c85..3f2a78bfc2 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/ClaimsUtil.java @@ -298,13 +298,15 @@ private static List getRequestedLocalClaims(ClaimMapping[] spClaimMappin * Handle claims from identity provider based on claim configurations. * * @param identityProvider Identity Provider. - * @param attributes Relevant Claims coming from IDP - * @param tenantDomain Tenant Domain. - * @param tokenReqMsgCtx Token request message context. + * @param attributes Relevant Claims coming from IDP + * @param tenantDomain Tenant Domain. + * @param tokenReqMsgCtx Token request message context. * @return Mapped local claims. - * @throws IdentityException - * @throws IdentityApplicationManagementException + * @throws IdentityException If an error occurred while handling claim mappings. + * @throws IdentityApplicationManagementException If an error occurred while getting service provider. + * @deprecated Use {@link #handleClaimMapping(IdentityProvider, Map, String, OAuthTokenReqMessageContext, boolean)}. */ + @Deprecated public static Map handleClaimMapping(IdentityProvider identityProvider, Map attributes, String tenantDomain, OAuthTokenReqMessageContext tokenReqMsgCtx) @@ -316,13 +318,14 @@ public static Map handleClaimMapping(IdentityProvider identityPr /** * Handle claims from identity provider based on claim configurations. * - * @param identityProvider Identity Provider - * @param attributes Relevant Claims coming from IDP - * @param tenantDomain Tenant Domain. - * @param tokenReqMsgCtx Token request message context. + * @param identityProvider Identity Provider + * @param attributes Relevant Claims coming from IDP + * @param tenantDomain Tenant Domain. + * @param tokenReqMsgCtx Token request message context. + * @param resolveIdPGroupAssignments Whether resolving IdP Group assignments needed. * @return Mapped local claims. - * @throws IdentityException - * @throws IdentityApplicationManagementException + * @throws IdentityException If an error occurred while handling claim mappings. + * @throws IdentityApplicationManagementException If an error occurred while getting service provider. */ public static Map handleClaimMapping(IdentityProvider identityProvider, Map attributes, String tenantDomain, From 7711634325b8d6d865945e1e4592b9f3923da097 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 26 Jan 2025 06:23:54 +0000 Subject: [PATCH 09/15] [WSO2 Release] [Jenkins #5186] [Release 7.0.226] prepare release v7.0.226 --- components/org.wso2.carbon.identity.api.server.dcr/pom.xml | 4 ++-- .../org.wso2.carbon.identity.api.server.oauth.scope/pom.xml | 4 ++-- .../pom.xml | 2 +- components/org.wso2.carbon.identity.discovery/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ciba/pom.xml | 2 +- .../pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.common/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.extension/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.par/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.rar/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.stub/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ui/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.session/pom.xml | 2 +- components/org.wso2.carbon.identity.webfinger/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml | 2 +- pom.xml | 4 ++-- service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.testng/pom.xml | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml index 673347f9ed..a682e7c183 100644 --- a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226-SNAPSHOT + 7.0.226 ../../pom.xml org.wso2.carbon.identity.api.server.dcr - 7.0.226-SNAPSHOT + 7.0.226 WSO2 Carbon - User DCR Rest API WSO2 Carbon - User DCR Rest API diff --git a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml index e2a2de2c48..7891ea68b3 100644 --- a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226-SNAPSHOT + 7.0.226 ../.. org.wso2.carbon.identity.api.server.oauth.scope - 7.0.226-SNAPSHOT + 7.0.226 WSO2 Carbon - Identity OAuth 2.0 Scope Rest APIs Rest APIs for OAuth 2.0 Scope Handling diff --git a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml index 68687416fa..7569729e68 100644 --- a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml +++ b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226-SNAPSHOT + 7.0.226 ../../pom.xml diff --git a/components/org.wso2.carbon.identity.discovery/pom.xml b/components/org.wso2.carbon.identity.discovery/pom.xml index ec3fa6d03f..773a156105 100644 --- a/components/org.wso2.carbon.identity.discovery/pom.xml +++ b/components/org.wso2.carbon.identity.discovery/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml index f7b0ab491a..b8d064a3d3 100644 --- a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml @@ -20,7 +20,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.226-SNAPSHOT + 7.0.226 ../../pom.xml diff --git a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml index 1d05d6beee..947bc540de 100644 --- a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.common/pom.xml b/components/org.wso2.carbon.identity.oauth.common/pom.xml index 24213a9c3e..68d0dae581 100644 --- a/components/org.wso2.carbon.identity.oauth.common/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml index 66124c125c..208b8dab34 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index ad7b3f63f0..9474b83464 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml index 3ea68515b2..574370411f 100644 --- a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.extension/pom.xml b/components/org.wso2.carbon.identity.oauth.extension/pom.xml index 0b99bd9229..e1c9bc5854 100644 --- a/components/org.wso2.carbon.identity.oauth.extension/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.extension/pom.xml @@ -19,7 +19,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.226-SNAPSHOT + 7.0.226 ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.par/pom.xml b/components/org.wso2.carbon.identity.oauth.par/pom.xml index b9b69ef20b..4c953d66ac 100644 --- a/components/org.wso2.carbon.identity.oauth.par/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.par/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.rar/pom.xml b/components/org.wso2.carbon.identity.oauth.rar/pom.xml index fca37d7c8a..435e59b3f5 100644 --- a/components/org.wso2.carbon.identity.oauth.rar/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.rar/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml index 6099cb730b..dd19826206 100644 --- a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.stub/pom.xml b/components/org.wso2.carbon.identity.oauth.stub/pom.xml index 39ee8b5c8c..2ee66cfeef 100644 --- a/components/org.wso2.carbon.identity.oauth.stub/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ui/pom.xml b/components/org.wso2.carbon.identity.oauth.ui/pom.xml index d9022f5026..da063af9f8 100644 --- a/components/org.wso2.carbon.identity.oauth.ui/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ui/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth/pom.xml b/components/org.wso2.carbon.identity.oauth/pom.xml index 8c53c5e241..643c29be56 100644 --- a/components/org.wso2.carbon.identity.oauth/pom.xml +++ b/components/org.wso2.carbon.identity.oauth/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml index bb2fa56422..17569f8b3e 100644 --- a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.session/pom.xml b/components/org.wso2.carbon.identity.oidc.session/pom.xml index 61ed453129..8352782688 100644 --- a/components/org.wso2.carbon.identity.oidc.session/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.session/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/components/org.wso2.carbon.identity.webfinger/pom.xml b/components/org.wso2.carbon.identity.webfinger/pom.xml index efc8c2cf5f..d9c12473bb 100644 --- a/components/org.wso2.carbon.identity.webfinger/pom.xml +++ b/components/org.wso2.carbon.identity.webfinger/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml index 011f548487..6c96b371b4 100644 --- a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml index 59a3e37ceb..f09d03d374 100644 --- a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.feature/pom.xml index cec69773da..d03aaddc7e 100644 --- a/features/org.wso2.carbon.identity.oauth.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml index c786b7c586..6b6a929f2f 100644 --- a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml index e10d569681..f4f2830d38 100644 --- a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 diff --git a/pom.xml b/pom.xml index a99944c9dd..f6d6eae51e 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226-SNAPSHOT + 7.0.226 pom WSO2 Carbon OAuth module http://wso2.org @@ -37,7 +37,7 @@ https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git - HEAD + v7.0.226 diff --git a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml index 74d1a6111b..44c42d2c3e 100644 --- a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml +++ b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226-SNAPSHOT + 7.0.226 ../../pom.xml diff --git a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml index 827c7e52fa..44c4e970f9 100644 --- a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml +++ b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226-SNAPSHOT + 7.0.226 4.0.0 From c0cd9138ee873654348953b44b36a74b8daebcc3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 26 Jan 2025 06:23:57 +0000 Subject: [PATCH 10/15] [WSO2 Release] [Jenkins #5186] [Release 7.0.226] prepare for next development iteration --- components/org.wso2.carbon.identity.api.server.dcr/pom.xml | 4 ++-- .../org.wso2.carbon.identity.api.server.oauth.scope/pom.xml | 4 ++-- .../pom.xml | 2 +- components/org.wso2.carbon.identity.discovery/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ciba/pom.xml | 2 +- .../pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.common/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.extension/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.par/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.rar/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.stub/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ui/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.session/pom.xml | 2 +- components/org.wso2.carbon.identity.webfinger/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml | 2 +- pom.xml | 4 ++-- service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.testng/pom.xml | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml index a682e7c183..402c9dda98 100644 --- a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226 + 7.0.227-SNAPSHOT ../../pom.xml org.wso2.carbon.identity.api.server.dcr - 7.0.226 + 7.0.227-SNAPSHOT WSO2 Carbon - User DCR Rest API WSO2 Carbon - User DCR Rest API diff --git a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml index 7891ea68b3..7086961ad3 100644 --- a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226 + 7.0.227-SNAPSHOT ../.. org.wso2.carbon.identity.api.server.oauth.scope - 7.0.226 + 7.0.227-SNAPSHOT WSO2 Carbon - Identity OAuth 2.0 Scope Rest APIs Rest APIs for OAuth 2.0 Scope Handling diff --git a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml index 7569729e68..34aa5f2ebc 100644 --- a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml +++ b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226 + 7.0.227-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.discovery/pom.xml b/components/org.wso2.carbon.identity.discovery/pom.xml index 773a156105..dd354ccaaf 100644 --- a/components/org.wso2.carbon.identity.discovery/pom.xml +++ b/components/org.wso2.carbon.identity.discovery/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml index b8d064a3d3..f30c24b88a 100644 --- a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml @@ -20,7 +20,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.226 + 7.0.227-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml index 947bc540de..01e86275fa 100644 --- a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.common/pom.xml b/components/org.wso2.carbon.identity.oauth.common/pom.xml index 68d0dae581..22daad195c 100644 --- a/components/org.wso2.carbon.identity.oauth.common/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml index 208b8dab34..4d9347db51 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index 9474b83464..83cc82c3a9 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml index 574370411f..368d6b5a10 100644 --- a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.extension/pom.xml b/components/org.wso2.carbon.identity.oauth.extension/pom.xml index e1c9bc5854..c1f5c8892d 100644 --- a/components/org.wso2.carbon.identity.oauth.extension/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.extension/pom.xml @@ -19,7 +19,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.226 + 7.0.227-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.par/pom.xml b/components/org.wso2.carbon.identity.oauth.par/pom.xml index 4c953d66ac..ba79e2b3fe 100644 --- a/components/org.wso2.carbon.identity.oauth.par/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.par/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.rar/pom.xml b/components/org.wso2.carbon.identity.oauth.rar/pom.xml index 435e59b3f5..c04e91376a 100644 --- a/components/org.wso2.carbon.identity.oauth.rar/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.rar/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml index dd19826206..eb273d0d7b 100644 --- a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.stub/pom.xml b/components/org.wso2.carbon.identity.oauth.stub/pom.xml index 2ee66cfeef..e7e96b7851 100644 --- a/components/org.wso2.carbon.identity.oauth.stub/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ui/pom.xml b/components/org.wso2.carbon.identity.oauth.ui/pom.xml index da063af9f8..79ac30cd2e 100644 --- a/components/org.wso2.carbon.identity.oauth.ui/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ui/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth/pom.xml b/components/org.wso2.carbon.identity.oauth/pom.xml index 643c29be56..d4240f4b84 100644 --- a/components/org.wso2.carbon.identity.oauth/pom.xml +++ b/components/org.wso2.carbon.identity.oauth/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml index 17569f8b3e..fd1bd87db5 100644 --- a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.session/pom.xml b/components/org.wso2.carbon.identity.oidc.session/pom.xml index 8352782688..58876456d8 100644 --- a/components/org.wso2.carbon.identity.oidc.session/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.session/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.webfinger/pom.xml b/components/org.wso2.carbon.identity.webfinger/pom.xml index d9c12473bb..cb2dd7fc95 100644 --- a/components/org.wso2.carbon.identity.webfinger/pom.xml +++ b/components/org.wso2.carbon.identity.webfinger/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml index 6c96b371b4..834a73e6ce 100644 --- a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml index f09d03d374..b316941772 100644 --- a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.feature/pom.xml index d03aaddc7e..c6185e4d84 100644 --- a/features/org.wso2.carbon.identity.oauth.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml index 6b6a929f2f..be8957cc9c 100644 --- a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml index f4f2830d38..a7b8691b57 100644 --- a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index f6d6eae51e..e7f45f431b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226 + 7.0.227-SNAPSHOT pom WSO2 Carbon OAuth module http://wso2.org @@ -37,7 +37,7 @@ https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git - v7.0.226 + HEAD diff --git a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml index 44c42d2c3e..bc60aad516 100644 --- a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml +++ b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.226 + 7.0.227-SNAPSHOT ../../pom.xml diff --git a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml index 44c4e970f9..d13769e697 100644 --- a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml +++ b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.226 + 7.0.227-SNAPSHOT 4.0.0 From eff01f3c17d2093d232af4a6be5aac6d89fe9b6c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 26 Jan 2025 10:47:25 +0000 Subject: [PATCH 11/15] [WSO2 Release] [Jenkins #5188] [Release 7.0.227] prepare release v7.0.227 --- components/org.wso2.carbon.identity.api.server.dcr/pom.xml | 4 ++-- .../org.wso2.carbon.identity.api.server.oauth.scope/pom.xml | 4 ++-- .../pom.xml | 2 +- components/org.wso2.carbon.identity.discovery/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ciba/pom.xml | 2 +- .../pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.common/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.extension/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.par/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.rar/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.stub/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ui/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.session/pom.xml | 2 +- components/org.wso2.carbon.identity.webfinger/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml | 2 +- pom.xml | 4 ++-- service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.testng/pom.xml | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml index 402c9dda98..543016497f 100644 --- a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227-SNAPSHOT + 7.0.227 ../../pom.xml org.wso2.carbon.identity.api.server.dcr - 7.0.227-SNAPSHOT + 7.0.227 WSO2 Carbon - User DCR Rest API WSO2 Carbon - User DCR Rest API diff --git a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml index 7086961ad3..703eaa6d02 100644 --- a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227-SNAPSHOT + 7.0.227 ../.. org.wso2.carbon.identity.api.server.oauth.scope - 7.0.227-SNAPSHOT + 7.0.227 WSO2 Carbon - Identity OAuth 2.0 Scope Rest APIs Rest APIs for OAuth 2.0 Scope Handling diff --git a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml index 34aa5f2ebc..e3adbbbde1 100644 --- a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml +++ b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227-SNAPSHOT + 7.0.227 ../../pom.xml diff --git a/components/org.wso2.carbon.identity.discovery/pom.xml b/components/org.wso2.carbon.identity.discovery/pom.xml index dd354ccaaf..56a93747b1 100644 --- a/components/org.wso2.carbon.identity.discovery/pom.xml +++ b/components/org.wso2.carbon.identity.discovery/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml index f30c24b88a..fd28ded114 100644 --- a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml @@ -20,7 +20,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.227-SNAPSHOT + 7.0.227 ../../pom.xml diff --git a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml index 01e86275fa..edfd7a3324 100644 --- a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.common/pom.xml b/components/org.wso2.carbon.identity.oauth.common/pom.xml index 22daad195c..84552da865 100644 --- a/components/org.wso2.carbon.identity.oauth.common/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml index 4d9347db51..1a0600c926 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index bcbdef37c6..296da4d421 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml index 368d6b5a10..791d5b5342 100644 --- a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.extension/pom.xml b/components/org.wso2.carbon.identity.oauth.extension/pom.xml index c1f5c8892d..7f34520782 100644 --- a/components/org.wso2.carbon.identity.oauth.extension/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.extension/pom.xml @@ -19,7 +19,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.227-SNAPSHOT + 7.0.227 ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.par/pom.xml b/components/org.wso2.carbon.identity.oauth.par/pom.xml index ba79e2b3fe..d4f14c8a68 100644 --- a/components/org.wso2.carbon.identity.oauth.par/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.par/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.rar/pom.xml b/components/org.wso2.carbon.identity.oauth.rar/pom.xml index c04e91376a..e851feab5f 100644 --- a/components/org.wso2.carbon.identity.oauth.rar/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.rar/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml index eb273d0d7b..d03733e660 100644 --- a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.stub/pom.xml b/components/org.wso2.carbon.identity.oauth.stub/pom.xml index e7e96b7851..4df1f8a692 100644 --- a/components/org.wso2.carbon.identity.oauth.stub/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ui/pom.xml b/components/org.wso2.carbon.identity.oauth.ui/pom.xml index 79ac30cd2e..b81e1da102 100644 --- a/components/org.wso2.carbon.identity.oauth.ui/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ui/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth/pom.xml b/components/org.wso2.carbon.identity.oauth/pom.xml index d4240f4b84..f37635c6d7 100644 --- a/components/org.wso2.carbon.identity.oauth/pom.xml +++ b/components/org.wso2.carbon.identity.oauth/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml index fd1bd87db5..bf43a789e1 100644 --- a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.session/pom.xml b/components/org.wso2.carbon.identity.oidc.session/pom.xml index 58876456d8..0121af876a 100644 --- a/components/org.wso2.carbon.identity.oidc.session/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.session/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/components/org.wso2.carbon.identity.webfinger/pom.xml b/components/org.wso2.carbon.identity.webfinger/pom.xml index cb2dd7fc95..6ebdb29e0d 100644 --- a/components/org.wso2.carbon.identity.webfinger/pom.xml +++ b/components/org.wso2.carbon.identity.webfinger/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml index 834a73e6ce..806d7547b5 100644 --- a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml index b316941772..3f34f473f6 100644 --- a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.feature/pom.xml index c6185e4d84..2c41ba9a65 100644 --- a/features/org.wso2.carbon.identity.oauth.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml index be8957cc9c..15ef1f37c8 100644 --- a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml index a7b8691b57..91cff04ae6 100644 --- a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 diff --git a/pom.xml b/pom.xml index e7f45f431b..d73c61204d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227-SNAPSHOT + 7.0.227 pom WSO2 Carbon OAuth module http://wso2.org @@ -37,7 +37,7 @@ https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git - HEAD + v7.0.227 diff --git a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml index bc60aad516..54ae03dc3f 100644 --- a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml +++ b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227-SNAPSHOT + 7.0.227 ../../pom.xml diff --git a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml index d13769e697..be5d8d1e83 100644 --- a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml +++ b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227-SNAPSHOT + 7.0.227 4.0.0 From c75fd3e8c0282eae4ca869d42da4d9d5b6f779d0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 26 Jan 2025 10:47:28 +0000 Subject: [PATCH 12/15] [WSO2 Release] [Jenkins #5188] [Release 7.0.227] prepare for next development iteration --- components/org.wso2.carbon.identity.api.server.dcr/pom.xml | 4 ++-- .../org.wso2.carbon.identity.api.server.oauth.scope/pom.xml | 4 ++-- .../pom.xml | 2 +- components/org.wso2.carbon.identity.discovery/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ciba/pom.xml | 2 +- .../pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.common/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.extension/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.par/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.rar/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.stub/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ui/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.session/pom.xml | 2 +- components/org.wso2.carbon.identity.webfinger/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml | 2 +- pom.xml | 4 ++-- service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.testng/pom.xml | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml index 543016497f..b812d2f234 100644 --- a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227 + 7.0.228-SNAPSHOT ../../pom.xml org.wso2.carbon.identity.api.server.dcr - 7.0.227 + 7.0.228-SNAPSHOT WSO2 Carbon - User DCR Rest API WSO2 Carbon - User DCR Rest API diff --git a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml index 703eaa6d02..ed9b440218 100644 --- a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227 + 7.0.228-SNAPSHOT ../.. org.wso2.carbon.identity.api.server.oauth.scope - 7.0.227 + 7.0.228-SNAPSHOT WSO2 Carbon - Identity OAuth 2.0 Scope Rest APIs Rest APIs for OAuth 2.0 Scope Handling diff --git a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml index e3adbbbde1..291a9c6638 100644 --- a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml +++ b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227 + 7.0.228-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.discovery/pom.xml b/components/org.wso2.carbon.identity.discovery/pom.xml index 56a93747b1..3b1ff700ea 100644 --- a/components/org.wso2.carbon.identity.discovery/pom.xml +++ b/components/org.wso2.carbon.identity.discovery/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml index fd28ded114..122908c25b 100644 --- a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml @@ -20,7 +20,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.227 + 7.0.228-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml index edfd7a3324..60f9912189 100644 --- a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.common/pom.xml b/components/org.wso2.carbon.identity.oauth.common/pom.xml index 84552da865..daed837698 100644 --- a/components/org.wso2.carbon.identity.oauth.common/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml index 1a0600c926..4ba49c2c48 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index 296da4d421..d55d6734b7 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml index 791d5b5342..08ae78b491 100644 --- a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.extension/pom.xml b/components/org.wso2.carbon.identity.oauth.extension/pom.xml index 7f34520782..f48f3f4008 100644 --- a/components/org.wso2.carbon.identity.oauth.extension/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.extension/pom.xml @@ -19,7 +19,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.227 + 7.0.228-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.par/pom.xml b/components/org.wso2.carbon.identity.oauth.par/pom.xml index d4f14c8a68..60c4e6ace2 100644 --- a/components/org.wso2.carbon.identity.oauth.par/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.par/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.rar/pom.xml b/components/org.wso2.carbon.identity.oauth.rar/pom.xml index e851feab5f..72e72373d2 100644 --- a/components/org.wso2.carbon.identity.oauth.rar/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.rar/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml index d03733e660..dfaca2c53f 100644 --- a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.stub/pom.xml b/components/org.wso2.carbon.identity.oauth.stub/pom.xml index 4df1f8a692..0b165e85e2 100644 --- a/components/org.wso2.carbon.identity.oauth.stub/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ui/pom.xml b/components/org.wso2.carbon.identity.oauth.ui/pom.xml index b81e1da102..901c29bf5c 100644 --- a/components/org.wso2.carbon.identity.oauth.ui/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ui/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth/pom.xml b/components/org.wso2.carbon.identity.oauth/pom.xml index f37635c6d7..1c43582b36 100644 --- a/components/org.wso2.carbon.identity.oauth/pom.xml +++ b/components/org.wso2.carbon.identity.oauth/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml index bf43a789e1..201c1e6011 100644 --- a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.session/pom.xml b/components/org.wso2.carbon.identity.oidc.session/pom.xml index 0121af876a..5dbaa9bc5d 100644 --- a/components/org.wso2.carbon.identity.oidc.session/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.session/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.webfinger/pom.xml b/components/org.wso2.carbon.identity.webfinger/pom.xml index 6ebdb29e0d..10dac341f1 100644 --- a/components/org.wso2.carbon.identity.webfinger/pom.xml +++ b/components/org.wso2.carbon.identity.webfinger/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml index 806d7547b5..acfafb3319 100644 --- a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml index 3f34f473f6..ab16c09423 100644 --- a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.feature/pom.xml index 2c41ba9a65..2c953506eb 100644 --- a/features/org.wso2.carbon.identity.oauth.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml index 15ef1f37c8..b1b4a14723 100644 --- a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml index 91cff04ae6..2ecfb279cf 100644 --- a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index d73c61204d..9523a17a25 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227 + 7.0.228-SNAPSHOT pom WSO2 Carbon OAuth module http://wso2.org @@ -37,7 +37,7 @@ https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git - v7.0.227 + HEAD diff --git a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml index 54ae03dc3f..eb55d1893a 100644 --- a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml +++ b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.227 + 7.0.228-SNAPSHOT ../../pom.xml diff --git a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml index be5d8d1e83..318a576ba7 100644 --- a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml +++ b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.227 + 7.0.228-SNAPSHOT 4.0.0 From d70822eb1cd8f2a105399a13c01c6225a0e241a2 Mon Sep 17 00:00:00 2001 From: Shan Chathusanda Jayathilaka Date: Sat, 25 Jan 2025 15:23:02 +0530 Subject: [PATCH 13/15] Allow sub organization applications to issue tokens to access the resources in sub organizations --- .../carbon/identity/oauth2/OAuth2Service.java | 27 ++++++++++-- .../BasicAuthClientAuthenticator.java | 25 ++++++++++- .../OAuthClientAuthnService.java | 20 ++++++++- .../oauth2/dao/AccessTokenDAOImpl.java | 20 ++++++++- .../oauth2/dao/TokenManagementDAOImpl.java | 25 +++++++++-- .../oauth2/token/AccessTokenIssuer.java | 31 ++++++++++++- .../identity/oauth2/token/JWTTokenIssuer.java | 43 ++++++++++++++++-- .../AbstractAuthorizationGrantHandler.java | 35 +++++++++++++-- .../handlers/grant/PasswordGrantHandler.java | 34 +++++++++++++- .../handlers/grant/RefreshGrantHandler.java | 12 ++--- .../identity/oauth2/util/AuthzUtil.java | 18 +++++--- .../carbon/identity/oauth2/util/JWTUtils.java | 26 ++++++++++- .../DefaultOAuth2ScopeValidator.java | 12 +++-- .../validators/TokenValidationHandler.java | 33 +++++++++++++- .../openidconnect/DefaultIDTokenBuilder.java | 16 +++++-- .../identity/oauth2/OAuth2ServiceTest.java | 25 ++++++++--- .../BasicAuthClientAuthenticatorTest.java | 8 ++-- .../OAuthClientAuthnServiceTest.java | 4 +- .../oauth2/token/JWTTokenIssuerTest.java | 44 +++++++++++++++---- ...AbstractAuthorizationGrantHandlerTest.java | 23 ++++++++-- .../grant/PasswordGrantHandlerTest.java | 13 ++++++ .../TokenValidationHandlerTest.java | 7 ++- 22 files changed, 436 insertions(+), 65 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/OAuth2Service.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/OAuth2Service.java index d32a2abc8c..c99a58a877 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/OAuth2Service.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/OAuth2Service.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2013-2025, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.oltu.oauth2.common.message.types.GrantType; import org.owasp.encoder.Encode; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.core.AbstractAdmin; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.central.log.mgt.utils.LogConstants; @@ -63,6 +64,7 @@ import org.wso2.carbon.identity.oauth2.token.bindings.TokenBinder; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; import org.wso2.carbon.identity.openidconnect.model.Constants; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import org.wso2.carbon.user.api.Claim; import org.wso2.carbon.user.core.UserStoreManager; import org.wso2.carbon.utils.DiagnosticLog; @@ -676,7 +678,9 @@ public OAuthRevocationResponseDTO revokeTokenByOAuthClient(OAuthRevocationReques } else if (accessTokenDO != null) { if (revokeRequestDTO.getConsumerKey().equals(accessTokenDO.getConsumerKey())) { - if ((OAuth2Util.getAppInformationByClientId(accessTokenDO.getConsumerKey()). + // Extracting the application details with consumer key and tenant domain. + String tenantDomain = IdentityTenantUtil.getTenantDomain(accessTokenDO.getTenantID()); + if ((OAuth2Util.getAppInformationByClientId(accessTokenDO.getConsumerKey(), tenantDomain). isTokenBindingValidationEnabled()) && (!isValidTokenBinding(accessTokenDO. getTokenBinding(), revokeRequestDTO.getRequest()))) { if (LoggerUtils.isDiagnosticLogsEnabled()) { @@ -981,7 +985,24 @@ public Claim[] getUserClaims(String accessTokenIdentifier) { public String getOauthApplicationState(String consumerKey) { try { - OAuthAppDO appDO = OAuth2Util.getAppInformationByClientId(consumerKey); + String tenantDomain = IdentityTenantUtil.getTenantDomain(IdentityTenantUtil.getLoginTenantId()); + String appOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If appOrgId is not empty, then the request comes for an application which is registered directly in the + organization of the appOrgId. Therefore, we need to resolve the tenant domain of the organization. + */ + if (StringUtils.isNotEmpty(appOrgId)) { + try { + tenantDomain = OAuthComponentServiceHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(appOrgId); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain for the organization ID: " + + appOrgId, e); + } + } + // Getting the application information by consumer key and tenant domain. + OAuthAppDO appDO = OAuth2Util.getAppInformationByClientId(consumerKey, tenantDomain); return appDO.getState(); } catch (IdentityOAuth2Exception e) { log.error("Error while finding application state for application with client_id: " + consumerKey, e); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticator.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticator.java index 891fe5f1b1..e282643502 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticator.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2018-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -24,13 +24,17 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.oltu.oauth2.common.OAuth; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.core.util.IdentityTenantUtil; import org.wso2.carbon.identity.oauth.IdentityOAuthAdminException; import org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes; import org.wso2.carbon.identity.oauth.common.exception.InvalidOAuthClientException; +import org.wso2.carbon.identity.oauth.internal.OAuthComponentServiceHolder; import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception; import org.wso2.carbon.identity.oauth2.bean.OAuthClientAuthnContext; import org.wso2.carbon.identity.oauth2.model.ClientAuthenticationMethodModel; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import java.util.ArrayList; import java.util.Base64; @@ -89,8 +93,25 @@ public boolean authenticateClient(HttpServletRequest request, Map log.debug("Authenticating client : " + oAuthClientAuthnContext.getClientId() + " with client " + "secret."); } + String tenantDomain = IdentityTenantUtil.resolveTenantDomain(); + String appOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If appOrgId is not empty, then the request comes for an application which is registered directly in the + organization of the appOrgId. Therefore, we need to resolve the tenant domain of the organization. + */ + if (StringUtils.isNotEmpty(appOrgId)) { + try { + tenantDomain = OAuthComponentServiceHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(appOrgId); + } catch (OrganizationManagementException e) { + throw new InvalidOAuthClientException("Error while resolving tenant domain for the organization " + + "ID: " + appOrgId, e); + } + } + // Authenticating the client with the client id, the client secret and the extracted tenant domain. return OAuth2Util.authenticateClient(oAuthClientAuthnContext.getClientId(), - (String) oAuthClientAuthnContext.getParameter(OAuth.OAUTH_CLIENT_SECRET)); + (String) oAuthClientAuthnContext.getParameter(OAuth.OAUTH_CLIENT_SECRET), tenantDomain); } catch (IdentityOAuthAdminException e) { throw new OAuthClientAuthnException("Error while authenticating client", OAuth2ErrorCodes.INVALID_CLIENT, e); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnService.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnService.java index a36fe3f125..bed9461bba 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnService.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2018-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -21,16 +21,19 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.core.util.IdentityTenantUtil; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes; import org.wso2.carbon.identity.oauth.common.exception.InvalidOAuthClientException; import org.wso2.carbon.identity.oauth.dao.OAuthAppDO; +import org.wso2.carbon.identity.oauth.internal.OAuthComponentServiceHolder; import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception; import org.wso2.carbon.identity.oauth2.bean.OAuthClientAuthnContext; import org.wso2.carbon.identity.oauth2.internal.OAuth2ServiceComponentHolder; import org.wso2.carbon.identity.oauth2.model.ClientAuthenticationMethodModel; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import java.util.ArrayList; import java.util.Arrays; @@ -321,6 +324,21 @@ private List getConfiguredClientAuthMethods(String cli throws OAuthClientAuthnException, InvalidOAuthClientException { String tenantDomain = IdentityTenantUtil.resolveTenantDomain(); + String appOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If appOrgId is not empty, then the request comes for an application which is registered directly in the + organization of the appOrgId. Therefore, we need to resolve the tenant domain of the organization. + */ + if (StringUtils.isNotEmpty(appOrgId)) { + try { + tenantDomain = OAuthComponentServiceHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(appOrgId); + } catch (OrganizationManagementException e) { + throw new InvalidOAuthClientException("Error while resolving tenant domain for the organization ID: " + + appOrgId, e); + } + } List configuredClientAuthMethods = new ArrayList<>(); try { OAuthAppDO oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId, tenantDomain); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/AccessTokenDAOImpl.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/AccessTokenDAOImpl.java index 64fac73b8e..c3e8017dff 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/AccessTokenDAOImpl.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/AccessTokenDAOImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2017-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 @@ -24,6 +24,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.database.utils.jdbc.JdbcTemplate; import org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; @@ -251,6 +252,23 @@ private void insertAccessToken(String accessToken, String consumerKey, AccessTok insertTokenPrepStmt.setString(19, authorizedOrganization); int appTenantId = IdentityTenantUtil.getLoginTenantId(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. Therefore, we need to resolve the + tenant domain of the organization to get the application tenant id. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + try { + String tenantDomain = OAuthComponentServiceHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + appTenantId = OAuth2Util.getTenantId(tenantDomain); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: " + + applicationResidentOrgId, e); + } + } if (OAuth2ServiceComponentHolder.isIDPIdColumnEnabled()) { if (OAuth2ServiceComponentHolder.isConsentedTokenColumnEnabled()) { insertTokenPrepStmt.setString(20, Boolean.toString(accessTokenDO.isConsentedToken())); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/TokenManagementDAOImpl.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/TokenManagementDAOImpl.java index aa7fe011a8..cda4960b59 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/TokenManagementDAOImpl.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/TokenManagementDAOImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2017-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 @@ -24,6 +24,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.identity.application.common.model.ServiceProvider; @@ -163,7 +164,25 @@ public RefreshTokenValidationDataDO validateRefreshToken(String consumerKey, Str prepStmt = connection.prepareStatement(sql); prepStmt.setString(1, getPersistenceProcessor().getProcessedClientId(consumerKey)); - prepStmt.setInt(2, IdentityTenantUtil.getLoginTenantId()); + int tenantId = IdentityTenantUtil.getLoginTenantId(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. Therefore, we need to resolve the + tenant domain of the organization to get the application tenant id. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + try { + String tenantDomain = OAuth2ServiceComponentHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + tenantId = IdentityTenantUtil.getTenantId(tenantDomain); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: " + + applicationResidentOrgId, e); + } + } + prepStmt.setInt(2, tenantId); if (refreshToken != null) { prepStmt.setString(3, getHashingPersistenceProcessor().getProcessedRefreshToken(refreshToken)); } @@ -183,7 +202,7 @@ public RefreshTokenValidationDataDO validateRefreshToken(String consumerKey, Str validationDataDO.setAccessToken(resultSet.getString(1)); } String userName = resultSet.getString(2); - int tenantId = resultSet.getInt(3); + tenantId = resultSet.getInt(3); String userDomain = resultSet.getString(4); String tenantDomain = OAuth2Util.getTenantDomain(tenantId); validationDataDO.setRefreshToken(refreshToken); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/AccessTokenIssuer.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/AccessTokenIssuer.java index 9cf398b186..bc77a0e859 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/AccessTokenIssuer.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/AccessTokenIssuer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2017-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 @@ -26,6 +26,7 @@ import org.apache.oltu.oauth2.common.error.OAuthError; import org.apache.oltu.oauth2.common.message.types.GrantType; import org.owasp.encoder.Encode; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.exception.UserIdNotFoundException; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; @@ -316,6 +317,16 @@ public OAuth2AccessTokenRespDTO issue(OAuth2AccessTokenReqDTO tokenReqDTO) if (!isOfTypeApplicationUser) { tokReqMsgCtx.setAuthorizedUser(oAuthAppDO.getAppOwner()); tokReqMsgCtx.addProperty(OAuthConstants.UserType.USER_TYPE, OAuthConstants.UserType.APPLICATION); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. Therefore, we are setting the authorized + user's accessing organization as the applicationResidentOrgId. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + tokReqMsgCtx.getAuthorizedUser().setAccessingOrganization(applicationResidentOrgId); + } } else { tokReqMsgCtx.addProperty(OAuthConstants.UserType.USER_TYPE, OAuthConstants.UserType.APPLICATION_USER); } @@ -1398,7 +1409,23 @@ private void setResponseHeaders(OAuthTokenReqMessageContext tokReqMsgCtx, private OAuthAppDO getOAuthApplication(String consumerKey) throws InvalidOAuthClientException, IdentityOAuth2Exception { - OAuthAppDO authAppDO = OAuth2Util.getAppInformationByClientId(consumerKey); + String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If the applicationResidentOrgId is not null, resolve the tenant domain from the organization id to get the + application information by passing the consumer key and the tenant domain. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + try { + tenantDomain = OAuthComponentServiceHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: " + + applicationResidentOrgId, e); + } + } + OAuthAppDO authAppDO = OAuth2Util.getAppInformationByClientId(consumerKey, tenantDomain); String appState = authAppDO.getState(); if (StringUtils.isEmpty(appState)) { if (log.isDebugEnabled()) { diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuer.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuer.java index 72b81f1e69..0bc3cf85f4 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuer.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2017-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 @@ -35,6 +35,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.exception.UserIdNotFoundException; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.base.IdentityConstants; @@ -55,6 +56,7 @@ import org.wso2.carbon.identity.openidconnect.CustomClaimsCallbackHandler; import org.wso2.carbon.identity.openidconnect.OIDCClaimUtil; import org.wso2.carbon.identity.openidconnect.util.ClaimHandlerUtil; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import java.security.Key; import java.security.cert.Certificate; @@ -418,7 +420,16 @@ private String getSigningTenantDomain(String clientID, AuthenticatedUser authent throws IdentityOAuth2Exception { String tenantDomain; - if (OAuthServerConfiguration.getInstance().getUseSPTenantDomainValue()) { + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. In this scenario, the signing tenant domain + should be the root tenant domain of the applicationResidentOrgId. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + } else if (OAuthServerConfiguration.getInstance().getUseSPTenantDomainValue()) { if (log.isDebugEnabled()) { log.debug("Using the tenant domain of the SP to sign the token"); } @@ -566,8 +577,25 @@ protected JWTClaimsSet createJWTClaimSet(OAuthAuthzReqMessageContext authAuthzRe // loading the stored application data OAuthAppDO oAuthAppDO; + String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); try { - oAuthAppDO = OAuth2Util.getAppInformationByClientId(consumerKey); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. Therefore, the tenant domain should be + extracted from the organization id to get the information of the application. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + try { + tenantDomain = OAuth2ServiceComponentHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: " + + applicationResidentOrgId, e); + } + } + oAuthAppDO = OAuth2Util.getAppInformationByClientId(consumerKey, tenantDomain); } catch (InvalidOAuthClientException e) { throw new IdentityOAuth2Exception("Error while retrieving app information for clientId: " + consumerKey, e); } @@ -584,6 +612,15 @@ protected JWTClaimsSet createJWTClaimSet(OAuthAuthzReqMessageContext authAuthzRe spTenantDomain = tokenReqMessageContext.getOauth2AccessTokenReqDTO().getTenantDomain(); } + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. spTenantDomain is used to get the idTokenIssuer + for the token. In this scenario, the tenant domain that needs to be used as the issuer is the root tenant. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + spTenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();; + } + boolean isMTLSrequest; if (authAuthzReqMessageContext != null) { /* If the auth request is originated from a request object reference(ex: PAR), then that endpoint should be diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandler.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandler.java index 02aa8ddfa5..c039d87e2c 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandler.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2013-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 @@ -68,6 +68,7 @@ import org.wso2.carbon.identity.oauth2.validators.OAuth2ScopeHandler; import org.wso2.carbon.identity.oauth2.validators.scope.ScopeValidator; import org.wso2.carbon.identity.openidconnect.OIDCClaimUtil; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import org.wso2.carbon.utils.DiagnosticLog; import java.sql.Timestamp; @@ -848,10 +849,24 @@ private OAuth2AccessTokenRespDTO createResponseWithTokenBean(AccessTokenDO exist OAuthAppDO oAuthAppDO; String consumerKey = existingAccessTokenDO.getConsumerKey(); try { - oAuthAppDO = OAuth2Util.getAppInformationByClientId(consumerKey); + String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. Therefore, the tenant domain should be + extracted from the organization id to get the information of the application. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + tenantDomain = OAuth2ServiceComponentHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + } + oAuthAppDO = OAuth2Util.getAppInformationByClientId(consumerKey, tenantDomain); } catch (InvalidOAuthClientException e) { throw new IdentityOAuth2Exception("Error while retrieving app information for client_id : " + consumerKey, e); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: ", e); } if (issueRefreshToken(existingAccessTokenDO.getTokenType()) && @@ -895,7 +910,19 @@ private OAuthCacheKey getOAuthCacheKey(String scope, String consumerKey, String private OAuthAppDO getoAuthApp(String consumerKey) throws IdentityOAuth2Exception { OAuthAppDO oAuthAppBean; try { - oAuthAppBean = OAuth2Util.getAppInformationByClientId(consumerKey); + String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. Therefore, the tenant domain should be + extracted from the organization id to get the information of the application. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + tenantDomain = OAuth2ServiceComponentHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + } + oAuthAppBean = OAuth2Util.getAppInformationByClientId(consumerKey, tenantDomain); if (log.isDebugEnabled()) { log.debug("Service Provider specific expiry time enabled for application : " + consumerKey + ". Application access token expiry time : " + oAuthAppBean.getApplicationAccessTokenExpiryTime() @@ -904,6 +931,8 @@ private OAuthAppDO getoAuthApp(String consumerKey) throws IdentityOAuth2Exceptio } } catch (InvalidOAuthClientException e) { throw new IdentityOAuth2Exception("Error while retrieving app information for clientId: " + consumerKey, e); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: ", e); } return oAuthAppBean; } diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandler.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandler.java index 5822cd1f35..031600057d 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandler.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2013-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -24,6 +24,7 @@ import org.apache.commons.logging.LogFactory; import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.AuthenticationDataPublisher; import org.wso2.carbon.identity.application.authentication.framework.AuthenticationService; import org.wso2.carbon.identity.application.authentication.framework.AuthenticatorFlowStatus; @@ -66,6 +67,7 @@ import org.wso2.carbon.identity.oauth2.internal.OAuth2ServiceComponentHolder; import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.UserCoreConstants; import org.wso2.carbon.user.core.UserStoreClientException; @@ -273,13 +275,30 @@ private void setPropertiesForTokenGeneration(OAuthTokenReqMessageContext tokReqM tokReqMsgCtx.setScope(tokenReq.getScope()); } - private String getFullQualifiedUsername(OAuth2AccessTokenReqDTO tokenReq, ServiceProvider serviceProvider) { + private String getFullQualifiedUsername(OAuth2AccessTokenReqDTO tokenReq, ServiceProvider serviceProvider) + throws IdentityOAuth2Exception { boolean isEmailUserNameEnabled = MultitenantUtils.isEmailUserName(); boolean isSaasApp = serviceProvider.isSaasApp(); boolean isLegacySaaSAuthenticationEnabled = IdentityTenantUtil.isLegacySaaSAuthenticationEnabled(); String usernameFromRequest = tokenReq.getResourceOwnerUsername(); String tenantDomainFromContext = IdentityTenantUtil.resolveTenantDomain(); + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is registered + directly in the organization of the applicationResidentOrgId. In this scenario the user is also in the + organization level and the tenant domain of the user should be resolved from the organization id. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + try { + tenantDomainFromContext = OAuth2ServiceComponentHolder.getInstance().getOrganizationManager() + .resolveTenantDomain(applicationResidentOrgId); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while resolving tenant domain from the organization id: " + + applicationResidentOrgId, e); + } + } if (!isSaasApp) { /* @@ -393,6 +412,17 @@ private AuthenticatedUser validateUserCredentials(OAuth2AccessTokenReqDTO tokenR log.debug(PASSWORD_GRANT_POST_AUTHENTICATION_EVENT + " event is triggered"); } if (authenticatedUser.isPresent()) { + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is + registered directly in the organization of the applicationResidentOrgId. In this scenario the user's + accessing and resident organization will be the organization of the applicationResidentOrgId. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + authenticatedUser.get().setAccessingOrganization(applicationResidentOrgId); + authenticatedUser.get().setUserResidentOrganization(applicationResidentOrgId); + } return authenticatedUser.get(); } if (isPublishPasswordGrantLoginEnabled) { diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/RefreshGrantHandler.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/RefreshGrantHandler.java index db2788c89d..e5f3fb6d82 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/RefreshGrantHandler.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/RefreshGrantHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2013-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 @@ -581,11 +581,11 @@ private ResponseHeader[] getResponseHeaders(OAuthTokenReqMessageContext tokReqMs return respHeaders; } - private OAuthAppDO getOAuthApp(String clientId) throws IdentityOAuth2Exception { + private OAuthAppDO getOAuthApp(String clientId, String tenantDomain) throws IdentityOAuth2Exception { OAuthAppDO oAuthAppDO; try { - oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId); + oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId, tenantDomain); } catch (InvalidOAuthClientException e) { throw new IdentityOAuth2Exception("Error while retrieving app information for clientId: " + clientId, e); @@ -649,7 +649,8 @@ private void setTokenData(AccessTokenDO accessTokenDO, OAuthTokenReqMessageConte RefreshTokenValidationDataDO validationBean, OAuth2AccessTokenReqDTO tokenReq, Timestamp timestamp) throws IdentityOAuth2Exception { - OAuthAppDO oAuthAppDO = getOAuthApp(tokenReq.getClientId()); + OAuthAppDO oAuthAppDO = getOAuthApp(tokenReq.getClientId(), validationBean.getAuthorizedUser(). + getTenantDomain()); createTokens(accessTokenDO, tokReqMsgCtx); setRefreshTokenData(accessTokenDO, tokenReq, validationBean, oAuthAppDO, accessTokenDO.getRefreshToken(), timestamp, tokReqMsgCtx); @@ -869,7 +870,8 @@ private boolean checkExecutePreIssueAccessTokensActions(RefreshTokenValidationDa OAuthTokenReqMessageContext tokenReqMessageContext) throws IdentityOAuth2Exception { - OAuthAppDO oAuthAppBean = getOAuthApp(tokenReqMessageContext.getOauth2AccessTokenReqDTO().getClientId()); + OAuthAppDO oAuthAppBean = getOAuthApp(tokenReqMessageContext.getOauth2AccessTokenReqDTO().getClientId(), + refreshTokenValidationDataDO.getAuthorizedUser().getTenantDomain()); String grantType = refreshTokenValidationDataDO.getGrantType(); // Allow if refresh token is issued for token requests from following grant types and, diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/AuthzUtil.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/AuthzUtil.java index 29620bd069..466cf79bbf 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/AuthzUtil.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/AuthzUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-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 @@ -255,13 +255,17 @@ public static boolean isUserAuthorized(AuthenticatedUser authenticatedUser, List // Application id is not required for basic authentication flow. List roleIds = getUserRoles(authenticatedUser, null); - String tenantDomain = authenticatedUser.getTenantDomain(); - if (StringUtils.isNotBlank(authenticatedUser.getAccessingOrganization()) && - !authenticatedUser.getAccessingOrganization(). - equals(authenticatedUser.getUserResidentOrganization())) { - tenantDomain = getAccessingTenantDomain(authenticatedUser); + List permissions; + /* + If the authenticatedUser contains an accessing organization, the the scopes should be checked against the + accessing organization. + */ + if (StringUtils.isNotEmpty(authenticatedUser.getAccessingOrganization())) { + permissions = getAssociatedScopesForRoles(roleIds, + authenticatedUser.getAccessingOrganization()); + } else { + permissions = getAssociatedScopesForRoles(roleIds, authenticatedUser.getTenantDomain()); } - List permissions = getAssociatedScopesForRoles(roleIds, tenantDomain); if (OAuthServerConfiguration.getInstance().isUseLegacyPermissionAccessForUserBasedAuth()) { // Handling backward compatibility for previous access level. List internalScopes = getInternalScopes(authenticatedUser.getTenantDomain()); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/JWTUtils.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/JWTUtils.java index af002c3fdc..5be02c855c 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/JWTUtils.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/JWTUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). + * Copyright (c) 2023-2025, WSO2 LLC. (https://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 @@ -30,6 +30,7 @@ import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.common.model.FederatedAuthenticatorConfig; import org.wso2.carbon.identity.application.common.model.IdentityProvider; +import org.wso2.carbon.identity.application.common.model.ServiceProviderProperty; import org.wso2.carbon.identity.application.common.util.IdentityApplicationConstants; import org.wso2.carbon.identity.application.common.util.IdentityApplicationManagementUtil; import org.wso2.carbon.identity.central.log.mgt.utils.LoggerUtils; @@ -54,12 +55,14 @@ import java.security.cert.X509Certificate; import java.security.interfaces.RSAPublicKey; import java.text.ParseException; +import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import static org.wso2.carbon.identity.application.mgt.ApplicationConstants.IS_FRAGMENT_APP; import static org.wso2.carbon.identity.organization.management.service.constant .OrganizationManagementConstants.DEFAULT_SUB_ORG_LEVEL; import static org.wso2.carbon.identity.organization.management.service.constant @@ -298,6 +301,16 @@ public static String getSigningTenantDomain(JWTClaimsSet claimsSet, AccessTokenD if (log.isDebugEnabled()) { log.debug("Getting signing tenant domain from OAuth app."); } + /* + Check if the OAuth application is a fragment application. Based on that we can define what + is the tenant that signed the JWT. In this case the signing tenant is the root organization. + */ + String appTenantDomain = IdentityTenantUtil.getTenantDomain(accessTokenDO.getTenantID()); + ServiceProviderProperty[] serviceProviderProperties = OAuth2Util.getServiceProvider( + accessTokenDO.getConsumerKey(), appTenantDomain).getSpProperties(); + if (!isFragmentApp(serviceProviderProperties)) { + return PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + } return OAuth2Util.getTenantDomainOfOauthApp(accessTokenDO.getConsumerKey()); } catch (InvalidOAuthClientException e) { throw new IdentityOAuth2Exception("Error while getting tenant domain from OAuth app with consumer key: " @@ -327,6 +340,17 @@ private static String getTenantDomain() { return tenantDomain; } + private static boolean isFragmentApp(ServiceProviderProperty[] serviceProviderProperties) { + + if (serviceProviderProperties == null) { + return false; + } + + return Arrays.stream(serviceProviderProperties). + anyMatch(property -> IS_FRAGMENT_APP.equals(property.getName()) && + Boolean.parseBoolean(property.getValue())); + } + /** * Validates that the provided token's "Not Before" time has passed, considering the configured timestamp skew. * If the token is used before the "Not Before" time, an IdentityOAuth2Exception is thrown. diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/DefaultOAuth2ScopeValidator.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/DefaultOAuth2ScopeValidator.java index 1025c723f3..8108c4e1b2 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/DefaultOAuth2ScopeValidator.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/DefaultOAuth2ScopeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-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 @@ -23,6 +23,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.api.resource.mgt.APIResourceMgtException; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; @@ -129,8 +130,13 @@ public List validateScope(OAuthTokenReqMessageContext tokenReqMessageCon String tenantDomain = tokenReqMessageContext.getOauth2AccessTokenReqDTO().getTenantDomain(); String clientId = tokenReqMessageContext.getOauth2AccessTokenReqDTO().getClientId(); String appId = getApplicationId(clientId, tenantDomain); - // When user is not accessing the resident organization, resolve the application id from the shared app table. - if (!AuthzUtil.isUserAccessingResidentOrganization(tokenReqMessageContext.getAuthorizedUser())) { + /* + When user is not accessing the resident organization and if the user is not accessing an application in + the organization level, resolve the application id from the shared app table. + */ + if (!AuthzUtil.isUserAccessingResidentOrganization(tokenReqMessageContext.getAuthorizedUser()) && + StringUtils.isEmpty(PrivilegedCarbonContext.getThreadLocalCarbonContext(). + getApplicationResidentOrganizationId())) { String orgId = tokenReqMessageContext.getAuthorizedUser().getAccessingOrganization(); String appResideOrgId = resolveOrgIdByTenantDomain(tenantDomain); appId = SharedAppResolveDAO.resolveSharedApplication(appResideOrgId, appId, orgId); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandler.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandler.java index fabb785dbb..8529949d4f 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandler.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2019-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 @@ -27,6 +27,7 @@ import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.identity.application.common.model.ServiceProvider; +import org.wso2.carbon.identity.application.common.model.ServiceProviderProperty; import org.wso2.carbon.identity.application.mgt.ApplicationConstants; import org.wso2.carbon.identity.central.log.mgt.utils.LogConstants; import org.wso2.carbon.identity.central.log.mgt.utils.LoggerUtils; @@ -47,13 +48,17 @@ import org.wso2.carbon.identity.oauth2.internal.OAuth2ServiceComponentHolder; import org.wso2.carbon.identity.oauth2.model.AccessTokenDO; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; +import org.wso2.carbon.identity.organization.management.service.util.OrganizationManagementUtil; import org.wso2.carbon.utils.DiagnosticLog; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.TreeMap; +import static org.wso2.carbon.identity.application.mgt.ApplicationConstants.IS_FRAGMENT_APP; import static org.wso2.carbon.identity.oauth2.util.OAuth2Util.isParsableJWT; /** @@ -507,6 +512,18 @@ private OAuth2IntrospectionResponseDTO validateAccessToken(OAuth2TokenValidation String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); accessTokenDO = OAuth2ServiceComponentHolder.getInstance().getTokenProvider() .getVerifiedAccessToken(validationRequest.getAccessToken().getIdentifier(), false); + /* + Check if the OAuth application is a fragment application. If that is not a fragment application, + then getting the tenant domain from the token. + */ + String appTenantDomain = IdentityTenantUtil.getTenantDomain(accessTokenDO.getTenantID()); + if (OrganizationManagementUtil.isOrganization(appTenantDomain)) { + ServiceProviderProperty[] serviceProviderProperties = OAuth2Util.getServiceProvider( + accessTokenDO.getConsumerKey(), appTenantDomain).getSpProperties(); + if (!isFragmentApp(serviceProviderProperties)) { + tenantDomain = appTenantDomain; + } + } boolean isCrossTenantTokenIntrospectionAllowed = OAuthServerConfiguration.getInstance().isCrossTenantTokenIntrospectionAllowed(); if (!isCrossTenantTokenIntrospectionAllowed && accessTokenDO != null && @@ -536,6 +553,9 @@ private OAuth2IntrospectionResponseDTO validateAccessToken(OAuth2TokenValidation LoggerUtils.triggerDiagnosticLogEvent(diagnosticLogBuilder); } return buildIntrospectionErrorResponse(e.getMessage()); + } catch (OrganizationManagementException e) { + throw new IdentityOAuth2Exception("Error while checking whether the application tenant is an " + + "organization.", e); } if (hasAccessTokenExpired(accessTokenDO)) { @@ -684,6 +704,17 @@ private OAuth2IntrospectionResponseDTO validateAccessToken(OAuth2TokenValidation return introResp; } + private boolean isFragmentApp(ServiceProviderProperty[] serviceProviderProperties) { + + if (serviceProviderProperties == null) { + return false; + } + + return Arrays.stream(serviceProviderProperties). + anyMatch(property -> IS_FRAGMENT_APP.equals(property.getName()) && + Boolean.parseBoolean(property.getValue())); + } + private String getAuthzUser(AccessTokenDO accessTokenDO) throws IdentityOAuth2Exception { AuthenticatedUser user = accessTokenDO.getAuthzUser(); diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java index 614539abd9..6beb79b807 100644 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2017-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -30,6 +30,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.AuthenticationMethodNameTranslator; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; import org.wso2.carbon.identity.oauth.cache.AuthorizationGrantCache; @@ -121,7 +122,7 @@ public String buildIDToken(OAuthTokenReqMessageContext tokenReqMsgCtxt, // Initialize OAuthAppDO using the client ID. OAuthAppDO oAuthAppDO; try { - oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId); + oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId, spTenantDomain); } catch (InvalidOAuthClientException e) { String error = "Error occurred while getting app information for client_id: " + clientId; throw new IdentityOAuth2Exception(error, e); @@ -421,7 +422,16 @@ private JWTClaimsSet handleOIDCCustomClaims(OAuthTokenReqMessageContext tokReqMs private String getSigningTenantDomain(OAuthTokenReqMessageContext tokReqMsgCtx) { boolean isJWTSignedWithSPKey = OAuthServerConfiguration.getInstance().isJWTSignedWithSPKey(); - if (isJWTSignedWithSPKey) { + String applicationResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getApplicationResidentOrganizationId(); + /* + If applicationResidentOrgId is not empty, then the request comes for an application which is + registered directly in the organization of the applicationResidentOrgId. In this case, the tenant domain + that needs to be signing the token should be the root tenant of the organization in applicationResidentOrgId. + */ + if (StringUtils.isNotEmpty(applicationResidentOrgId)) { + return PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + } else if (isJWTSignedWithSPKey) { return (String) tokReqMsgCtx.getProperty(MultitenantConstants.TENANT_DOMAIN); } else { return tokReqMsgCtx.getAuthorizedUser().getTenantDomain(); diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/OAuth2ServiceTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/OAuth2ServiceTest.java index 424d6b6f79..41b100efe0 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/OAuth2ServiceTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/OAuth2ServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2017-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 @@ -73,9 +73,11 @@ import org.wso2.carbon.identity.oauth2.model.RefreshTokenValidationDataDO; import org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer; import org.wso2.carbon.identity.oauth2.token.bindings.TokenBinding; +import org.wso2.carbon.identity.oauth2.util.AuthzUtil; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; import org.wso2.carbon.user.core.UserRealm; import org.wso2.carbon.user.core.UserStoreManager; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import org.wso2.carbon.utils.multitenancy.MultitenantUtils; import java.lang.reflect.Field; @@ -667,7 +669,8 @@ public void testRevokeTokenByOAuthClientWithAccessToken() throws Exception { try (MockedStatic oAuthComponentServiceHolder = mockStatic(OAuthComponentServiceHolder.class); MockedStatic oAuth2Util = mockStatic(OAuth2Util.class); - MockedStatic oAuthUtil = mockStatic(OAuthUtil.class)) { + MockedStatic oAuthUtil = mockStatic(OAuthUtil.class); + MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { setUpRevokeToken(oAuthComponentServiceHolder, oAuth2Util, oAuthUtil); AccessTokenDO accessTokenDO = getAccessToken(); TokenBinding tokenBinding = new TokenBinding(); @@ -680,9 +683,11 @@ public void testRevokeTokenByOAuthClientWithAccessToken() throws Exception { setPrivateField(oAuthTokenPersistenceFactory, "managementDAO", mockTokenManagementDAOImpl); AccessTokenDAO mockAccessTokenDAO = mock(AccessTokenDAO.class); setPrivateField(oAuthTokenPersistenceFactory, "tokenDAO", mockAccessTokenDAO); + identityTenantUtil.when(() -> IdentityTenantUtil.getTenantDomain(anyInt())).thenReturn( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); OAuthAppDO oAuthAppDO = new OAuthAppDO(); - when(OAuth2Util.getAppInformationByClientId(anyString())).thenReturn(oAuthAppDO); + when(OAuth2Util.getAppInformationByClientId(anyString(), anyString())).thenReturn(oAuthAppDO); OAuthRevocationRequestDTO revokeRequestDTO = getOAuthRevocationRequestDTO(); oAuth2Service.revokeTokenByOAuthClient(revokeRequestDTO); @@ -710,14 +715,17 @@ public void testRevokeTokenByOAuthClientWithAccessTokenWithInvalidBinding() thro try (MockedStatic oAuthComponentServiceHolder = mockStatic(OAuthComponentServiceHolder.class); MockedStatic oAuth2Util = mockStatic(OAuth2Util.class); - MockedStatic oAuthUtil = mockStatic(OAuthUtil.class)) { + MockedStatic oAuthUtil = mockStatic(OAuthUtil.class); + MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { setUpRevokeToken(oAuthComponentServiceHolder, oAuth2Util, oAuthUtil); AccessTokenDO accessTokenDO = getAccessToken(); when(OAuth2Util.findAccessToken(anyString(), anyBoolean())).thenReturn(accessTokenDO); + identityTenantUtil.when(() -> IdentityTenantUtil.getTenantDomain(anyInt())).thenReturn( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); OAuthAppDO oAuthAppDO = new OAuthAppDO(); oAuthAppDO.setTokenBindingValidationEnabled(true); - when(OAuth2Util.getAppInformationByClientId(anyString())).thenReturn(oAuthAppDO); + when(OAuth2Util.getAppInformationByClientId(anyString(), anyString())).thenReturn(oAuthAppDO); OAuthRevocationRequestDTO revokeRequestDTO = getOAuthRevocationRequestDTO(); OAuthRevocationResponseDTO oAuthRevocationResponseDTO = oAuth2Service @@ -958,7 +966,10 @@ private void setUpRevokeToken(MockedStatic oAuthCom @Test public void testGetOauthApplicationState() throws Exception { - try (MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { + try (MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class); + MockedStatic authzUtil = mockStatic(AuthzUtil.class)) { + + authzUtil.when(AuthzUtil::isLegacyAuthzRuntime).thenReturn(false); String id = "clientId1"; OAuthAppDO oAuthAppDO = new OAuthAppDO(); oAuthAppDO.setState("ACTIVE"); @@ -979,6 +990,7 @@ public void testGetOauthApplicationState() throws Exception { public void testGetOauthApplicationStateWithIdentityOAuth2Exception() throws Exception { try (MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { + identityTenantUtil.when(IdentityTenantUtil::getLoginTenantId).thenReturn(1); identityTenantUtil.when(() -> IdentityTenantUtil.getTenantId(anyString())).thenReturn(1); identityTenantUtil.when(() -> IdentityTenantUtil.getTenantDomain(1)).thenReturn("test.tenant"); @@ -998,6 +1010,7 @@ public void testGetOauthApplicationStateWithIdentityOAuth2Exception() throws Exc public void testGetOauthApplicationStateWithInvalidOAuthClientException() throws Exception { try (MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { + identityTenantUtil.when(IdentityTenantUtil::getLoginTenantId).thenReturn(1); identityTenantUtil.when(() -> IdentityTenantUtil.getTenantId(anyString())).thenReturn(1); identityTenantUtil.when(() -> IdentityTenantUtil.getTenantDomain(1)).thenReturn("test.tenant"); diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticatorTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticatorTest.java index cda43492f2..f60dbf7b1a 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticatorTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/BasicAuthClientAuthenticatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2018-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -115,7 +115,7 @@ public void testAuthenticateClient(String headerName, String headerValue, HashMa OAuthClientAuthnContext oAuthClientAuthnContext = (OAuthClientAuthnContext) oAuthClientAuthnContextObj; HttpServletRequest httpServletRequest = mock(HttpServletRequest.class); - oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString())).thenReturn + oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString(), anyString())).thenReturn (isAuthenticated); when(httpServletRequest.getHeader(headerName)).thenReturn(headerValue); assertEquals(basicAuthClientAuthenticator.authenticateClient(httpServletRequest, bodyContent, @@ -157,10 +157,10 @@ public void testAuthenticateClientExeption(String headerName, String headerValue HttpServletRequest httpServletRequest = mock(HttpServletRequest.class); if (exception instanceof IdentityOAuthAdminException) { - oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString())).thenThrow( + oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString(), anyString())).thenThrow( (IdentityOAuthAdminException) exception); } else if (exception instanceof IdentityOAuth2Exception) { - oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString())).thenThrow( + oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString(), anyString())).thenThrow( (IdentityOAuth2Exception) exception); } diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnServiceTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnServiceTest.java index 3c8a67416d..ac080c38b2 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnServiceTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2018-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -153,7 +153,7 @@ public void testAuthenticateClient(Map headers, Map OAuth2Util.authenticateClient(anyString(), anyString())).thenReturn + oAuth2Util.when(() -> OAuth2Util.authenticateClient(anyString(), anyString(), anyString())).thenReturn (isBasicAuthenticated); HttpServletRequest httpServletRequest = mock(HttpServletRequest.class); setHeaders(httpServletRequest, headers); diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuerTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuerTest.java index d0ff62f980..7710576c7a 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuerTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2017-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 @@ -42,7 +42,9 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import org.wso2.carbon.base.CarbonBaseConstants; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; +import org.wso2.carbon.identity.common.testng.WithCarbonHome; import org.wso2.carbon.identity.common.testng.WithH2Database; import org.wso2.carbon.identity.core.util.IdentityTenantUtil; import org.wso2.carbon.identity.core.util.IdentityUtil; @@ -61,6 +63,7 @@ import org.wso2.carbon.identity.oauth2.token.handlers.grant.AuthorizationGrantHandler; import org.wso2.carbon.identity.oauth2.util.OAuth2Util; import org.wso2.carbon.identity.openidconnect.CustomClaimsCallbackHandler; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import java.net.URI; import java.nio.charset.StandardCharsets; @@ -98,6 +101,7 @@ import static org.testng.Assert.fail; import static org.wso2.carbon.identity.openidconnect.util.TestUtils.getKeyStoreFromFile; +@WithCarbonHome @WithH2Database(files = {"dbScripts/identity.sql", "dbScripts/insert_consumer_app.sql", "dbScripts/insert_local_idp.sql"}) public class JWTTokenIssuerTest { @@ -147,6 +151,10 @@ public class JWTTokenIssuerTest { @BeforeMethod public void setUp() throws Exception { initMocks(this); + System.setProperty( + CarbonBaseConstants.CARBON_HOME, + Paths.get(System.getProperty("user.dir"), "src", "test", "resources").toString() + ); oAuthServerConfiguration = mockStatic(OAuthServerConfiguration.class); oAuthServerConfiguration.when(OAuthServerConfiguration::getInstance) .thenReturn(this.mockOAuthServerConfiguration); @@ -176,7 +184,11 @@ public Object[][] provideRequestScopes() { public void testBuildJWTTokenFromTokenMsgContext(String requestScopes[], List expectedJWTAudiences) throws Exception { - try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class)) { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain("DUMMY_TENANT.COM"); + try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class); + MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { + + identityTenantUtil.when(() -> IdentityTenantUtil.getTenantId(anyString())).thenReturn(-1234); OAuth2AccessTokenReqDTO accessTokenReqDTO = new OAuth2AccessTokenReqDTO(); accessTokenReqDTO.setGrantType(USER_ACCESS_TOKEN_GRANT_TYPE); accessTokenReqDTO.setClientId(DUMMY_CLIENT_ID); @@ -231,7 +243,11 @@ public void testBuildJWTTokenFromTokenMsgContext(String requestScopes[], public void testBuildJWTTokenFromAuthzMsgContext(String requestScopes[], List expectedJWTAudiences) throws Exception { - try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class)) { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain("DUMMY_TENANT.COM"); + try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class); + MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { + + identityTenantUtil.when(() -> IdentityTenantUtil.getTenantId(anyString())).thenReturn(-1234); OAuth2AuthorizeReqDTO authorizeReqDTO = new OAuth2AuthorizeReqDTO(); OAuthAuthzReqMessageContext authzReqMessageContext = new OAuthAuthzReqMessageContext(authorizeReqDTO); authzReqMessageContext.setApprovedScope(requestScopes); @@ -284,13 +300,15 @@ public Object answer(InvocationOnMock invocationOnMock) throws Throwable { @Test(expectedExceptions = IdentityOAuth2Exception.class) public void testCreateJWTClaimSetForInvalidClient() throws Exception { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class)) { - oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(null)) + oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString(), anyString())) .thenThrow(new InvalidOAuthClientException("INVALID_CLIENT")); oAuth2Util.when(OAuth2Util::isTokenPersistenceEnabled).thenReturn(true); when(mockOAuthServerConfiguration.getSignatureAlgorithm()).thenReturn(SHA256_WITH_HMAC); JWTTokenIssuer jwtTokenIssuer = new JWTTokenIssuer(); - jwtTokenIssuer.createJWTClaimSet(null, null, null); + jwtTokenIssuer.createJWTClaimSet(null, null, DUMMY_CLIENT_ID); } } @@ -370,15 +388,19 @@ public void testCreateJWTClaimSet(Object authzReqMessageContext, String sub, long expectedExpiry, boolean ppidEnabled) throws Exception { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class); - MockedStatic identityUtil = mockStatic(IdentityUtil.class)) { + MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { + + identityTenantUtil.when(() -> IdentityTenantUtil.getTenantId(anyString())).thenReturn(-1234); OAuthAppDO appDO = spy(new OAuthAppDO()); appDO.setSubjectType("pairwise"); appDO.setSectorIdentifierURI(DUMMY_SECTOR_IDENTIFIER); appDO.setOauthConsumerKey(DUMMY_CLIENT_ID); mockGrantHandlers(); mockCustomClaimsCallbackHandler(); - oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString())).thenReturn(appDO); + oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString(), anyString())).thenReturn(appDO); oAuth2Util.when(OAuth2Util::getIDTokenIssuer).thenReturn(ID_TOKEN_ISSUER); oAuth2Util.when(() -> OAuth2Util.getIdTokenIssuer(anyString(), anyBoolean())).thenReturn(ID_TOKEN_ISSUER); oAuth2Util.when(() -> OAuth2Util.getOIDCAudience(anyString(), any())).thenReturn(Collections.singletonList @@ -460,6 +482,8 @@ public void testSignJWTWithRSA(Object authzReqMessageContext, String sub, long expectedExpiry, boolean ppidEnabled) throws Exception { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class, Mockito.CALLS_REAL_METHODS); MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class); MockedStatic identityUtil = mockStatic(IdentityUtil.class)) { @@ -470,7 +494,7 @@ public void testSignJWTWithRSA(Object authzReqMessageContext, mockCustomClaimsCallbackHandler(); identityUtil.when(() -> IdentityUtil.getProperty(OAuthConstants.MTLS_HOSTNAME)) .thenReturn(DUMMY_MTLS_TOKEN_ENDPOINT); - oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString())).thenReturn(appDO); + oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString(), anyString())).thenReturn(appDO); oAuth2Util.when(OAuth2Util::isTokenPersistenceEnabled).thenReturn(true); System.setProperty(CarbonBaseConstants.CARBON_HOME, @@ -780,7 +804,7 @@ private void prepareForBuildJWTToken(MockedStatic oAuth2Util) OAuthAppDO appDO = spy(new OAuthAppDO()); mockGrantHandlers(); mockCustomClaimsCallbackHandler(); - oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString())).thenReturn(appDO); + oAuth2Util.when(() -> OAuth2Util.getAppInformationByClientId(anyString(), anyString())).thenReturn(appDO); oAuth2Util.when(() -> OAuth2Util.getTenantDomain(anyInt())).thenReturn("super.wso2"); oAuth2Util.when(OAuth2Util::isTokenPersistenceEnabled).thenReturn(true); } @@ -822,6 +846,8 @@ public Map getAdditionalClaims(OAuthTokenReqMessageContext conte @Test public void testIssueSubjectToken() throws Exception { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); when(mockOAuthServerConfiguration.getSignatureAlgorithm()).thenReturn(SHA256_WITH_RSA); try (MockedStatic oAuth2Util = mockStatic(OAuth2Util.class, Mockito.CALLS_REAL_METHODS); MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandlerTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandlerTest.java index b23e74675a..ed4eaa7505 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandlerTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AbstractAuthorizationGrantHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2017-2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -27,6 +27,8 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.action.execution.ActionExecutorService; import org.wso2.carbon.identity.action.execution.exception.ActionExecutionException; import org.wso2.carbon.identity.action.execution.model.ActionType; @@ -74,6 +76,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyMap; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mockStatic; import static org.mockito.Mockito.verify; @@ -166,6 +169,9 @@ public void tearDown() { boolean dbEntryAvailable, String dbTokenState, boolean tokenLoggable, boolean isIDPIdColumnEnabled, boolean setBindingReference) throws Exception { + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext() + .setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); OAuth2ServiceComponentHolder.setIDPIdColumnEnabled(isIDPIdColumnEnabled); Map supportedGrantTypes = new HashMap<>(); @@ -189,7 +195,8 @@ public void tearDown() { // Mocking static methods using try-with-resources try (MockedStatic identityUtil = mockStatic(IdentityUtil.class); - MockedStatic oauth2Util = mockStatic(OAuth2Util.class)) { + MockedStatic oauth2Util = mockStatic(OAuth2Util.class); + MockedStatic identityTenantUtil = mockStatic(IdentityTenantUtil.class)) { identityUtil.when(() -> IdentityUtil.getProperty(anyString())) .thenReturn(Boolean.TRUE.toString()); @@ -201,13 +208,17 @@ public void tearDown() { OauthTokenIssuer oauthTokenIssuer = mock(JWTTokenIssuer.class); when(oauthTokenIssuer.getAccessTokenType()).thenReturn("jwt"); oauth2Util.when(() -> OAuth2Util.getOAuthTokenIssuerForOAuthApp(clientId)).thenReturn(oauthTokenIssuer); - oauth2Util.when(() -> OAuth2Util.getAppInformationByClientId(clientId)).thenReturn(oAuthAppDO); + oauth2Util.when(() -> OAuth2Util.getAppInformationByClientId(eq(clientId), anyString())). + thenReturn(oAuthAppDO); + identityTenantUtil.when(IdentityTenantUtil::getLoginTenantId).thenReturn(-1234); // Set allowed grant types (ensure PASSWORD_GRANT is allowed for renewal) OAuth2ServiceComponentHolder.setJwtRenewWithoutRevokeAllowedGrantTypes( Collections.singletonList("password")); // This allows PASSWORD_GRANT OAuth2AccessTokenRespDTO tokenRespDTO = handler.issue(tokReqMsgCtx); + } finally { + PrivilegedCarbonContext.endTenantFlow(); } } @@ -258,6 +269,11 @@ public void testIssue(boolean cacheEnabled, boolean cacheEntryAvailable, long ca boolean isIDPIdColumnEnabled) throws Exception { + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + OAuthComponentServiceHolder.getInstance().setActionExecutorService(mockActionExecutionService); + OAuth2ServiceComponentHolder.setIDPIdColumnEnabled(isIDPIdColumnEnabled); Map supportedGrantTypes = new HashMap<>(); @@ -273,6 +289,7 @@ public void testIssue(boolean cacheEnabled, boolean cacheEntryAvailable, long ca OAuth2AccessTokenRespDTO tokenRespDTO = handler.issue(tokReqMsgCtx); assertNotNull(tokenRespDTO.getAccessToken()); + PrivilegedCarbonContext.endTenantFlow(); } @DataProvider(name = "AuthorizeAccessDelegationDataProvider") diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandlerTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandlerTest.java index f197e8bc3d..9d73fb44e7 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandlerTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/PasswordGrantHandlerTest.java @@ -20,9 +20,11 @@ import org.apache.commons.logging.Log; import org.mockito.MockedStatic; +import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.config.builder.FileBasedConfigurationBuilder; import org.wso2.carbon.identity.application.authentication.framework.config.model.AuthenticatorConfig; import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils; @@ -31,6 +33,7 @@ import org.wso2.carbon.identity.application.common.model.ServiceProvider; import org.wso2.carbon.identity.application.common.model.ServiceProviderProperty; import org.wso2.carbon.identity.application.mgt.ApplicationManagementService; +import org.wso2.carbon.identity.common.testng.WithCarbonHome; import org.wso2.carbon.identity.core.util.IdentityTenantUtil; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.multi.attribute.login.mgt.ResolvedUserResult; @@ -70,6 +73,7 @@ import static org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants.SHOW_AUTHFAILURE_RESON_CONFIG; import static org.wso2.carbon.user.core.UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME; +@WithCarbonHome public class PasswordGrantHandlerTest { private OAuthTokenReqMessageContext tokReqMsgCtx; @@ -116,6 +120,15 @@ public void init() throws Exception { // Set the static field to the mock object logField.set(null, mockLog); + + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setApplicationResidentOrganizationId(null); + } + + @AfterMethod + public void tearDown() { + + PrivilegedCarbonContext.endTenantFlow(); } @DataProvider(name = "ValidateGrantDataProvider") diff --git a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandlerTest.java b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandlerTest.java index b537478ab9..dce51dc02c 100644 --- a/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandlerTest.java +++ b/components/org.wso2.carbon.identity.oauth/src/test/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandlerTest.java @@ -71,6 +71,7 @@ import org.wso2.carbon.identity.openidconnect.util.TestUtils; import org.wso2.carbon.identity.organization.management.service.OrganizationManager; import org.wso2.carbon.identity.organization.management.service.util.OrganizationManagementConfigUtil; +import org.wso2.carbon.identity.organization.management.service.util.OrganizationManagementUtil; import org.wso2.carbon.idp.mgt.IdentityProviderManager; import org.wso2.carbon.user.api.RealmConfiguration; import org.wso2.carbon.user.core.service.RealmService; @@ -254,8 +255,12 @@ public void testBuildIntrospectionResponse(boolean isIDPIdColumnEnabled, String OAuthServerConfiguration.class); MockedStatic identityDatabaseUtil = mockStatic(IdentityDatabaseUtil.class); MockedStatic oAuth2ServiceComponentHolder = - mockStatic(OAuth2ServiceComponentHolder.class);) { + mockStatic(OAuth2ServiceComponentHolder.class); + MockedStatic organizationManagementUtil = + mockStatic(OrganizationManagementUtil.class)) { + organizationManagementUtil.when(() -> OrganizationManagementUtil.isOrganization(anyString())). + thenReturn(false); OAuth2ServiceComponentHolder.setIDPIdColumnEnabled(isIDPIdColumnEnabled); mockRequiredObjects(oAuthServerConfiguration, identityDatabaseUtil); OAuth2ServiceComponentHolder oAuth2ServiceComponentHolderInstance = From e81825c5d9815453b34ba57dd0dae13e17b4c7bc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 26 Jan 2025 14:23:26 +0000 Subject: [PATCH 14/15] [WSO2 Release] [Jenkins #5190] [Release 7.0.228] prepare release v7.0.228 --- components/org.wso2.carbon.identity.api.server.dcr/pom.xml | 4 ++-- .../org.wso2.carbon.identity.api.server.oauth.scope/pom.xml | 4 ++-- .../pom.xml | 2 +- components/org.wso2.carbon.identity.discovery/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ciba/pom.xml | 2 +- .../pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.common/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.extension/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.par/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.rar/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.stub/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ui/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.session/pom.xml | 2 +- components/org.wso2.carbon.identity.webfinger/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml | 2 +- pom.xml | 4 ++-- service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.testng/pom.xml | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml index b812d2f234..e38732c7ee 100644 --- a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228-SNAPSHOT + 7.0.228 ../../pom.xml org.wso2.carbon.identity.api.server.dcr - 7.0.228-SNAPSHOT + 7.0.228 WSO2 Carbon - User DCR Rest API WSO2 Carbon - User DCR Rest API diff --git a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml index ed9b440218..d8c6a19a77 100644 --- a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228-SNAPSHOT + 7.0.228 ../.. org.wso2.carbon.identity.api.server.oauth.scope - 7.0.228-SNAPSHOT + 7.0.228 WSO2 Carbon - Identity OAuth 2.0 Scope Rest APIs Rest APIs for OAuth 2.0 Scope Handling diff --git a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml index 291a9c6638..44444928bb 100644 --- a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml +++ b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228-SNAPSHOT + 7.0.228 ../../pom.xml diff --git a/components/org.wso2.carbon.identity.discovery/pom.xml b/components/org.wso2.carbon.identity.discovery/pom.xml index 3b1ff700ea..584e2ee143 100644 --- a/components/org.wso2.carbon.identity.discovery/pom.xml +++ b/components/org.wso2.carbon.identity.discovery/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml index 122908c25b..5c39c2e97a 100644 --- a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml @@ -20,7 +20,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.228-SNAPSHOT + 7.0.228 ../../pom.xml diff --git a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml index 60f9912189..276e5ebd3a 100644 --- a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.common/pom.xml b/components/org.wso2.carbon.identity.oauth.common/pom.xml index daed837698..88eafb9e67 100644 --- a/components/org.wso2.carbon.identity.oauth.common/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml index 4ba49c2c48..688928132f 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index d55d6734b7..71565363ff 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml index 08ae78b491..e2db81d238 100644 --- a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.extension/pom.xml b/components/org.wso2.carbon.identity.oauth.extension/pom.xml index f48f3f4008..9e9e7bbb09 100644 --- a/components/org.wso2.carbon.identity.oauth.extension/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.extension/pom.xml @@ -19,7 +19,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.228-SNAPSHOT + 7.0.228 ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.par/pom.xml b/components/org.wso2.carbon.identity.oauth.par/pom.xml index 60c4e6ace2..e3c32597bb 100644 --- a/components/org.wso2.carbon.identity.oauth.par/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.par/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.rar/pom.xml b/components/org.wso2.carbon.identity.oauth.rar/pom.xml index 72e72373d2..c9e3351a4a 100644 --- a/components/org.wso2.carbon.identity.oauth.rar/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.rar/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml index dfaca2c53f..cf4c7d7a79 100644 --- a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.stub/pom.xml b/components/org.wso2.carbon.identity.oauth.stub/pom.xml index 0b165e85e2..aae615ce70 100644 --- a/components/org.wso2.carbon.identity.oauth.stub/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ui/pom.xml b/components/org.wso2.carbon.identity.oauth.ui/pom.xml index 901c29bf5c..0188eca534 100644 --- a/components/org.wso2.carbon.identity.oauth.ui/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ui/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth/pom.xml b/components/org.wso2.carbon.identity.oauth/pom.xml index 1c43582b36..15f0edb067 100644 --- a/components/org.wso2.carbon.identity.oauth/pom.xml +++ b/components/org.wso2.carbon.identity.oauth/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml index 201c1e6011..b75a7b3b85 100644 --- a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.session/pom.xml b/components/org.wso2.carbon.identity.oidc.session/pom.xml index 5dbaa9bc5d..be6f7bc4ca 100644 --- a/components/org.wso2.carbon.identity.oidc.session/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.session/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/components/org.wso2.carbon.identity.webfinger/pom.xml b/components/org.wso2.carbon.identity.webfinger/pom.xml index 10dac341f1..1738a1c241 100644 --- a/components/org.wso2.carbon.identity.webfinger/pom.xml +++ b/components/org.wso2.carbon.identity.webfinger/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml index acfafb3319..d62b7f0ac4 100644 --- a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml index ab16c09423..cb5ad25c78 100644 --- a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.feature/pom.xml index 2c953506eb..c752d4c449 100644 --- a/features/org.wso2.carbon.identity.oauth.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml index b1b4a14723..7ef9f8f4b1 100644 --- a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml index 2ecfb279cf..387a4f7426 100644 --- a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 diff --git a/pom.xml b/pom.xml index 9523a17a25..69ab04ae25 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228-SNAPSHOT + 7.0.228 pom WSO2 Carbon OAuth module http://wso2.org @@ -37,7 +37,7 @@ https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git - HEAD + v7.0.228 diff --git a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml index eb55d1893a..77c05c108e 100644 --- a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml +++ b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228-SNAPSHOT + 7.0.228 ../../pom.xml diff --git a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml index 318a576ba7..c5eb1f3398 100644 --- a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml +++ b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228-SNAPSHOT + 7.0.228 4.0.0 From 4e516a58260bc9ac89661cdf2c51aa36739bb050 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 26 Jan 2025 14:23:28 +0000 Subject: [PATCH 15/15] [WSO2 Release] [Jenkins #5190] [Release 7.0.228] prepare for next development iteration --- components/org.wso2.carbon.identity.api.server.dcr/pom.xml | 4 ++-- .../org.wso2.carbon.identity.api.server.oauth.scope/pom.xml | 4 ++-- .../pom.xml | 2 +- components/org.wso2.carbon.identity.discovery/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ciba/pom.xml | 2 +- .../pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.common/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.extension/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.par/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.rar/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.stub/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth.ui/pom.xml | 2 +- components/org.wso2.carbon.identity.oauth/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.dcr/pom.xml | 2 +- components/org.wso2.carbon.identity.oidc.session/pom.xml | 2 +- components/org.wso2.carbon.identity.webfinger/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.feature/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.server.feature/pom.xml | 2 +- features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml | 2 +- pom.xml | 4 ++-- service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml | 2 +- .../org.wso2.carbon.identity.oauth.common.testng/pom.xml | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml index e38732c7ee..7777968c1b 100644 --- a/components/org.wso2.carbon.identity.api.server.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.dcr/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228 + 7.0.229-SNAPSHOT ../../pom.xml org.wso2.carbon.identity.api.server.dcr - 7.0.228 + 7.0.229-SNAPSHOT WSO2 Carbon - User DCR Rest API WSO2 Carbon - User DCR Rest API diff --git a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml index d8c6a19a77..8d631ade99 100644 --- a/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.oauth.scope/pom.xml @@ -23,12 +23,12 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228 + 7.0.229-SNAPSHOT ../.. org.wso2.carbon.identity.api.server.oauth.scope - 7.0.228 + 7.0.229-SNAPSHOT WSO2 Carbon - Identity OAuth 2.0 Scope Rest APIs Rest APIs for OAuth 2.0 Scope Handling diff --git a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml index 44444928bb..b5ef9c69d2 100644 --- a/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml +++ b/components/org.wso2.carbon.identity.client.attestation.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228 + 7.0.229-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.discovery/pom.xml b/components/org.wso2.carbon.identity.discovery/pom.xml index 584e2ee143..fb6a4f5439 100644 --- a/components/org.wso2.carbon.identity.discovery/pom.xml +++ b/components/org.wso2.carbon.identity.discovery/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml index 5c39c2e97a..842f6ae2c2 100644 --- a/components/org.wso2.carbon.identity.oauth.ciba/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ciba/pom.xml @@ -20,7 +20,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.228 + 7.0.229-SNAPSHOT ../../pom.xml diff --git a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml index 276e5ebd3a..a178d340f8 100644 --- a/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.client.authn.filter/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.common/pom.xml b/components/org.wso2.carbon.identity.oauth.common/pom.xml index 88eafb9e67..11660e3650 100644 --- a/components/org.wso2.carbon.identity.oauth.common/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.common/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml index 688928132f..4fe7abc463 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr.endpoint/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml index 71565363ff..85e5bf51c7 100644 --- a/components/org.wso2.carbon.identity.oauth.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml index e2db81d238..22e998c380 100644 --- a/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.extension/pom.xml b/components/org.wso2.carbon.identity.oauth.extension/pom.xml index 9e9e7bbb09..edffb64aa5 100644 --- a/components/org.wso2.carbon.identity.oauth.extension/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.extension/pom.xml @@ -19,7 +19,7 @@ identity-inbound-auth-oauth org.wso2.carbon.identity.inbound.auth.oauth2 - 7.0.228 + 7.0.229-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.par/pom.xml b/components/org.wso2.carbon.identity.oauth.par/pom.xml index e3c32597bb..5a6ec18dab 100644 --- a/components/org.wso2.carbon.identity.oauth.par/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.par/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.rar/pom.xml b/components/org.wso2.carbon.identity.oauth.rar/pom.xml index c9e3351a4a..46fb499218 100644 --- a/components/org.wso2.carbon.identity.oauth.rar/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.rar/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml index cf4c7d7a79..61df2f0934 100644 --- a/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.stub/pom.xml b/components/org.wso2.carbon.identity.oauth.stub/pom.xml index aae615ce70..7467ee8998 100644 --- a/components/org.wso2.carbon.identity.oauth.stub/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth.ui/pom.xml b/components/org.wso2.carbon.identity.oauth.ui/pom.xml index 0188eca534..00e6d0d8c6 100644 --- a/components/org.wso2.carbon.identity.oauth.ui/pom.xml +++ b/components/org.wso2.carbon.identity.oauth.ui/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oauth/pom.xml b/components/org.wso2.carbon.identity.oauth/pom.xml index 15f0edb067..8ea0109ea6 100644 --- a/components/org.wso2.carbon.identity.oauth/pom.xml +++ b/components/org.wso2.carbon.identity.oauth/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml index b75a7b3b85..7a0a90e041 100644 --- a/components/org.wso2.carbon.identity.oidc.dcr/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.dcr/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.oidc.session/pom.xml b/components/org.wso2.carbon.identity.oidc.session/pom.xml index be6f7bc4ca..9a0bc04348 100644 --- a/components/org.wso2.carbon.identity.oidc.session/pom.xml +++ b/components/org.wso2.carbon.identity.oidc.session/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/components/org.wso2.carbon.identity.webfinger/pom.xml b/components/org.wso2.carbon.identity.webfinger/pom.xml index 1738a1c241..f0bd7e5d24 100644 --- a/components/org.wso2.carbon.identity.webfinger/pom.xml +++ b/components/org.wso2.carbon.identity.webfinger/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml index d62b7f0ac4..f26b66a39c 100644 --- a/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.common.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml index cb5ad25c78..d1572f56af 100644 --- a/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.dcr.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.feature/pom.xml index c752d4c449..f18ae3b109 100644 --- a/features/org.wso2.carbon.identity.oauth.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml index 7ef9f8f4b1..3c43e373ef 100644 --- a/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml index 387a4f7426..778917610b 100644 --- a/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.oauth.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index 69ab04ae25..78feb19039 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228 + 7.0.229-SNAPSHOT pom WSO2 Carbon OAuth module http://wso2.org @@ -37,7 +37,7 @@ https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git scm:git:https://github.com/wso2-extensions/identity-inbound-auth-oauth.git - v7.0.228 + HEAD diff --git a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml index 77c05c108e..8158e7959b 100644 --- a/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml +++ b/service-stubs/org.wso2.carbon.claim.metadata.mgt.stub/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth - 7.0.228 + 7.0.229-SNAPSHOT ../../pom.xml diff --git a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml index c5eb1f3398..ad8258bf23 100644 --- a/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml +++ b/test-utils/org.wso2.carbon.identity.oauth.common.testng/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.identity.inbound.auth.oauth2 identity-inbound-auth-oauth ../../pom.xml - 7.0.228 + 7.0.229-SNAPSHOT 4.0.0