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

Add attribute name format property into SAML configurations #6267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -144,6 +144,7 @@ public class IdentityRegistryResources {
public static final String PROP_SAML_SSO_REQUESTED_AUDIENCES = "RequestedAudiences";
public static final String PROP_SAML_SSO_REQUESTED_RECIPIENTS = "RequestedRecipients";
public static final String PROP_SAML_SSO_ENABLE_ATTRIBUTES_BY_DEFAULT = "EnableAttributesByDefault";
public static final String PROP_SAML_SSO_ATTRIBUTE_NAME_FORMAT = "AttributeNameFormat";
public static final String PROP_SAML_SSO_ENABLE_NAMEID_CLAIMURI = "EnableNameIDClaimUri";
public static final String PROP_SAML_SSO_NAMEID_CLAIMURI = "NameIDClaimUri";
public static final String PROP_SAML_SSO_NAMEID_FORMAT = "NameIDFormat";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ SAMLSSOServiceProviderDO buildSAMLSSOServiceProviderDAO (Resource resource) {
.getProperty(IdentityRegistryResources.PROP_SAML_SSO_ENABLE_ATTRIBUTES_BY_DEFAULT);
serviceProviderDO.setEnableAttributesByDefault(Boolean.valueOf(enableAttrByDefault));
}
if (resource
.getProperty(IdentityRegistryResources.PROP_SAML_SSO_ATTRIBUTE_NAME_FORMAT) != null) {
serviceProviderDO.setAttributeNameFormat(
resource.getProperty(IdentityRegistryResources.PROP_SAML_SSO_ATTRIBUTE_NAME_FORMAT));
}
if (resource.getProperty(IdentityRegistryResources.PROP_SAML_SSO_IDP_INIT_SSO_ENABLED) != null) {
serviceProviderDO.setIdPInitSSOEnabled(Boolean.valueOf(resource.getProperty(
IdentityRegistryResources.PROP_SAML_SSO_IDP_INIT_SSO_ENABLED).trim()));
Expand Down Expand Up @@ -418,6 +423,8 @@ private Resource createResource(SAMLSSOServiceProviderDO serviceProviderDO, Regi
String enableAttributesByDefault = String.valueOf(serviceProviderDO.isEnableAttributesByDefault());
resource.addProperty(IdentityRegistryResources.PROP_SAML_SSO_ENABLE_ATTRIBUTES_BY_DEFAULT,
enableAttributesByDefault);
resource.addProperty(IdentityRegistryResources.PROP_SAML_SSO_ATTRIBUTE_NAME_FORMAT,
serviceProviderDO.getAttributeNameFormat());
String idPInitSSOEnabled = String.valueOf(serviceProviderDO.isIdPInitSSOEnabled());
resource.addProperty(IdentityRegistryResources.PROP_SAML_SSO_IDP_INIT_SSO_ENABLED,
idPInitSSOEnabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class SAMLSSOServiceProviderDO implements Serializable {
private String[] requestedRecipients;
private List<String> requestedRecipientsList;
private boolean enableAttributesByDefault;
private String attributeNameFormat;
private String nameIdClaimUri;
private String nameIDFormat;
private boolean isIdPInitSSOEnabled;
Expand Down Expand Up @@ -168,6 +169,14 @@ public void setEnableAttributesByDefault(boolean enableAttributesByDefault) {
this.enableAttributesByDefault = enableAttributesByDefault;
}

public String getAttributeNameFormat() {
return attributeNameFormat;
}

public void setAttributeNameFormat(String attributeNameFormat) {
this.attributeNameFormat = attributeNameFormat;
}

public String getIssuer() {
return issuer;
}
Expand Down
Loading