nl.surfnet.spring.security.opensaml
Class SignatureSecurityPolicyRule

java.lang.Object
  extended by nl.surfnet.spring.security.opensaml.SignatureSecurityPolicyRule
All Implemented Interfaces:
org.opensaml.ws.security.SecurityPolicyRule, org.springframework.beans.factory.InitializingBean

public class SignatureSecurityPolicyRule
extends Object
implements org.springframework.beans.factory.InitializingBean, org.opensaml.ws.security.SecurityPolicyRule

Rule to check that the message has been signed by an issuer that has credentials in the keystore.

We could use a SAMLProtocolMessageXMLSignatureSecurityPolicyRule, but, that relies on role info to be set (which we will not be using). Also, we will insist that the message be signed and not rely on an additional rule to check the isAuthenticated flag on the message context.


Constructor Summary
SignatureSecurityPolicyRule(org.opensaml.security.SAMLSignatureProfileValidator samlSignatureProfileValidator)
           
 
Method Summary
 void afterPropertiesSet()
           
 void evaluate(org.opensaml.ws.message.MessageContext messageContext)
           
 void setCredentialResolver(org.opensaml.xml.security.credential.CredentialResolver credentialResolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignatureSecurityPolicyRule

public SignatureSecurityPolicyRule(org.opensaml.security.SAMLSignatureProfileValidator samlSignatureProfileValidator)
Method Detail

setCredentialResolver

public void setCredentialResolver(org.opensaml.xml.security.credential.CredentialResolver credentialResolver)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

evaluate

public void evaluate(org.opensaml.ws.message.MessageContext messageContext)
              throws org.opensaml.ws.security.SecurityPolicyException
Specified by:
evaluate in interface org.opensaml.ws.security.SecurityPolicyRule
Throws:
org.opensaml.ws.security.SecurityPolicyException


Copyright © 2012 SURFnet bv, The Netherlands. All Rights Reserved.