Skip to content

Commit 9588c49

Browse files
committed
Merge branch 'juazugas-master'
2 parents b499b4c + 6714bda commit 9588c49

File tree

7 files changed

+210
-15
lines changed

7 files changed

+210
-15
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ java-saml (com.onelogin:java-saml-toolkit) has the following dependencies:
110110
* For CI:
111111
* org.jacoco:jacoco-maven-plugin
112112

113-
also the [Java Cryptography Extension (JCE)](https://en.wikipedia.org/wiki/Java_Cryptography_Extension) is required. If you don't have it, download the version of [jce-6](http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html), [jce-7](http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html) or [jce-8](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html), unzip it, and drop its content at
114-
*${java.home}/jre/lib/security/*
113+
also the [Java Cryptography Extension (JCE)](https://en.wikipedia.org/wiki/Java_Cryptography_Extension) is required. If you don't have it, download the version of [jce-8](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html), unzip it, and drop its content at
114+
*${java.home}/jre/lib/security/*. JDK 9 and later offer the stronger cryptographic algorithms by default.
115115

116116
*toolkit:*
117117
* com.onelogin:java-saml-core
@@ -123,7 +123,7 @@ also the [Java Cryptography Extension (JCE)](https://en.wikipedia.org/wiki/Java_
123123
* org.apache.maven.plugins:maven-enforcer-plugin
124124

125125
For more info, open and read the different pom.xml files:
126-
[core/pom.xml](https://github.com/onelogin/java-saml/blob/v2.2.0/core/pom.xml), [toolkit/pom.xml](https://github.com/onelogin/java-saml/blob/v2.2.0/toolkit/pom.xml)
126+
[core/pom.xml](https://github.com/onelogin/java-saml/blob/v2.5.0/core/pom.xml), [toolkit/pom.xml](https://github.com/onelogin/java-saml/blob/v2.5.0/toolkit/pom.xml)
127127

128128
## Working with the github repository code and Eclipse.
129129
### Get the toolkit.
@@ -329,6 +329,9 @@ onelogin.saml2.security.requested_authncontext = urn:oasis:names:tc:SAML:2.0:ac:
329329
# Allows the authn comparison parameter to be set, defaults to 'exact'
330330
onelogin.saml2.security.requested_authncontextcomparison = exact
331331

332+
# Allows duplicated names in the attribute statement
333+
onelogin.saml2.security.allow_duplicated_attribute_name = false
334+
332335
# Indicates if the SP will validate all received xmls.
333336
# (In order to validate the xml, 'strict' and 'wantXMLValidation' must be true).
334337
onelogin.saml2.security.want_xml_validation = true

core/src/main/java/com/onelogin/saml2/authn/SamlResponse.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
import java.util.List;
99
import java.util.Map;
1010
import java.util.Objects;
11-
1211
import javax.xml.parsers.ParserConfigurationException;
1312
import javax.xml.xpath.XPathExpressionException;
14-
1513
import org.joda.time.DateTime;
1614
import org.joda.time.Instant;
1715
import org.slf4j.Logger;
@@ -22,7 +20,8 @@
2220
import org.w3c.dom.Node;
2321
import org.w3c.dom.NodeList;
2422
import org.xml.sax.SAXException;
25-
23+
import com.onelogin.saml2.exception.SettingsException;
24+
import com.onelogin.saml2.exception.ValidationError;
2625
import com.onelogin.saml2.http.HttpRequest;
2726
import com.onelogin.saml2.model.SamlResponseStatus;
2827
import com.onelogin.saml2.model.SubjectConfirmationIssue;
@@ -31,9 +30,6 @@
3130
import com.onelogin.saml2.util.SchemaFactory;
3231
import com.onelogin.saml2.util.Util;
3332

34-
import com.onelogin.saml2.exception.SettingsException;
35-
import com.onelogin.saml2.exception.ValidationError;
36-
3733
/**
3834
* SamlResponse class of OneLogin's Java Toolkit.
3935
*
@@ -553,18 +549,24 @@ public HashMap<String, List<String>> getAttributes() throws XPathExpressionExcep
553549
for (int i = 0; i < nodes.getLength(); i++) {
554550
NamedNodeMap attrName = nodes.item(i).getAttributes();
555551
String attName = attrName.getNamedItem("Name").getNodeValue();
556-
if (attributes.containsKey(attName)) {
552+
if (attributes.containsKey(attName) && !settings.isAllowRepeatAttributeName()) {
557553
throw new ValidationError("Found an Attribute element with duplicated Name", ValidationError.DUPLICATED_ATTRIBUTE_NAME_FOUND);
558554
}
559555

560556
NodeList childrens = nodes.item(i).getChildNodes();
561557

562-
List<String> attrValues = new ArrayList<String>();
558+
List<String> attrValues = null;
559+
if (attributes.containsKey(attName) && settings.isAllowRepeatAttributeName()) {
560+
attrValues = attributes.get(attName);
561+
} else {
562+
attrValues = new ArrayList<String>();
563+
}
563564
for (int j = 0; j < childrens.getLength(); j++) {
564565
if ("AttributeValue".equals(childrens.item(j).getLocalName())) {
565566
attrValues.add(childrens.item(j).getTextContent());
566567
}
567568
}
569+
568570
attributes.put(attName, attrValues);
569571
}
570572
LOGGER.debug("SAMLResponse has attributes: " + attributes.toString());

core/src/main/java/com/onelogin/saml2/settings/Saml2Settings.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public class Saml2Settings {
7272
private String signatureAlgorithm = Constants.RSA_SHA1;
7373
private String digestAlgorithm = Constants.SHA1;
7474
private boolean rejectUnsolicitedResponsesWithInResponseTo = false;
75+
private boolean allowRepeatAttributeName = false;
7576
private String uniqueIDPrefix = null;
7677

7778
// Compress
@@ -133,6 +134,13 @@ public final String getSpNameIDFormat() {
133134
return spNameIDFormat;
134135
}
135136

137+
/**
138+
* @return the allowRepeatAttributeName setting value
139+
*/
140+
public boolean isAllowRepeatAttributeName () {
141+
return allowRepeatAttributeName;
142+
}
143+
136144
/**
137145
* @return the spX509cert setting value
138146
*/
@@ -441,6 +449,16 @@ protected final void setSpNameIDFormat(String spNameIDFormat) {
441449
this.spNameIDFormat = spNameIDFormat;
442450
}
443451

452+
/**
453+
* Set the allowRepeatAttributeName setting value
454+
*
455+
* @param allowRepeatAttributeName
456+
* the allowRepeatAttributeName value to be set
457+
*/
458+
public void setAllowRepeatAttributeName (boolean allowRepeatAttributeName) {
459+
this.allowRepeatAttributeName = allowRepeatAttributeName;
460+
}
461+
444462
/**
445463
* Set the spX509cert setting value provided as X509Certificate object
446464
*

core/src/main/java/com/onelogin/saml2/settings/SettingsBuilder.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@
2020
import java.util.List;
2121
import java.util.Map;
2222
import java.util.Properties;
23-
2423
import org.apache.commons.lang3.StringUtils;
2524
import org.slf4j.Logger;
2625
import org.slf4j.LoggerFactory;
27-
2826
import com.onelogin.saml2.exception.Error;
2927
import com.onelogin.saml2.model.Contact;
3028
import com.onelogin.saml2.model.KeyStoreSettings;
@@ -101,6 +99,7 @@ public class SettingsBuilder {
10199
public final static String SECURITY_WANT_XML_VALIDATION = "onelogin.saml2.security.want_xml_validation";
102100
public final static String SECURITY_SIGNATURE_ALGORITHM = "onelogin.saml2.security.signature_algorithm";
103101
public final static String SECURITY_REJECT_UNSOLICITED_RESPONSES_WITH_INRESPONSETO = "onelogin.saml2.security.reject_unsolicited_responses_with_inresponseto";
102+
public final static String SECURITY_ALLOW_REPEAT_ATTRIBUTE_NAME_PROPERTY_KEY = "onelogin.saml2.security.allow_duplicated_attribute_name";
104103

105104
// Compress
106105
public final static String COMPRESS_REQUEST = "onelogin.saml2.compress.request";
@@ -370,6 +369,10 @@ private void loadSecuritySetting() {
370369
if (rejectUnsolicitedResponsesWithInResponseTo != null) {
371370
saml2Setting.setRejectUnsolicitedResponsesWithInResponseTo(rejectUnsolicitedResponsesWithInResponseTo);
372371
}
372+
373+
Boolean allowRepeatAttributeName = loadBooleanProperty(SECURITY_ALLOW_REPEAT_ATTRIBUTE_NAME_PROPERTY_KEY);
374+
if (allowRepeatAttributeName != null)
375+
saml2Setting.setAllowRepeatAttributeName(allowRepeatAttributeName);
373376
}
374377

375378
/**

core/src/test/java/com/onelogin/saml2/test/authn/AuthnResponseTest.java

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import static org.hamcrest.Matchers.is;
4848
import static org.junit.Assert.assertEquals;
4949
import static org.junit.Assert.assertFalse;
50+
import static org.junit.Assert.assertNotNull;
5051
import static org.junit.Assert.assertNull;
5152
import static org.junit.Assert.assertThat;
5253
import static org.junit.Assert.assertTrue;
@@ -1000,11 +1001,38 @@ public void testGetAttributesDuplicatedNames() throws IOException, Error, XPathE
10001001
samlResponse.getAttributes();
10011002
}
10021003

1004+
/**
1005+
* Tests the getAttributes method of SamlResponse
1006+
* Case: Allow Duplicated names
1007+
*
1008+
* @throws Error
1009+
* @throws IOException
1010+
* @throws ValidationError
1011+
* @throws SettingsException
1012+
* @throws SAXException
1013+
* @throws ParserConfigurationException
1014+
* @throws XPathExpressionException
1015+
*
1016+
* @see com.onelogin.saml2.authn.SamlResponse#getAttributes
1017+
*/
1018+
@Test
1019+
public void testGetAttributesAllowDuplicatedNames () throws IOException, Error, XPathExpressionException, ParserConfigurationException,
1020+
SAXException, SettingsException, ValidationError {
1021+
Saml2Settings settings = new SettingsBuilder().fromFile("config/config.allowduplicatednames.properties").build();
1022+
String samlResponseEncoded = Util.getFileAsString("data/responses/invalids/duplicated_attributes.xml.base64");
1023+
SamlResponse samlResponse = new SamlResponse(settings, newHttpRequest(samlResponseEncoded));
1024+
1025+
Map<String, List<String>> attributes = samlResponse.getAttributes();
1026+
assertNotNull(attributes);
1027+
assertTrue(attributes.containsKey("uid"));
1028+
assertEquals(2, attributes.get("uid").size());
1029+
}
1030+
10031031
/**
10041032
* Tests that queryAssertion method of SamlResponse
1005-
* Case: Elements retrieved are covered by a Signature
1033+
* Case: Elements retrieved are covered by a Signature
10061034
*
1007-
* @throws Exception
1035+
* @throws Exception
10081036
*
10091037
* @see com.onelogin.saml2.authn.SamlResponse#queryAssertion
10101038
*/
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# If 'strict' is True, then the Java Toolkit will reject unsigned
2+
# or unencrypted messages if it expects them signed or encrypted
3+
# Also will reject the messages if not strictly follow the SAML
4+
onelogin.saml2.strict = true
5+
6+
# Enable debug mode (to print errors)
7+
onelogin.saml2.debug = true
8+
9+
# Service Provider Data that we are deploying
10+
# Identifier of the SP entity (must be a URI)
11+
onelogin.saml2.sp.entityid = http://localhost:8080/java-saml-jspsample/metadata.jsp
12+
# Specifies info about where and how the <AuthnResponse> message MUST be
13+
# returned to the requester, in this case our SP.
14+
# URL Location where the <Response> from the IdP will be returned
15+
onelogin.saml2.sp.assertion_consumer_service.url = http://localhost:8080/java-saml-jspsample/acs.jsp
16+
# SAML protocol binding to be used when returning the <Response> or sending the <LogoutRequest>
17+
# message. Onelogin Toolkit supports for this endpoint the
18+
# HTTP-POST binding only
19+
onelogin.saml2.sp.assertion_consumer_service.binding = urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
20+
21+
# Specifies info about Logout service
22+
# URL Location where the <LogoutResponse> from the IdP will be returned or where to send the <LogoutRequest>
23+
onelogin.saml2.sp.single_logout_service.url = http://localhost:8080/java-saml-jspsample/sls.jsp
24+
25+
# SAML protocol binding for the Single Logout Service of the SP.
26+
# Onelogin Toolkit supports for this endpoint the HTTP-Redirect binding only
27+
onelogin.saml2.sp.single_logout_service.binding = urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
28+
29+
# Specifies constraints on the name identifier to be used to
30+
# represent the requested subject.
31+
# Take a look on lib/Saml2/Constants.php to see the NameIdFormat supported
32+
onelogin.saml2.sp.nameidformat = urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
33+
34+
35+
# Usually x509cert and privateKey of the SP are provided by files placed at
36+
# the certs folder. But we can also provide them with the following parameters
37+
onelogin.saml2.sp.x509cert = -----BEGIN CERTIFICATE-----MIICgTCCAeoCCQCbOlrWDdX7FTANBgkqhkiG9w0BAQUFADCBhDELMAkGA1UEBhMCTk8xGDAWBgNVBAgTD0FuZHJlYXMgU29sYmVyZzEMMAoGA1UEBxMDRm9vMRAwDgYDVQQKEwdVTklORVRUMRgwFgYDVQQDEw9mZWlkZS5lcmxhbmcubm8xITAfBgkqhkiG9w0BCQEWEmFuZHJlYXNAdW5pbmV0dC5ubzAeFw0wNzA2MTUxMjAxMzVaFw0wNzA4MTQxMjAxMzVaMIGEMQswCQYDVQQGEwJOTzEYMBYGA1UECBMPQW5kcmVhcyBTb2xiZXJnMQwwCgYDVQQHEwNGb28xEDAOBgNVBAoTB1VOSU5FVFQxGDAWBgNVBAMTD2ZlaWRlLmVybGFuZy5ubzEhMB8GCSqGSIb3DQEJARYSYW5kcmVhc0B1bmluZXR0Lm5vMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDivbhR7P516x/S3BqKxupQe0LONoliupiBOesCO3SHbDrl3+q9IbfnfmE04rNuMcPsIxB161TdDpIesLCn7c8aPHISKOtPlAeTZSnb8QAu7aRjZq3+PbrP5uW3TcfCGPtKTytHOge/OlJbo078dVhXQ14d1EDwXJW1rRXuUt4C8QIDAQABMA0GCSqGSIb3DQEBBQUAA4GBACDVfp86HObqY+e8BUoWQ9+VMQx1ASDohBjwOsg2WykUqRXF+dLfcUH9dWR63CtZIKFDbStNomPnQz7nbK+onygwBspVEbnHuUihZq3ZUdmumQqCw4Uvs/1Uvq3orOo/WJVhTyvLgFVK2QarQ4/67OZfHd7R+POBXhophSMv1ZOo-----END CERTIFICATE-----
38+
39+
40+
# Requires Format PKCS#8 BEGIN PRIVATE KEY
41+
# If you have PKCS#1 BEGIN RSA PRIVATE KEY convert it by openssl pkcs8 -topk8 -inform pem -nocrypt -in sp.rsa_key -outform pem -out sp.pem
42+
onelogin.saml2.sp.privatekey = -----BEGIN PRIVATE KEY-----MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAOK9uFHs/nXrH9LcGorG6lB7Qs42iWK6mIE56wI7dIdsOuXf6r0ht+d+YTTis24xw+wjEHXrVN0Okh6wsKftzxo8chIo60+UB5NlKdvxAC7tpGNmrf49us/m5bdNx8IY+0pPK0c6B786UlujTvx1WFdDXh3UQPBclbWtFe5S3gLxAgMBAAECgYAPj9ngtZVZXoPWowinUbOvRmZ1ZMTVI91nsSPyCUacLM92C4I+7NuEZeYiDRUnkP7TbCyrCzXN3jwlIxdczzORhlXBBgg9Sw2fkV61CnDEMgw+aEeD5A0GDA6eTwkrawiOMs8vupjsi2/stPsa+bmpI6RnfdEKBdyDP6iQQhAxiQJBAPNtM7IMvRzlZBXoDaTTpP9rN2FR0ZcX0LT5aRZJ81qi+ZOBFeHUb6MyWvzZKfPinj9JO3s/9e3JbMXemRWBmvcCQQDuc+NfAeW200QyjoC3Ed3jueLMrY1Q3zTcSUhRPw/0pIKgRGZJerro8N6QY2JziV2mxK855gKTwwBigMHL2S9XAkEAwuBfjGDqXOG/uFHn6laNNvWshjqsIdus99Tbrj5RlfP2/YFP9VTOcsXzVYy9K0P3EA8ekVLpHQ4uCFJmF3OEjQJBAMvwO69/HOufhv1CWZ25XzAsRGhPqsRXEouw9XPfXpMavEm8FkuT9xXRJFkTVxl/i6RdJYx8Rwn/Rm34t0bUKqMCQQCrAtKCUn0PLcemAzPi8ADJlbMDG/IDXNbSej0Y4tw9Cdho1Q38XLZJi0RNdNvQJD1fWu3x9+QU/vJr7lMLzdoy-----END PRIVATE KEY-----
43+
44+
# Identity Provider Data that we want connect with our SP
45+
# Identifier of the IdP entity (must be a URI)
46+
onelogin.saml2.idp.entityid = https://pitbulk.no-ip.org/simplesaml/saml2/idp/metadata.php
47+
48+
# SSO endpoint info of the IdP. (Authentication Request protocol)
49+
# URL Target of the IdP where the SP will send the Authentication Request Message
50+
onelogin.saml2.idp.single_sign_on_service.url = https://pitbulk.no-ip.org/simplesaml/saml2/idp/SSOService.php
51+
52+
# SAML protocol binding to be used when returning the <Response>
53+
# message. Onelogin Toolkit supports for this endpoint the
54+
# HTTP-Redirect binding only
55+
onelogin.saml2.idp.single_sign_on_service.binding = urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
56+
57+
# SLO endpoint info of the IdP.
58+
# URL Location of the IdP where the SP will send the SLO Request
59+
onelogin.saml2.idp.single_logout_service.url = https://pitbulk.no-ip.org/simplesaml/saml2/idp/SingleLogoutService.php
60+
61+
# SAML protocol binding to be used when returning the <Response>
62+
# message. Onelogin Toolkit supports for this endpoint the
63+
# HTTP-Redirect binding only
64+
onelogin.saml2.idp.single_logout_service.binding = urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
65+
66+
# Public x509 certificate of the IdP
67+
onelogin.saml2.idp.x509cert = -----BEGIN CERTIFICATE-----MIICgTCCAeoCCQCbOlrWDdX7FTANBgkqhkiG9w0BAQUFADCBhDELMAkGA1UEBhMCTk8xGDAWBgNVBAgTD0FuZHJlYXMgU29sYmVyZzEMMAoGA1UEBxMDRm9vMRAwDgYDVQQKEwdVTklORVRUMRgwFgYDVQQDEw9mZWlkZS5lcmxhbmcubm8xITAfBgkqhkiG9w0BCQEWEmFuZHJlYXNAdW5pbmV0dC5ubzAeFw0wNzA2MTUxMjAxMzVaFw0wNzA4MTQxMjAxMzVaMIGEMQswCQYDVQQGEwJOTzEYMBYGA1UECBMPQW5kcmVhcyBTb2xiZXJnMQwwCgYDVQQHEwNGb28xEDAOBgNVBAoTB1VOSU5FVFQxGDAWBgNVBAMTD2ZlaWRlLmVybGFuZy5ubzEhMB8GCSqGSIb3DQEJARYSYW5kcmVhc0B1bmluZXR0Lm5vMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDivbhR7P516x/S3BqKxupQe0LONoliupiBOesCO3SHbDrl3+q9IbfnfmE04rNuMcPsIxB161TdDpIesLCn7c8aPHISKOtPlAeTZSnb8QAu7aRjZq3+PbrP5uW3TcfCGPtKTytHOge/OlJbo078dVhXQ14d1EDwXJW1rRXuUt4C8QIDAQABMA0GCSqGSIb3DQEBBQUAA4GBACDVfp86HObqY+e8BUoWQ9+VMQx1ASDohBjwOsg2WykUqRXF+dLfcUH9dWR63CtZIKFDbStNomPnQz7nbK+onygwBspVEbnHuUihZq3ZUdmumQqCw4Uvs/1Uvq3orOo/WJVhTyvLgFVK2QarQ4/67OZfHd7R+POBXhophSMv1ZOo-----END CERTIFICATE-----
68+
69+
# Security settings
70+
#
71+
72+
# Indicates that the nameID of the <samlp:logoutRequest> sent by this SP
73+
# will be encrypted.
74+
onelogin.saml2.security.nameid_encrypted = true
75+
76+
# Indicates whether the <samlp:AuthnRequest> messages sent by this SP
77+
# will be signed. [The Metadata of the SP will offer this info]
78+
onelogin.saml2.security.authnrequest_signed = true
79+
80+
# Indicates whether the <samlp:logoutRequest> messages sent by this SP
81+
# will be signed.
82+
onelogin.saml2.security.logoutrequest_signed = true
83+
84+
# Indicates whether the <samlp:logoutResponse> messages sent by this SP
85+
# will be signed.
86+
onelogin.saml2.security.logoutresponse_signed = true
87+
88+
# Indicates a requirement for the <samlp:Response>, <samlp:LogoutRequest> and
89+
# <samlp:LogoutResponse> elements received by this SP to be signed.
90+
onelogin.saml2.security.want_messages_signed = true
91+
92+
# Indicates a requirement for the <saml:Assertion> of the <samlp:Response> to be signed
93+
onelogin.saml2.security.want_assertions_signed = true
94+
95+
# Indicates a requirement for the Metadata of this SP to be signed.
96+
# Right now supported null/false (in order to not sign) or true (sign using SP private key)
97+
onelogin.saml2.security.sign_metadata = true
98+
99+
# Indicates a requirement for the Assertions received by this SP to be encrypted
100+
onelogin.saml2.security.want_assertions_encrypted = false
101+
102+
# Indicates a requirement for the NameID received by this SP to be encrypted
103+
onelogin.saml2.security.want_nameid = true
104+
105+
# Indicates a requirement for the NameID received by this SP to be encrypted
106+
onelogin.saml2.security.want_nameid_encrypted = false
107+
108+
# Authentication context.
109+
# Set Empty and no AuthContext will be sent in the AuthNRequest,
110+
# Set comma separated values urn:oasis:names:tc:SAML:2.0:ac:classes:urn:oasis:names:tc:SAML:2.0:ac:classes:Password
111+
onelogin.saml2.security.requested_authncontext = urn:oasis:names:tc:SAML:2.0:ac:classes:urn:oasis:names:tc:SAML:2.0:ac:classes:Password
112+
113+
# Allows the authn comparison parameter to be set, defaults to 'exact'
114+
onelogin.saml2.security.requested_authncontextcomparison = exact
115+
116+
# Enable duplicated names in the attribute statement
117+
onelogin.saml2.security.allow_duplicated_attribute_name = true
118+
119+
# Indicates if the SP will validate all received xmls.
120+
# (In order to validate the xml, 'strict' and 'wantXMLValidation' must be true).
121+
onelogin.saml2.security.want_xml_validation = true
122+
123+
# Algorithm that the toolkit will use on signing process. Options:
124+
# 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
125+
# 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
126+
# 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384'
127+
# 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512'
128+
onelogin.saml2.security.signature_algorithm = http://www.w3.org/2001/04/xmldsig-more#rsa-sha512
129+
130+
# Organization
131+
onelogin.saml2.organization.name = SP Java
132+
onelogin.saml2.organization.displayname = SP Java Example
133+
onelogin.saml2.organization.url = http://sp.example.com
134+
135+
# Contacts
136+
onelogin.saml2.contacts.technical.given_name = Technical Guy
137+
onelogin.saml2.contacts.technical.email_address = technical@example.com
138+
onelogin.saml2.contacts.support.given_name = Support Guy
139+
onelogin.saml2.contacts.support.email_address = support@example.com

samples/java-saml-tookit-jspsample/src/main/resources/onelogin.saml.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ onelogin.saml2.security.requested_authncontext = urn:oasis:names:tc:SAML:2.0:ac:
132132
# Allows the authn comparison parameter to be set, defaults to 'exact'
133133
onelogin.saml2.security.onelogin.saml2.security.requested_authncontextcomparison = exact
134134

135+
# Allows duplicated names in the attribute statement
136+
onelogin.saml2.security.allow_duplicated_attribute_name = false
135137

136138
# Indicates if the SP will validate all received xmls.
137139
# (In order to validate the xml, 'strict' and 'wantXMLValidation' must be true).

0 commit comments

Comments
 (0)