com.sun.xml.wss.impl.policy.mls
Class AuthenticationTokenPolicy.SAMLAssertionBinding

java.lang.Object
  extended by com.sun.xml.wss.impl.policy.MLSPolicy
      extended by com.sun.xml.wss.impl.policy.mls.WSSPolicy
          extended by com.sun.xml.wss.impl.policy.mls.AuthenticationTokenPolicy.SAMLAssertionBinding
All Implemented Interfaces:
SecurityPolicy, java.lang.Cloneable
Enclosing class:
AuthenticationTokenPolicy

public static class AuthenticationTokenPolicy.SAMLAssertionBinding
extends WSSPolicy

A policy representing a SAML Assertion. An instance of this class can be used as concrete feature binding for an AuthenticationTokenPolicy.


Field Summary
static java.lang.String HOK_ASSERTION
          Holder-Of-Key Subject ConfirmationMethod
static java.lang.String SV_ASSERTION
          Sender-Vouches Subject ConfirmationMethod
 
Constructor Summary
AuthenticationTokenPolicy.SAMLAssertionBinding()
          Default constructor
AuthenticationTokenPolicy.SAMLAssertionBinding(java.lang.String type, java.lang.String keyIdentifier, java.lang.String authorityIdentifier, java.lang.String referenceType)
          Constructor
 
Method Summary
 java.lang.Object clone()
          clone operatror
 boolean equals(WSSPolicy policy)
          equals operator
 boolean equalsIgnoreTargets(WSSPolicy binding)
           
 org.w3c.dom.Element getAssertion()
           
 java.lang.String getAssertionId()
          A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion
 java.lang.String getAssertionType()
           
 org.w3c.dom.Element getAuthorityBinding()
           
 java.lang.String getAuthorityIdentifier()
           
 java.lang.String getKeyAlgorithm()
           
 java.lang.String getKeyIdentifier()
           
 java.lang.String getReferenceType()
           
 java.lang.String getSTRID()
           
 java.lang.String getType()
          Get the type of the policy.
 MLSPolicy newPrivateKeyBinding()
          Create and set the KeyBinding for this WSSPolicy to a PrivateKeyBinding
 void setAssertion(org.w3c.dom.Element assertion)
          set the SAML Assertion
 void setAssertionId(java.lang.String id)
          set the AssertionId for the possibly remote assertion A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion
 void setAssertionType(java.lang.String type)
          set the SubjectConfirmation type of the SAML assertion
 void setAuthorityBinding(org.w3c.dom.Element authorityBinding)
          set the SAML AuthorityBinding element, identifying a remote assertion
 void setAuthorityIdentifier(java.lang.String uri)
          set the abstract identifier for the issuing authority
 void setKeyAlgorithm(java.lang.String algorithm)
          set the keyAlgorithm to be used
 void setKeyIdentifier(java.lang.String ki)
          set the abstract identifier for the Confirmation Key
 void setReferenceType(java.lang.String rtype)
          set the ReferenceType to be used for references to the SAML Assertion
 void setSTRID(java.lang.String id)
           
 java.lang.String toString()
           
 
Methods inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
getFeatureBinding, getKeyBinding, getPolicyIdentifier, getUUID, isBSP, isBSP, isOptional, isOptional, setFeatureBinding, setKeyBinding, setPolicyIdentifier, setUUID
 
Methods inherited from class com.sun.xml.wss.impl.policy.MLSPolicy
isReadOnly, isReadOnly
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SV_ASSERTION

public static final java.lang.String SV_ASSERTION
Sender-Vouches Subject ConfirmationMethod

See Also:
Constant Field Values

HOK_ASSERTION

public static final java.lang.String HOK_ASSERTION
Holder-Of-Key Subject ConfirmationMethod

See Also:
Constant Field Values
Constructor Detail

AuthenticationTokenPolicy.SAMLAssertionBinding

public AuthenticationTokenPolicy.SAMLAssertionBinding()
Default constructor


AuthenticationTokenPolicy.SAMLAssertionBinding

public AuthenticationTokenPolicy.SAMLAssertionBinding(java.lang.String type,
                                                      java.lang.String keyIdentifier,
                                                      java.lang.String authorityIdentifier,
                                                      java.lang.String referenceType)
Constructor

Parameters:
type - the SubjectConfirmation type of the SAML assertion, one of SV, HOK
keyIdentifier - an abstract identifier for the Confirmation Key
authorityIdentifier - an abstract identifier for the issuing authority
referenceType - the reference type for references to the SAML Assertion, should be one of KeyIdentifier, Embedded reference type as defined by WSS SAML Token profile 1.0.
Method Detail

setAssertionType

public void setAssertionType(java.lang.String type)
set the SubjectConfirmation type of the SAML assertion

Parameters:
type - the SubjectConfirmation type of the SAML assertion, one of SV, HOK

newPrivateKeyBinding

public MLSPolicy newPrivateKeyBinding()
Create and set the KeyBinding for this WSSPolicy to a PrivateKeyBinding

Returns:
a new PrivateKeyBinding as a KeyBinding for this WSSPolicy

setKeyIdentifier

public void setKeyIdentifier(java.lang.String ki)
set the abstract identifier for the Confirmation Key

Parameters:
ki - the abstract identifier for the Confirmation Key

setAuthorityIdentifier

public void setAuthorityIdentifier(java.lang.String uri)
set the abstract identifier for the issuing authority

Parameters:
uri - the URI of the Assertion Issuer

setReferenceType

public void setReferenceType(java.lang.String rtype)
set the ReferenceType to be used for references to the SAML Assertion

Parameters:
rtype - reference type (one of KeyIdentifier, Embedded)

setAuthorityBinding

public void setAuthorityBinding(org.w3c.dom.Element authorityBinding)
set the SAML AuthorityBinding element, identifying a remote assertion

Parameters:
authorityBinding -

setAssertion

public void setAssertion(org.w3c.dom.Element assertion)
set the SAML Assertion

Parameters:
assertion - the SAML Assertion

setKeyAlgorithm

public void setKeyAlgorithm(java.lang.String algorithm)
set the keyAlgorithm to be used

Parameters:
algorithm - the keyAlgorithm to be used

getKeyAlgorithm

public java.lang.String getKeyAlgorithm()
Returns:
key algorithm

getReferenceType

public java.lang.String getReferenceType()
Returns:
reference type

getAssertionType

public java.lang.String getAssertionType()
Returns:
type of SAMLAssertion (SV/HOK)

getKeyIdentifier

public java.lang.String getKeyIdentifier()
Returns:
identifier to key bound to the Assertion

getAuthorityIdentifier

public java.lang.String getAuthorityIdentifier()
Returns:
identifier to Authority issueing the Assertion

getAuthorityBinding

public org.w3c.dom.Element getAuthorityBinding()
Returns:
authority binding component of the assertion

getAssertion

public org.w3c.dom.Element getAssertion()
Returns:
SAML assertion

equals

public boolean equals(WSSPolicy policy)
equals operator

Specified by:
equals in class WSSPolicy
Parameters:
policy - the policy to be compared for equality
Returns:
true if the argument policy is equal to this
See Also:
SignaturePolicy, EncryptionPolicy, AuthenticationTokenPolicy, PrivateKeyBinding, SymmetricKeyBinding

equalsIgnoreTargets

public boolean equalsIgnoreTargets(WSSPolicy binding)
Specified by:
equalsIgnoreTargets in class WSSPolicy

clone

public java.lang.Object clone()
Description copied from class: WSSPolicy
clone operatror

Specified by:
clone in class WSSPolicy
Returns:
clone of this SAML Policy
See Also:
SignaturePolicy, EncryptionPolicy, AuthenticationTokenPolicy

getType

public java.lang.String getType()
Description copied from interface: SecurityPolicy
Get the type of the policy.

Implementation Note: Useful to avoid instanceof checks and String.equals checks

Returns:
the type of the policy

setSTRID

public void setSTRID(java.lang.String id)

getSTRID

public java.lang.String getSTRID()

setAssertionId

public void setAssertionId(java.lang.String id)
set the AssertionId for the possibly remote assertion A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion

Parameters:
id - the Assertion Id of the possibly remote SAML Assertion

getAssertionId

public java.lang.String getAssertionId()
A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion

Returns:
the Assertion ID of the SAML Assertion represented by this Policy

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright ? 2005 Sun Microsystems, Inc. All Rights Reserved.