Changes in Release 2.1.4
=============================================
[SIDP-340] - Default tc-config.xml causes TCNonPortableObjectError
+[SIDP-342] - NameIdentifier encoder mix-up when the SP doesn't support the first NameIdentifier format
[SIDP-348] - Remove Terracotta Configuration from IdP Install
[SIDP-249] - LoginContext is not removed from StorageService after Authentication Completes
[SIDP-351] - Attribute resolution errors shouldn't prevent valid authn statement being returned
BaseAttribute<?> nameIdAttribute = null;
SAML1NameIdentifierEncoder nameIdEncoder = null;
- for (BaseAttribute<?> attribute : principalAttributes.values()) {
+ ATTRIBUTESELECT: for (BaseAttribute<?> attribute : principalAttributes.values()) {
if (attribute == null) {
continue;
}
nameIdEncoder = (SAML1NameIdentifierEncoder) encoder;
if (supportedNameFormats.isEmpty() || supportedNameFormats.contains(nameIdEncoder.getNameFormat())) {
nameIdAttribute = attribute;
- break;
+ break ATTRIBUTESELECT;
}
}
}
}
if (nameIdAttribute == null || nameIdEncoder == null) {
- log
- .debug(
- "No attributes for principal '{}' supports encoding into a supported NameIdentifier format for relying party '{}'",
+ log.debug("No attributes for principal '{}' supports encoding into a supported NameIdentifier format for relying party '{}'",
requestContext.getPrincipalName(), requestContext.getInboundMessageIssuer());
return null;
}
try {
- log
- .debug(
- "Using attribute '{}' supporting name format '{}' to create the NameIdentifier for relying party '{}'",
- new Object[] { nameIdAttribute.getId(), nameIdEncoder.getNameFormat(),
- requestContext.getInboundMessageIssuer() });
+ log.debug("Using attribute '{}' supporting name format '{}' to create the NameIdentifier for relying party '{}'",
+ new Object[] { nameIdAttribute.getId(), nameIdEncoder.getNameFormat(), requestContext.getInboundMessageIssuer(), });
return nameIdEncoder.encode(nameIdAttribute);
} catch (AttributeEncodingException e) {
requestContext.setFailureStatus(buildStatus(StatusCode.RESPONDER, null, "Unable to encode NameIdentifier"));
Map<String, BaseAttribute> principalAttributes = requestContext.getAttributes();
if (principalAttributes != null) {
- for (BaseAttribute<?> attribute : principalAttributes.values()) {
+ ATTRIBUTESELECT: for (BaseAttribute<?> attribute : principalAttributes.values()) {
if (attribute == null) {
continue;
}
if (nameIdEncoder.getNameFormat().equals(requiredNameFormat)) {
nameIdAttribute = attribute;
nameIdEncoder = (SAML2NameIDEncoder) encoder;
- break;
+ break ATTRIBUTESELECT;
}
} else {
if (supportedNameFormats.isEmpty()
|| supportedNameFormats.contains(nameIdEncoder.getNameFormat())) {
nameIdAttribute = attribute;
nameIdEncoder = (SAML2NameIDEncoder) encoder;
- break;
+ break ATTRIBUTESELECT;
}
}
}