Skip to content

Commit

Permalink
Merge branch 'wso2:master' into move-idp-secrets-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla authored Nov 4, 2024
2 parents 54ba660 + 4280f01 commit 0cfc963
Show file tree
Hide file tree
Showing 261 changed files with 978 additions and 502 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>action-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class ActionIDs {
public static final String PROCESS_ACTION_REQUEST = "process-action-request";
public static final String SEND_ACTION_REQUEST = "send-action-request";
public static final String RECEIVE_ACTION_RESPONSE = "receive-action-response";
public static final String VALIDATE_ACTION_OPERATIONS = "validate-action-response";
public static final String EXECUTE_ACTION_OPERATIONS = "process-action-response";
public static final String VALIDATE_ACTION_RESPONSE = "validate-action-response";
public static final String PROCESS_ACTION_RESPONSE = "process-action-response";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void logPerformableOperations(Action action, List<String> allowedOps, Lis
return;
}
DiagnosticLog.DiagnosticLogBuilder diagnosticLogBuilder = initializeDiagnosticLogBuilder(
ActionExecutionLogConstants.ActionIDs.VALIDATE_ACTION_OPERATIONS,
ActionExecutionLogConstants.ActionIDs.VALIDATE_ACTION_RESPONSE,
"Validated operations to perform on " + action.getType().getDisplayName() + " action.",
DiagnosticLog.ResultStatus.SUCCESS);
triggerLogEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>action-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion components/action-mgt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>identity-framework</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>api-resource-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>api-resource-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.wso2.carbon.identity.api.resource.mgt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion components/api-resource-mgt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>identity-framework</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>application-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>application-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>application-mgt</artifactId>
<version>7.5.102-SNAPSHOT</version>
<version>7.5.109-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.wso2.carbon.identity.application.mgt</artifactId>
Expand Down Expand Up @@ -191,6 +191,10 @@
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.secret.mgt.core</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.certificate.management</artifactId>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -260,6 +264,9 @@
version="${org.wso2.carbon.identity.organization.management.core.version.range}",
org.wso2.carbon.identity.api.resource.mgt.model; version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.api.resource.mgt.util; version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.certificate.management.service; version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.certificate.management.exception; version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.certificate.management.model; version="${carbon.identity.package.import.version.range}",
</Import-Package>
<Export-Package>
!org.wso2.carbon.identity.application.mgt.internal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,21 @@ public ApplicationBasicInfo getApplicationBasicInfoByName(String name, String te
throw new NotImplementedException();
}


/**
* Retrieve application UUID using the application name.
*
* @param name Name of the application
* @param tenantDomain Tenant domain of the application
* @return Application UUID
* @throws IdentityApplicationManagementException
*/
public String getApplicationUUIDByName(String name, String tenantDomain)
throws IdentityApplicationManagementException {

throw new NotImplementedException();
}
/**
* Get custom inbound authenticator configurations.
*
* @return custom inbound authenticator configs maps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
import static org.wso2.carbon.identity.application.mgt.inbound.InboundFunctions.updateOrInsertInbound;
import static org.wso2.carbon.identity.central.log.mgt.utils.LoggerUtils.triggerAuditLogEvent;
import static org.wso2.carbon.identity.core.util.IdentityUtil.getInitiatorId;
import static org.wso2.carbon.identity.core.util.IdentityUtil.isValidPEMCertificate;
import static org.wso2.carbon.identity.role.v2.mgt.core.RoleConstants.Error.ROLE_MANAGEMENT_ERROR_CODE_PREFIX;
import static org.wso2.carbon.identity.role.v2.mgt.core.RoleConstants.Error.ROLE_NOT_FOUND;
import static org.wso2.carbon.utils.multitenancy.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
Expand Down Expand Up @@ -656,6 +655,19 @@ public ApplicationBasicInfo getApplicationBasicInfoByName(String name, String te
return basicAppInfo;
}

@Override
public String getApplicationUUIDByName(String name, String tenantDomain)
throws IdentityApplicationManagementException {

if (log.isDebugEnabled()) {
log.debug("Getting application UUID for name: " + name
+ " in tenantDomain: " + tenantDomain);
}

ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
return appDAO.getApplicationUUIDByName(name, tenantDomain);
}

/**
* Get count of all Application Basic Information.
*
Expand Down Expand Up @@ -3023,7 +3035,6 @@ private void doPreUpdateChecks(String storedAppName, ServiceProvider updatedApp,

validateAuthorization(updatedAppName, storedAppName, username, tenantDomain);
validateAppName(storedAppName, updatedApp, tenantDomain);
validateApplicationCertificate(updatedApp, tenantDomain);
boolean isValid = isAssociatedRolesConfigValid(updatedApp, tenantDomain);
if (!isValid) {
throw new IdentityApplicationManagementClientException(
Expand All @@ -3045,17 +3056,6 @@ private void updateApplicationPermissions(ServiceProvider updatedApp, String upd
}
}

private void validateApplicationCertificate(ServiceProvider updatedApp,
String tenantDomain) throws IdentityApplicationManagementException {

if (!isValidPEMCertificate(updatedApp.getCertificateContent())) {
String error = "Provided application certificate for application with name: %s in tenantDomain: %s " +
"is malformed.";
throw buildClientException(INVALID_REQUEST,
String.format(error, updatedApp.getApplicationName(), tenantDomain));
}
}

private void validateApplicationConfigurations(ServiceProvider application,
String tenantDomain,
String username) throws IdentityApplicationManagementException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@ default ApplicationBasicInfo getApplicationBasicInfoByName(String name, String t
throw new NotImplementedException();
}

/**
* Retrieve application UUID using the application name.
*
* @param name Name of the application
* @param tenantDomain Tenant domain of the application
* @return Application UUID
* @throws IdentityApplicationManagementException
*/
default String getApplicationUUIDByName(String name, String tenantDomain)
throws IdentityApplicationManagementException {

throw new NotImplementedException();
}

default String addApplication(ServiceProvider application, String tenantDomain)
throws IdentityApplicationManagementException {

Expand Down
Loading

0 comments on commit 0cfc963

Please sign in to comment.