if (DatatypeHelper.isEmpty(messageIssuer)) {
log.warn("Inbound message issuer was empty, unable to evaluate rule");
return;
}
MetadataProvider metadataProvider = samlMsgCtx.getMetadataProvider();
if (metadataProvider == null) {
log.warn("Message context did not contain a metadata provider, unable to evaluate rule");
return;
}
SPSSODescriptor spssoRole;
try {
spssoRole = (SPSSODescriptor) metadataProvider
.getRole(messageIssuer, SPSSODescriptor.DEFAULT_ELEMENT_NAME, SAMLConstants.SAML20P_NS);
} catch (MetadataProviderException e) {
log.warn("Error resolving SPSSODescriptor metadata for entityID '{}': {}", messageIssuer, e.getMessage());
throw new SecurityPolicyException("Error resolving metadata for entity ID", e);
}