Search in sources :

Example 1 with ExplicitKeySignatureTrustEngine

use of org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine in project MaxKey by dromara.

the class SignatureSecurityPolicyRule method loadTrustEngine.

public void loadTrustEngine() {
    KeyInfoCredentialResolver keyInfoCredResolver = Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver();
    trustEngine = new ExplicitKeySignatureTrustEngine(credentialResolver, keyInfoCredResolver);
}
Also used : ExplicitKeySignatureTrustEngine(org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine) KeyInfoCredentialResolver(org.opensaml.xml.security.keyinfo.KeyInfoCredentialResolver)

Example 2 with ExplicitKeySignatureTrustEngine

use of org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine in project MaxKey by dromara.

the class SignatureSecurityPolicyRule method afterPropertiesSet.

@Override
public void afterPropertiesSet() throws Exception {
    KeyInfoCredentialResolver keyInfoCredResolver = Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver();
    trustEngine = new ExplicitKeySignatureTrustEngine(credentialResolver, keyInfoCredResolver);
}
Also used : ExplicitKeySignatureTrustEngine(org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine) KeyInfoCredentialResolver(org.opensaml.xml.security.keyinfo.KeyInfoCredentialResolver)

Example 3 with ExplicitKeySignatureTrustEngine

use of org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine in project entcore by opendigitaleducation.

the class SamlValidator method loadSignatureTrustEngine.

private void loadSignatureTrustEngine(String filePath) throws MetadataProviderException {
    logger.info(filePath);
    FilesystemMetadataProvider metadataProvider = new FilesystemMetadataProvider(new File(filePath));
    metadataProvider.setParserPool(new BasicParserPool());
    metadataProvider.initialize();
    MetadataCredentialResolver metadataCredResolver = new MetadataCredentialResolver(metadataProvider);
    KeyInfoCredentialResolver keyInfoCredResolver = Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver();
    EntityDescriptor entityDescriptor = (EntityDescriptor) metadataProvider.getMetadata();
    String entityID = entityDescriptor.getEntityID();
    entityDescriptorMap.put(entityID, entityDescriptor);
    signatureTrustEngineMap.put(entityID, new ExplicitKeySignatureTrustEngine(metadataCredResolver, keyInfoCredResolver));
}
Also used : ExplicitKeySignatureTrustEngine(org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine) BasicParserPool(org.opensaml.xml.parse.BasicParserPool) FilesystemMetadataProvider(org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider) MetadataCredentialResolver(org.opensaml.security.MetadataCredentialResolver) KeyInfoCredentialResolver(org.opensaml.xml.security.keyinfo.KeyInfoCredentialResolver) StaticKeyInfoCredentialResolver(org.opensaml.xml.security.keyinfo.StaticKeyInfoCredentialResolver) XSString(org.opensaml.xml.schema.XSString)

Aggregations

KeyInfoCredentialResolver (org.opensaml.xml.security.keyinfo.KeyInfoCredentialResolver)3 ExplicitKeySignatureTrustEngine (org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine)3 FilesystemMetadataProvider (org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider)1 MetadataCredentialResolver (org.opensaml.security.MetadataCredentialResolver)1 BasicParserPool (org.opensaml.xml.parse.BasicParserPool)1 XSString (org.opensaml.xml.schema.XSString)1 StaticKeyInfoCredentialResolver (org.opensaml.xml.security.keyinfo.StaticKeyInfoCredentialResolver)1