Remove overriding the Passive STS URL.
@@ -763,10 +763,6 @@ public class IdentityProviderManager implements IdpManager {
scimProvConn.setProvisioningProperties(propertiesList.toArray(new Property[propertiesList.size()]));
identityProvider.setProvisioningConnectorConfigs(new ProvisioningConnectorConfig[]{scimProvConn});
- // Override few endpoint URLs which are initially persisted in the database and can be out dated with hostname
- // changes.
- overrideResidentIdpEPUrls(identityProvider);
-
return identityProvider;
}
@@ -2519,45 +2515,6 @@ public class IdentityProviderManager implements IdpManager {
}
}
- /**
- * <<<<<<< Updated upstream
- * Overrides the persisted endpoint URLs (e.g. SAML endpoint) if the hostname/port has been changed.
- * =======
- * Updates the persisted endpoint URLs (e.g. SAML endpoint) if the hostname/port has been changed.
- * <p>
- * >>>>>>> Stashed changes
- *
- * @param residentIDP
- * @throws IdentityProviderManagementException
- */
- private void overrideResidentIdpEPUrls(IdentityProvider residentIDP)
- throws IdentityProviderManagementException {
-
- // Not all endpoints are persisted. So we need to update only a few properties.
- String samlSSOUrl = IdentityUtil.getProperty(IdentityConstants.ServerConfig.SSO_IDP_URL) +
- IdPManagementUtil.getTenantParameter();
- if (StringUtils.isBlank(samlSSOUrl)) {
- samlSSOUrl = IdentityUtil.getServerURL(IdentityConstants.ServerConfig.SAMLSSO, true, true);
- }
- samlSSOUrl += IdPManagementUtil.getTenantParameter();
- samlSSOUrl = resolveAbsoluteURL(IdPManagementConstants.SAMLSSO, samlSSOUrl);
-
- updateFederationAuthenticationConfigProperty(residentIDP,
- IdentityApplicationConstants.Authenticator
- .SAML2SSO.NAME, IdentityApplicationConstants.Authenticator.SAML2SSO.SSO_URL, samlSSOUrl);
-
- String samlLogoutUrl = samlSSOUrl;
- updateFederationAuthenticationConfigProperty(residentIDP,
- IdentityApplicationConstants.Authenticator
- .SAML2SSO.NAME, IdentityApplicationConstants.Authenticator.SAML2SSO.LOGOUT_REQ_URL,
- samlLogoutUrl);
-
- String passiveStsUrl = IdentityUtil.getServerURL(IdentityConstants.STS.PASSIVE_STS, true, true);
- updateFederationAuthenticationConfigProperty(residentIDP,
- IdentityApplicationConstants.Authenticator.PassiveSTS.NAME, IdentityApplicationConstants
- .Authenticator.PassiveSTS.IDENTITY_PROVIDER_URL, passiveStsUrl);
- }
-
private String resolveAbsoluteURL(String urlContext, String resolvedUrl) throws IdentityProviderManagementServerException {
if (IdentityTenantUtil.isTenantQualifiedUrlsEnabled()) {
@@ -2572,40 +2529,6 @@ public class IdentityProviderManager implements IdpManager {
}
}
- /**
- * Updates the property values of the given property name of the given authenticator.
- *
- * @param residentIdentityProvider
- * @param authenticatorName
- * @param propertyName
- * @param newValue
- * @return true if the value was updated, false if the value is up to date.
- */
- private boolean updateFederationAuthenticationConfigProperty(IdentityProvider residentIdentityProvider, String
- authenticatorName, String propertyName, String newValue) {
-
- FederatedAuthenticatorConfig federatedAuthenticatorConfig = IdentityApplicationManagementUtil
- .getFederatedAuthenticator(residentIdentityProvider.getFederatedAuthenticatorConfigs(),
- authenticatorName);
-
- if (federatedAuthenticatorConfig != null) {
-
- Property existingProperty = IdentityApplicationManagementUtil.getProperty(federatedAuthenticatorConfig
- .getProperties(), propertyName);
-
- if (existingProperty != null) {
- String existingPropertyValue = existingProperty.getValue();
-
- if (!StringUtils.equalsIgnoreCase(existingPropertyValue, newValue)) {
- existingProperty.setValue(newValue);
- return true;
- }
- }
- }
-
- return false;
- }
-
private String getTenantUrl(String url, String tenantDomain) throws URISyntaxException {
URI uri = new URI(url);
