Package com.sun.xml.wss.impl.misc
Class WSITProviderSecurityEnvironment
- java.lang.Object
-
- com.sun.xml.wss.impl.misc.WSITProviderSecurityEnvironment
-
- All Implemented Interfaces:
SecurityEnvironment
public class WSITProviderSecurityEnvironment extends Object implements SecurityEnvironment
- Author:
- kumar.jayanti
-
-
Field Summary
Fields Modifier and Type Field Description protected static Loggerlogloggerprotected longMAX_CLOCK_SKEWprotected longmaxClockSkewGprotected longmaxNonceAgestatic StringPASSWORD_CBHprotected booleanrevocationEnabledprotected StringrevocationEnabledAttrprotected longTIMESTAMP_FRESHNESS_LIMITprotected longtimestampFreshnessLimitGstatic StringUSERNAME_CBH
-
Constructor Summary
Constructors Constructor Description WSITProviderSecurityEnvironment(CallbackHandler handler, Map options, Properties configAssertions)Creates a new instance of WSITProviderSecurityEnvironment
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringauthenticateUser(Map context, String username)Authenticate the user against a list of known usernamesbooleanauthenticateUser(Map context, String username, String password)Authenticate the user against a list of known username-password pairs.booleanauthenticateUser(Map context, String username, String passwordDigest, String nonce, String created)Authenticate the user given the password digest.KerberosContextdoKerberosLogin()Perform a Kerberos Login and return a Kerberos Context KerberosContext stores the secretKey, GSSContext, kerberos BST etcKerberosContextdoKerberosLogin(byte[] tokenValue)Perform a Kerberos Login and return a Kerberos Context KerberosContext stores the secretKey, GSSContext, kerberos BST etcCallbackHandlergetCallbackHandler()X509CertificategetCertificate(String keyIdentifier)X509CertificategetCertificate(Map context, byte[] ski)X509CertificategetCertificate(Map context, byte[] identifier, String valueType)X509CertificategetCertificate(Map context, String alias, boolean forSigning)X509CertificategetCertificate(Map context, BigInteger serialNumber, String issuerName)X509CertificategetCertificate(Map context, PublicKey publicKey, boolean forSign)X509CertificategetDefaultCertificate(Map context)Retrieves a reasonable default value for the current user's X509Certificate if one exists.X509CertificategetMatchingCertificate(Map context, byte[] keyIdMatch)X509CertificategetMatchingCertificate(Map context, byte[] keyIdMatch, String valueType)X509CertificategetMatchingCertificate(Map context, BigInteger serialNumber, String issuerName)StringgetPassword(Map context)PrivateKeygetPrivateKey(Map context, byte[] keyIdentifier)PrivateKeygetPrivateKey(Map context, byte[] keyIdentifier, String valueType)PrivateKeygetPrivateKey(Map context, String alias)PrivateKeygetPrivateKey(Map context, BigInteger serialNumber, String issuerName)PrivateKeygetPrivateKey(Map context, X509Certificate cert)PrivateKeygetPrivateKey(Map context, PublicKey publicKey, boolean forSign)PublicKeygetPublicKey(String keyIdentifier)PublicKeygetPublicKey(Map context, byte[] keyIdentifier)PublicKeygetPublicKey(Map context, byte[] identifier, String valueType)PublicKeygetPublicKey(Map context, BigInteger serialNumber, String issuerName)SubjectgetRequesterSubject(Map context)SecretKeygetSecretKey(Map context, String alias, boolean encryptMode)SubjectgetSubject()SubjectgetSubject(Map context)StringgetUsername(Map context)booleanisSelfCertificate(X509Certificate cert)ElementlocateSAMLAssertion(Map context, Element binding, String assertionId, Document ownerDoc)Locate and return a SAML Assertion, given the Authority binding and assertionIdAuthenticationTokenPolicy.SAMLAssertionBindingpopulateSAMLPolicy(Map fpcontext, AuthenticationTokenPolicy.SAMLAssertionBinding samlBinding, DynamicApplicationContext context)Locate and update the Policy argument with the SAML Assertion and/or the AuthorityBinding and Assertion ID information.voidsetRequesterSubject(Subject subject, Map context)voidsetSubject(Subject subject, Map context)voidupdateOtherPartySubject(Subject subject, Assertion assertion)Update the public credentials of the subject of the party whose Assertion is given.voidupdateOtherPartySubject(Subject subject, String username, String password)Update the public/private credentials of the subject of the party whose username password pair is given.voidupdateOtherPartySubject(Subject subject, X509Certificate cert)Update the public credentials of the subject of the party whose certificate is given.voidupdateOtherPartySubject(Subject subject, Subject bootStrapSubject)Update the principal/credentials of the requesting party subjectvoidupdateOtherPartySubject(Subject subject, XMLStreamReader assertion)Update the public credentials of the subject of the party whose Assertion is given.voidupdateOtherPartySubject(Subject subject, GSSName clientCred, GSSCredential gssCred)Update the principal/credentials of the requesting party subjectbooleanvalidateAndCacheNonce(Map context, String nonce, String created, long nonceAge)Validate the given nonce.booleanvalidateCertificate(X509Certificate cert, Map context)Validate an X509Certificate.voidvalidateCreationTime(Map context, String creationTime, long maxClockSkew, long timestampFreshnessLimit)Validate the creation time.voidvalidateSAMLAssertion(Map context, XMLStreamReader assertion)Validate the received SAML Assertion Validations can include validating the Issuer and the Saml User, SAML Version etc.voidvalidateSAMLAssertion(Map context, Element assertion)Validate the received SAML Assertion Validations can include validating the Issuer and the Saml User, SAML Version etc.booleanvalidateSamlIssuer(String issuer)booleanvalidateSamlUser(String user, String domain, String format)voidvalidateTimestamp(Map context, Timestamp timestamp, long maxClockSkew, long freshnessLimit)Validate the creation time.voidvalidateTimestamp(Map context, String created, String expires, long maxClockSkew, long freshnessLimit)
-
-
-
Field Detail
-
MAX_CLOCK_SKEW
protected final long MAX_CLOCK_SKEW
- See Also:
- Constant Field Values
-
TIMESTAMP_FRESHNESS_LIMIT
protected final long TIMESTAMP_FRESHNESS_LIMIT
- See Also:
- Constant Field Values
-
log
protected static final Logger log
logger
-
USERNAME_CBH
public static final String USERNAME_CBH
- See Also:
- Constant Field Values
-
PASSWORD_CBH
public static final String PASSWORD_CBH
- See Also:
- Constant Field Values
-
maxClockSkewG
protected long maxClockSkewG
-
timestampFreshnessLimitG
protected long timestampFreshnessLimitG
-
maxNonceAge
protected long maxNonceAge
-
revocationEnabledAttr
protected String revocationEnabledAttr
-
revocationEnabled
protected boolean revocationEnabled
-
-
Constructor Detail
-
WSITProviderSecurityEnvironment
public WSITProviderSecurityEnvironment(CallbackHandler handler, Map options, Properties configAssertions) throws com.sun.xml.wss.XWSSecurityException
Creates a new instance of WSITProviderSecurityEnvironment- Throws:
com.sun.xml.wss.XWSSecurityException
-
-
Method Detail
-
getPrivateKey
public PrivateKey getPrivateKey(Map context, String alias) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPrivateKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesalias- the alias for identifying the PrivateKey- Returns:
- the PrivateKey corresponding to the alias
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PrivateKey
-
getPrivateKey
public PrivateKey getPrivateKey(Map context, byte[] keyIdentifier) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPrivateKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertieskeyIdentifier- an Opaque identifier indicating the X509 certificate.- Returns:
- the PrivateKey corresponding to a KeyIdentifier
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PrivateKey
-
getPrivateKey
public PrivateKey getPrivateKey(Map context, X509Certificate cert) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPrivateKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiescert- the X509Certificate- Returns:
- the PrivateKey corresponding to the X509Certificate
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PrivateKey
-
getPrivateKey
public PrivateKey getPrivateKey(Map context, BigInteger serialNumber, String issuerName) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPrivateKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesserialNumber- the serialNumber of the certificateissuerName- the issuerName of the certificate- Returns:
- the PrivateKey corresponding to (serialNumber, issuerName)
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PrivateKey
-
getDefaultCertificate
public X509Certificate getDefaultCertificate(Map context) throws com.sun.xml.wss.XWSSecurityException
Retrieves a reasonable default value for the current user's X509Certificate if one exists.- Specified by:
getDefaultCertificatein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific properties- Returns:
- the default certificate for the current user
- Throws:
com.sun.xml.wss.XWSSecurityException
-
authenticateUser
public boolean authenticateUser(Map context, String username, String password) throws com.sun.xml.wss.XWSSecurityException
Authenticate the user against a list of known username-password pairs.- Specified by:
authenticateUserin interfaceSecurityEnvironment- Parameters:
username-password-context- a Map of application and integration-layer specific properties- Returns:
- true if the username-password pair is valid
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to authenticate the username
-
authenticateUser
public String authenticateUser(Map context, String username) throws com.sun.xml.wss.XWSSecurityException
Authenticate the user against a list of known usernames- Specified by:
authenticateUserin interfaceSecurityEnvironment- Parameters:
username-context- a Map of application and integration-layer specific properties- Returns:
- password if the username is valid
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to authenticate the username
-
authenticateUser
public boolean authenticateUser(Map context, String username, String passwordDigest, String nonce, String created) throws com.sun.xml.wss.XWSSecurityException
Authenticate the user given the password digest.- Specified by:
authenticateUserin interfaceSecurityEnvironment- Parameters:
username-passwordDigest-nonce-created-context- a Map of application and integration-layer specific properties- Returns:
- true if the password digest is valid
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to authenticate the username
-
validateCertificate
public boolean validateCertificate(X509Certificate cert, Map context) throws com.sun.xml.wss.XWSSecurityException
Validate an X509Certificate.- Specified by:
validateCertificatein interfaceSecurityEnvironment- Parameters:
cert- the X509Certificate to be validatedcontext- Map of application and integration-layer specific properties- Returns:
- true, if the cert is a valid one, false o/w.
- Throws:
com.sun.xml.wss.XWSSecurityException- if there is some problem during validation.
-
getMatchingCertificate
public X509Certificate getMatchingCertificate(Map context, byte[] keyIdMatch) throws com.sun.xml.wss.XWSSecurityException
- Parameters:
keyIdMatch- KeyIdentifier to search for- Returns:
- the matching Certificate
- Throws:
com.sun.xml.wss.XWSSecurityException
-
getMatchingCertificate
public X509Certificate getMatchingCertificate(Map context, BigInteger serialNumber, String issuerName) throws com.sun.xml.wss.XWSSecurityException
- Throws:
com.sun.xml.wss.XWSSecurityException
-
getMatchingCertificate
public X509Certificate getMatchingCertificate(Map context, byte[] keyIdMatch, String valueType) throws com.sun.xml.wss.XWSSecurityException
- Parameters:
keyIdMatch- KeyIdentifier to search for- Returns:
- the matching Certificate
- Throws:
com.sun.xml.wss.XWSSecurityException
-
getSecretKey
public SecretKey getSecretKey(Map context, String alias, boolean encryptMode) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getSecretKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesalias- the alias for identifying the SecretKeyencryptMode- whether this request is for an Encrypt or Decrypt operation- Returns:
- the SecretKey corresponding to the alias
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the SecretKey
-
getCertificate
public X509Certificate getCertificate(Map context, String alias, boolean forSigning) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getCertificatein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesalias- the alias for identifying the certificateforSigning- whether this request is for a Sign operation or Encrypt- Returns:
- the certificate corresponding to the alias
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the Cerificate
-
updateOtherPartySubject
public void updateOtherPartySubject(Subject subject, String username, String password)
Description copied from interface:SecurityEnvironmentUpdate the public/private credentials of the subject of the party whose username password pair is given.- Specified by:
updateOtherPartySubjectin interfaceSecurityEnvironment- Parameters:
subject- the Subject of the requesting partyusername- the username of the requesting partypassword- the password of the requesting party
-
updateOtherPartySubject
public void updateOtherPartySubject(Subject subject, X509Certificate cert)
Description copied from interface:SecurityEnvironmentUpdate the public credentials of the subject of the party whose certificate is given.- Specified by:
updateOtherPartySubjectin interfaceSecurityEnvironment- Parameters:
subject- the Subject of the requesting partycert- the X509Certificate of the requesting party
-
updateOtherPartySubject
public void updateOtherPartySubject(Subject subject, Assertion assertion)
Description copied from interface:SecurityEnvironmentUpdate the public credentials of the subject of the party whose Assertion is given.- Specified by:
updateOtherPartySubjectin interfaceSecurityEnvironment- Parameters:
subject- the Subject of the requesting partyassertion- the SAML Assertion of the requesting party
-
getPublicKey
public PublicKey getPublicKey(Map context, BigInteger serialNumber, String issuerName) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPublicKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesserialNumber- the serialNumber of the certificateissuerName- the issuerName of the certificate- Returns:
- the PublicKey corresponding to (serialNumber, issuerName)
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PublicKey
-
getPublicKey
public PublicKey getPublicKey(String keyIdentifier) throws com.sun.xml.wss.XWSSecurityException
- Throws:
com.sun.xml.wss.XWSSecurityException
-
getPublicKey
public PublicKey getPublicKey(Map context, byte[] keyIdentifier) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPublicKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertieskeyIdentifier- an Opaque identifier indicating the X509 certificate.- Returns:
- the PublicKey corresponding to a KeyIdentifier
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PublicKey
-
getPublicKey
public PublicKey getPublicKey(Map context, byte[] identifier, String valueType) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPublicKeyin interfaceSecurityEnvironment- Throws:
com.sun.xml.wss.XWSSecurityException
-
getCertificate
public X509Certificate getCertificate(Map context, BigInteger serialNumber, String issuerName) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getCertificatein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesserialNumber- the serialNumber of the certificateissuerName- the issuerName of the certificate- Returns:
- the X509Certificate corresponding to (serialNumber, issuerName)
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the X509Certificate
-
getCertificate
public X509Certificate getCertificate(String keyIdentifier) throws com.sun.xml.wss.XWSSecurityException
- Throws:
com.sun.xml.wss.XWSSecurityException
-
getPrivateKey
public PrivateKey getPrivateKey(Map context, PublicKey publicKey, boolean forSign)
- Specified by:
getPrivateKeyin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiespublicKey- the publicKeyforSign- set to true if the purpose is Signature- Returns:
- the PrivateKey corresponding to a PublicKey
-
getCertificate
public X509Certificate getCertificate(Map context, byte[] ski)
- Specified by:
getCertificatein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesski- an Opaque identifier indicating the X509 certificate.- Returns:
- the X509Certificate corresponding to a KeyIdentifier
-
getCertificate
public X509Certificate getCertificate(Map context, PublicKey publicKey, boolean forSign) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getCertificatein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiespublicKey- the publicKeyforSign- set to true if the public key is to be used for SignatureVerification- Returns:
- the X509Certificate corresponding to a PublicKey
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the PublicKey
-
getCertificate
public X509Certificate getCertificate(Map context, byte[] identifier, String valueType) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getCertificatein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesidentifier- an Opaque identifier indicating the X509 certificate.- Returns:
- the X509Certificate corresponding to a KeyIdentifier
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the X509Certificate
-
validateSamlIssuer
public boolean validateSamlIssuer(String issuer)
-
getSubject
public Subject getSubject()
- Specified by:
getSubjectin interfaceSecurityEnvironment- Returns:
- the host/sender Subject, null if subject is not available/initialized
-
getUsername
public String getUsername(Map context) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getUsernamein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific properties- Returns:
- the username using UsernameCallback
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying obtain the username
-
getPassword
public String getPassword(Map context) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPasswordin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific properties- Returns:
- the password using PasswordCallback
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying obtain the password
-
validateAndCacheNonce
public boolean validateAndCacheNonce(Map context, String nonce, String created, long nonceAge) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentValidate the given nonce. It is an error if the nonce matches any stored nonce values on the server if there is no error then the nonce is Cached.- Specified by:
validateAndCacheNoncein interfaceSecurityEnvironment- Parameters:
context- a context containing runtime propertiesnonce- the encoded nonce valuecreated- the creation time valuenonceAge- the time in milliseconds for which this nonce will be stored on the receiver.- Returns:
- true if this nonce is valid
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to validate the Nonce
-
validateTimestamp
public void validateTimestamp(Map context, String created, String expires, long maxClockSkew, long freshnessLimit) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
validateTimestampin interfaceSecurityEnvironment- Throws:
com.sun.xml.wss.XWSSecurityException
-
validateTimestamp
public void validateTimestamp(Map context, Timestamp timestamp, long maxClockSkew, long freshnessLimit) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentValidate the creation time. It is an error if the creation time is older than current local time minus TIMESTAMP_FRESHNESS_LIMIT minus MAX_CLOCK_SKEW- Specified by:
validateTimestampin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiestimestamp- the Timestamp elementmaxClockSkew- (in milliseconds) the maximum clockskewfreshnessLimit- (in milliseconds) the limit for which timestamps are considered fresh- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying validate the Timestamp
-
validateCreationTime
public void validateCreationTime(Map context, String creationTime, long maxClockSkew, long timestampFreshnessLimit) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentValidate the creation time. It is an error if the creation time is older than current local time minus TIMESTAMP_FRESHNESS_LIMIT minus MAX_CLOCK_SKEW- Specified by:
validateCreationTimein interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiescreationTime- the creation-time valuemaxClockSkew- (in milliseconds) the maximum clockskewtimestampFreshnessLimit- (in milliseconds) the limit for which timestamps are considered fresh- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to validate the creationTime
-
getCallbackHandler
public CallbackHandler getCallbackHandler() throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getCallbackHandlerin interfaceSecurityEnvironment- Returns:
- any Callback Handler associated with this Environment, null otherwise
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying retrieve the CallbackHandler
-
validateSAMLAssertion
public void validateSAMLAssertion(Map context, Element assertion) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentValidate the received SAML Assertion Validations can include validating the Issuer and the Saml User, SAML Version etc. Note: The SAML Condition (notBefore, notOnOrAfter) is validated by the XWS runtime- Specified by:
validateSAMLAssertionin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesassertion- the Assertion to be validated- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while validating the SAML Assertion
-
locateSAMLAssertion
public Element locateSAMLAssertion(Map context, Element binding, String assertionId, Document ownerDoc) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentLocate and return a SAML Assertion, given the Authority binding and assertionId- Specified by:
locateSAMLAssertionin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesbinding- an org.w3c.dom.Element representing the SAML AuthorityBindingassertionId- the Assertion ID of the SAML AssertionownerDoc- the owner document into which the returned SAML Assertion should be imported to- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to locate the SAML Assertion
-
populateSAMLPolicy
public AuthenticationTokenPolicy.SAMLAssertionBinding populateSAMLPolicy(Map fpcontext, AuthenticationTokenPolicy.SAMLAssertionBinding samlBinding, DynamicApplicationContext context) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentLocate and update the Policy argument with the SAML Assertion and/or the AuthorityBinding and Assertion ID information. The DynamicApplicationContext may contain information to be used by the implementation to make its runtime decisions on how to obtaim the SAML Assertion- Specified by:
populateSAMLPolicyin interfaceSecurityEnvironment- Parameters:
fpcontext- a Map of application and integration-layer specific propertiessamlBinding- the SAML Assertion Policy to be populatedcontext- the DynamicApplicationContext- Returns:
- populated SAML Assertion policy
- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while trying to populate the SAML Assertion Policy
-
getPrivateKey
public PrivateKey getPrivateKey(Map context, byte[] keyIdentifier, String valueType) throws com.sun.xml.wss.XWSSecurityException
- Specified by:
getPrivateKeyin interfaceSecurityEnvironment- Throws:
com.sun.xml.wss.XWSSecurityException
-
validateSAMLAssertion
public void validateSAMLAssertion(Map context, XMLStreamReader assertion) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentValidate the received SAML Assertion Validations can include validating the Issuer and the Saml User, SAML Version etc. Note: The SAML Condition (notBefore, notOnOrAfter) is validated by the XWS runtime In case HOK SAML Assertion the enveloped signature is removed from this SAML Assertion and verified. (i,e one will not find Signature element under this SAMLAssertion)- Specified by:
validateSAMLAssertionin interfaceSecurityEnvironment- Parameters:
context- a Map of application and integration-layer specific propertiesassertion- the Assertion to be validated- Throws:
com.sun.xml.wss.XWSSecurityException- if there was an error while validating the SAML Assertion
-
updateOtherPartySubject
public void updateOtherPartySubject(Subject subject, XMLStreamReader assertion)
Description copied from interface:SecurityEnvironmentUpdate the public credentials of the subject of the party whose Assertion is given.- Specified by:
updateOtherPartySubjectin interfaceSecurityEnvironment- Parameters:
subject- the Subject of the requesting partyassertion- the SAML Assertion of the requesting party
-
isSelfCertificate
public boolean isSelfCertificate(X509Certificate cert)
- Specified by:
isSelfCertificatein interfaceSecurityEnvironment- Returns:
- true if the certificate is a self certificate, false otherwise
-
updateOtherPartySubject
public void updateOtherPartySubject(Subject subject, Subject bootStrapSubject)
Description copied from interface:SecurityEnvironmentUpdate the principal/credentials of the requesting party subject- Specified by:
updateOtherPartySubjectin interfaceSecurityEnvironment- Parameters:
subject- the Subject of the requesting partybootStrapSubject- the bootstrap Credentials (during a SecureConversation Bootstrap) of the requesting party
-
doKerberosLogin
public KerberosContext doKerberosLogin() throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentPerform a Kerberos Login and return a Kerberos Context KerberosContext stores the secretKey, GSSContext, kerberos BST etc- Specified by:
doKerberosLoginin interfaceSecurityEnvironment- Throws:
com.sun.xml.wss.XWSSecurityException
-
doKerberosLogin
public KerberosContext doKerberosLogin(byte[] tokenValue) throws com.sun.xml.wss.XWSSecurityException
Description copied from interface:SecurityEnvironmentPerform a Kerberos Login and return a Kerberos Context KerberosContext stores the secretKey, GSSContext, kerberos BST etc- Specified by:
doKerberosLoginin interfaceSecurityEnvironment- Throws:
com.sun.xml.wss.XWSSecurityException
-
updateOtherPartySubject
public void updateOtherPartySubject(Subject subject, GSSName clientCred, GSSCredential gssCred)
Description copied from interface:SecurityEnvironmentUpdate the principal/credentials of the requesting party subject- Specified by:
updateOtherPartySubjectin interfaceSecurityEnvironment- Parameters:
subject- the Subject of the requesting partyclientCred- the GSSName of the requesting party
-
-