use of org.opensaml.xmlsec.impl.BasicSignatureValidationConfiguration in project cas by apereo.
the class SamlObjectSignatureValidator method getSignatureValidationConfiguration.
/**
* Gets signature validation configuration.
*
* @return the signature validation configuration
*/
protected SignatureValidationConfiguration getSignatureValidationConfiguration() {
final BasicSignatureValidationConfiguration config = DefaultSecurityConfigurationBootstrap.buildDefaultSignatureValidationConfiguration();
final SamlIdPProperties samlIdp = casProperties.getAuthn().getSamlIdp();
if (this.overrideBlackListedSignatureAlgorithms != null && !samlIdp.getAlgs().getOverrideBlackListedSignatureSigningAlgorithms().isEmpty()) {
config.setBlacklistedAlgorithms(this.overrideBlackListedSignatureAlgorithms);
config.setWhitelistMerge(true);
}
if (this.overrideWhiteListedAlgorithms != null && !this.overrideWhiteListedAlgorithms.isEmpty()) {
config.setWhitelistedAlgorithms(this.overrideWhiteListedAlgorithms);
config.setBlacklistMerge(true);
}
LOGGER.debug("Signature validation blacklisted algorithms: [{}]", config.getBlacklistedAlgorithms());
LOGGER.debug("Signature validation whitelisted algorithms: [{}]", config.getWhitelistedAlgorithms());
return config;
}
Aggregations