Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SAML connection ProviderName config name #183

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.LogConstants.ActionIDs.PROCESS_AUTHENTICATION_RESPONSE;
import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.LogConstants.ActionIDs.INITIATE_OUTBOUND_AUTH_REQUEST;
import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.LogConstants.OUTBOUND_AUTH_SAMLSSO_SERVICE;
import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.SAML_AUTHN_REQUEST_PROVIDER_NAME;
import static org.wso2.carbon.identity.base.IdentityConstants.FEDERATED_IDP_SESSION_ID;

public class SAMLSSOAuthenticator extends AbstractApplicationAuthenticator
Expand Down Expand Up @@ -957,6 +958,15 @@ public List<Property> getConfigurationProperties() {
signatureAlgorithmPost.setDisplayOrder(0);
configProperties.add(signatureAlgorithmPost);

Property authnReqProviderName = new Property();
authnReqProviderName.setName(SAML_AUTHN_REQUEST_PROVIDER_NAME);
authnReqProviderName.setDisplayName("Authentication Request Provider Name");
authnReqProviderName.setRequired(false);
authnReqProviderName.setDescription("The human-readable name of the requester");
authnReqProviderName.setType("string");
selectMode.setDisplayOrder(35);
configProperties.add(authnReqProviderName);

return configProperties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
import static org.apache.commons.collections.CollectionUtils.isNotEmpty;
import static org.opensaml.saml.saml2.core.StatusCode.SUCCESS;
import static org.wso2.carbon.CarbonConstants.AUDIT_LOG;
import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.AUTHN_REQUEST_PROVIDER_NAME;
import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.SAML_AUTHN_REQUEST_PROVIDER_NAME;

public class DefaultSAML2SSOManager implements SAML2SSOManager {

Expand Down Expand Up @@ -761,7 +761,7 @@ protected AuthnRequest buildAuthnRequest(HttpServletRequest request, boolean isP
authRequest.setForceAuthn(isForceAuthenticate(context));
authRequest.setIsPassive(isPassive);
authRequest.setIssueInstant(issueInstant);
String providerName = properties.get(AUTHN_REQUEST_PROVIDER_NAME);
String providerName = properties.get(SAML_AUTHN_REQUEST_PROVIDER_NAME);
authRequest.setProviderName(providerName);

String includeProtocolBindingProp = properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SSOConstants {
public static final String SAML_SLO_URL = "/identity/saml/slo";
public static final Pattern SAML_SLO_ENDPOINT_URL_PATTERN = Pattern.compile("(.*)/identity/saml/slo/?");

public static final String AUTHN_REQUEST_PROVIDER_NAME = "AuthnReqProviderName";
AmshikaH marked this conversation as resolved.
Show resolved Hide resolved
public static final String SAML_AUTHN_REQUEST_PROVIDER_NAME = "samlAuthnRequestProviderName";

public class StatusCodes {
private StatusCodes() {
Expand Down
Loading