- All Known Implementing Classes:
IssuedTokenContextImpl
This interface represents a Context containing information populated and used by the Trust and the Security Enforcement Layers (for example the proof-token of an Issued token needs to be used by the SecurityEnforcement Layer to secure the message).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy the IssuedTokenContext.get the Proof Token (if any) associated with the SecurityToken, null otherwiseIf the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example.Return the <wst:ComputedKey> URI if any inside the RSTR, null otherwise.getDecipheredOtherPartyEntropy(Key privKey) Get the Entropy if any provided by the other party, null otherwise If the Entropy was specified as an <xenc:EncryptedKey> then this method would return the decrypted secretGet the endpoint addressget the Expiration Time for this Token if anyGet the Entropy if any provided by the Other Party, null otherwisebyte[]get the SecureConversation ProofToken as a byte[] arrayRequestor Certificate(s)Requestor username if anyGet the SecurityContextTokenInfo for this Token if any.get the SecurityPolicy to be applied for the request or response to which this SecurityContext corresponds to This allows the Client and/or the Service (WSP/STS) to dynamically inject policy to be applied.Depending on the <sp:IncludeToken> policy get the Token to be used in Securing requests and/or responses.Get self Entropy if set, null otherwiseIf the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedUnAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example.voidsetAppliesTo(String appliesTo) voidsetAssociatedProofToken(Token token) Set the Proof Token Associated with the SecurityTokenvoidIf the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedAttachedReference> which needs to be inserted into a <ds:KeyInfo> for examplevoidsetAuthnContextClass(String authType) voidsetCanonicalizationAlgorithm(String canonicalizationAlgo) voidsetCreationTime(Date date) set the creation Time of the IssuedTokenvoidsetEncryptionAlgorithm(String encAlgo) voidsetEncryptWith(String encAlgo) voidsetEndpointAddress(String endPointAddress) set the endpointaddressvoidsetExpirationTime(Date date) set the Expiration Time for this Token if any.voidsetKeyType(String keyType) voidsetOtherPartyEntropy(Object entropy) Set the Entropy information provided by the other Part (if any)voidsetProofKey(byte[] key) set the SecureConversation ProofToken as a byte[] arrayvoidsetProofKeyPair(KeyPair keys) voidAppend the Requestor Certificate that was used in an incoming message.voidsetRequestorSubject(Subject subject) voidsetRequestorUsername(String username) set requestor usernamevoidset the SecurityContextTokenInfo for this Token if any.voidsetSecurityToken(Token tok) Depending on the <sp:IncludeToken> server policy, set the Token to be used in Securing requests and/or responsesvoidsetSelfEntropy(Object entropy) Set self EntropyvoidsetSignatureAlgorithm(String sigAlgo) voidsetSignWith(String sigAlgo) voidvoidsetTokenIssuer(String issuer) voidsetTokenType(String tokenType) voidIf the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedUnAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example
-
Field Details
-
CLAIMED_ATTRUBUTES
- See Also:
-
TARGET_SERVICE_CERTIFICATE
- See Also:
-
STS_CERTIFICATE
- See Also:
-
STS_PRIVATE_KEY
- See Also:
-
WS_TRUST_VERSION
- See Also:
-
CONFIRMATION_METHOD
- See Also:
-
CONFIRMATION_KEY_INFO
- See Also:
-
AUTHN_CONTEXT
- See Also:
-
KEY_WRAP_ALGORITHM
- See Also:
-
STATUS
- See Also:
-
-
Method Details
-
setTokenIssuer
-
getTokenIssuer
-
getRequestorCertificate
Requestor Certificate(s)- Returns:
- the sender certificate, null otherwise
-
setRequestorCertificate
Append the Requestor Certificate that was used in an incoming message. -
getRequestorUsername
Requestor username if any- Returns:
- the requestor username if provided
-
setRequestorUsername
set requestor username -
getRequestorSubject
-
setRequestorSubject
-
setTokenType
-
getTokenType
-
setKeyType
-
getKeyType
-
setAppliesTo
-
getAppliesTo
-
setSecurityToken
Depending on the <sp:IncludeToken> server policy, set the Token to be used in Securing requests and/or responses -
getSecurityToken
Depending on the <sp:IncludeToken> policy get the Token to be used in Securing requests and/or responses. The token returned is to be used only for inserting into the SecurityHeader, if the getAssociatedProofToken is not null, and it should also be used for securing the message if there is no Proof Token associated. -
setAssociatedProofToken
Set the Proof Token Associated with the SecurityTokenwhen the SecurityToken is a SecurityContext token (as defined in WS-SecureConversation) and Derived Keys are being used then the Proof Token is the
<wsc:DerivedKeyToken> -
getAssociatedProofToken
get the Proof Token (if any) associated with the SecurityToken, null otherwise -
getAttachedSecurityTokenReference
@ManagedAttribute @Description("Attached security token reference") Token getAttachedSecurityTokenReference()If the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example.- Returns:
- STR if set, null otherwise
-
getUnAttachedSecurityTokenReference
@ManagedAttribute @Description("Unattached security token reference") Token getUnAttachedSecurityTokenReference()If the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedUnAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example.- Returns:
- STR if set, null otherwise
-
setAttachedSecurityTokenReference
If the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example -
setUnAttachedSecurityTokenReference
If the token returned doesnt allow use of wsu:id attribute then a STR is returned as <wst:RequestedUnAttachedReference> which needs to be inserted into a <ds:KeyInfo> for example -
getSecurityPolicy
get the SecurityPolicy to be applied for the request or response to which this SecurityContext corresponds to This allows the Client and/or the Service (WSP/STS) to dynamically inject policy to be applied. For example in the case of SignChallenge when the Initiator (client) has to sign a specific challenge.Note: Inserting an un-solicited RSTR into a SOAP Header can also be expressed as a policy and the subsequent requirement to sign the RSTR will also be expressed as a policy
TODO: There is no policy today to insert a specific element to a SOAP Header, we need to extend the policy definitions in XWS-Security. -
setOtherPartyEntropy
Set the Entropy information provided by the other Part (if any)WS-Trust allows requestor to provide input to key material in the request. The requestor might do this to satisfy itself as to the degree of entropy(cyrptographic randomness) of atleast some of the material used to generate the actual Key.
For composite Keys Entropy can be set by both parties, the concrete entropy element can be a<wst:Entropy>instance but the argument here is generic to avoid a dependence of the SPI on WS-Trust packages -
getDecipheredOtherPartyEntropy
Get the Entropy if any provided by the other party, null otherwise If the Entropy was specified as an <xenc:EncryptedKey> then this method would return the decrypted secret- Throws:
XWSSecurityException
-
getOtherPartyEntropy
Get the Entropy if any provided by the Other Party, null otherwise -
setSelfEntropy
Set self Entropy -
getSelfEntropy
Get self Entropy if set, null otherwise -
getComputedKeyAlgorithmFromProofToken
URI getComputedKeyAlgorithmFromProofToken()Return the <wst:ComputedKey> URI if any inside the RSTR, null otherwise. The Security Enforcement Layer would compute the Key as P_SHA1(Ent(req), Ent(res)) -
setProofKey
void setProofKey(byte[] key) set the SecureConversation ProofToken as a byte[] array -
getProofKey
byte[] getProofKey()get the SecureConversation ProofToken as a byte[] array -
setProofKeyPair
-
getProofKeyPair
KeyPair getProofKeyPair() -
setAuthnContextClass
-
getAuthnContextClass
String getAuthnContextClass() -
getCreationTime
Date getCreationTime()- Returns:
- the creation Time of the IssuedToken
-
getExpirationTime
Date getExpirationTime()get the Expiration Time for this Token if any -
setCreationTime
set the creation Time of the IssuedToken -
setEndpointAddress
set the endpointaddress -
getEndpointAddress
String getEndpointAddress()Get the endpoint address -
setExpirationTime
set the Expiration Time for this Token if any. -
getSignatureAlgorithm
String getSignatureAlgorithm()- Returns:
- The signature algorithm to use to sign IssuedToken
-
setSignatureAlgorithm
- Parameters:
sigAlgo- : signature algorithm to use to sign IssuedToken
-
getEncryptionAlgorithm
String getEncryptionAlgorithm()- Returns:
- The encryption algorithm to use to encrypt IssuedToken
-
setEncryptionAlgorithm
- Parameters:
encAlgo- : The encryption algorithm to use to encrypt IssuedToken
-
getCanonicalizationAlgorithm
String getCanonicalizationAlgorithm()- Returns:
- The canonicalization algorithm to use when signing IssuedToken
-
setCanonicalizationAlgorithm
- Parameters:
canonicalizationAlgo- : The canonicalization algorithm to use when signing IssuedToken
-
getSignWith
String getSignWith()- Returns:
- The signature algorithm the client intends to use when using ProofKey to sign the application message
-
setSignWith
- Parameters:
sigAlgo- : The signature algorithm the client intends to use when using ProofKey to sign the application message
-
getEncryptWith
String getEncryptWith()- Returns:
- The encryption algorithm the client intends to use when using ProofKey to encrypt the application message
-
setEncryptWith
- Parameters:
encAlgo- The encryption algorithm the client intends to use when using ProofKey to encrypt the application message
-
getSecurityContextTokenInfo
SecurityContextTokenInfo getSecurityContextTokenInfo()Get the SecurityContextTokenInfo for this Token if any. -
setTarget
-
getTarget
Token getTarget() -
setSecurityContextTokenInfo
set the SecurityContextTokenInfo for this Token if any. -
destroy
void destroy()Destroy the IssuedTokenContext. -
getOtherProperties
-