|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cxf.ws.security.trust.AbstractSTSClient
public abstract class AbstractSTSClient
An abstract class with some functionality to invoke on a SecurityTokenService (STS) via the WS-Trust protocol.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractSTSClient.STSResponse
|
| Field Summary | |
|---|---|
protected Object |
actAs
|
protected String |
addressingNamespace
|
protected AlgorithmSuite |
algorithmSuite
|
protected boolean |
allowRenewing
|
protected boolean |
allowRenewingAfterExpiry
|
protected org.apache.cxf.Bus |
bus
|
protected Element |
claims
|
protected CallbackHandler |
claimsCallbackHandler
|
protected org.apache.cxf.endpoint.Client |
client
|
protected String |
context
|
protected Map<String,Object> |
ctx
|
protected boolean |
enableAppliesTo
|
protected boolean |
enableLifetime
|
protected QName |
endpointName
|
protected List<org.apache.cxf.feature.Feature> |
features
|
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
in
|
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
inFault
|
protected boolean |
isSecureConv
|
protected boolean |
isSpnego
|
protected int |
keySize
|
protected String |
keyType
|
protected String |
location
|
protected org.apache.cxf.message.Message |
message
|
protected String |
name
|
protected String |
namespace
|
protected Object |
onBehalfOf
|
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
out
|
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
outFault
|
protected org.apache.neethi.Policy |
policy
|
protected boolean |
requiresEntropy
|
protected boolean |
sendKeyType
|
protected boolean |
sendRenewing
|
protected QName |
serviceName
|
protected String |
soapVersion
|
protected Element |
template
|
protected String |
tokenType
|
protected int |
ttl
|
protected boolean |
useCertificateForConfirmationKeyInfo
|
protected X509Certificate |
useKeyCertificate
|
protected String |
wsdlLocation
|
protected String |
wspNamespace
|
| Constructor Summary | |
|---|---|
AbstractSTSClient(org.apache.cxf.Bus b)
|
|
| Method Summary | |
|---|---|
protected void |
addAppliesTo(XMLStreamWriter writer,
String appliesTo)
|
protected void |
addBinaryExchange(String binaryExchange,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
|
protected void |
addClaims(XMLStreamWriter writer)
|
protected void |
addKeySize(int keysize,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
|
protected void |
addLifetime(XMLStreamWriter writer)
|
protected void |
addRequestType(String requestType,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
|
protected void |
addTokenType(XMLStreamWriter writer)
|
protected AbstractSTSClient.STSResponse |
cancel(SecurityToken token)
Make an "Cancel" invocation and return the response as a STSResponse Object |
void |
configureViaEPR(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
boolean useEPRWSAAddrAsMEXLocation)
|
protected void |
createClient()
|
protected org.apache.ws.security.components.crypto.Crypto |
createCrypto(boolean decrypt)
|
protected CallbackHandler |
createHandler()
|
protected SecurityToken |
createSecurityToken(Element el,
byte[] requestorEntropy)
|
protected byte[] |
decryptKey(Element child)
|
protected String |
findID(Element rar,
Element rur,
Element rst)
|
protected String |
findMEXLocation(Element ref)
|
protected String |
findMEXLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
boolean useEPRWSAAddrAsMEXLocation)
|
protected org.apache.cxf.service.model.BindingOperationInfo |
findOperation(String suffix)
|
Element |
getActAsToken()
Get the "ActAs" element to be sent to the STS. |
protected org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion |
getAddressingAssertion()
|
String |
getBeanName()
|
protected X509Certificate |
getCert(org.apache.ws.security.components.crypto.Crypto crypto)
|
Element |
getClaims()
|
CallbackHandler |
getClaimsCallbackHandler()
|
org.apache.cxf.endpoint.Client |
getClient()
|
String |
getContext()
|
protected Element |
getDelegationSecurityToken(Object delegationObject)
|
protected Element |
getDocumentElement(DOMSource ds)
|
QName |
getEndpointQName()
|
List<org.apache.cxf.feature.Feature> |
getFeatures()
|
protected String |
getIDFromSTR(Element el)
|
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getInFaultInterceptors()
|
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getInInterceptors()
|
int |
getKeySize()
|
String |
getLocation()
|
Element |
getOnBehalfOfToken()
Get the "OnBehalfOf" element to be sent to the STS. |
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getOutFaultInterceptors()
|
List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> |
getOutInterceptors()
|
Map<String,Object> |
getProperties()
|
protected Object |
getProperty(String s)
|
Map<String,Object> |
getRequestContext()
|
QName |
getServiceQName()
|
String |
getTokenType()
|
X509Certificate |
getUseKeyCertificate()
|
String |
getWsdlLocation()
|
String |
getWspNamespace()
|
boolean |
isAllowRenewing()
|
boolean |
isAllowRenewingAfterExpiry()
|
boolean |
isEnableAppliesTo()
|
boolean |
isRequiresEntropy()
|
boolean |
isSecureConv()
|
boolean |
isSpnego()
|
protected AbstractSTSClient.STSResponse |
issue(String appliesTo,
String action,
String requestType,
String binaryExchange)
Make an "Issue" invocation and return the response as a STSResponse Object |
boolean |
isUseCertificateForConfirmationKeyInfo()
|
AbstractSTSClient.STSResponse |
renew(SecurityToken tok)
Make an "Renew" invocation and return the response as a STSResponse Object |
void |
setActAs(Object actAs)
|
void |
setAddressingNamespace(String ad)
|
void |
setAlgorithmSuite(AlgorithmSuite ag)
|
void |
setAllowRenewing(boolean allowRenewing)
|
void |
setAllowRenewingAfterExpiry(boolean allowRenewingAfterExpiry)
|
void |
setBeanName(String s)
|
void |
setClaims(Element rstClaims)
|
void |
setClaimsCallbackHandler(CallbackHandler claimsCallbackHandler)
|
void |
setContext(String context)
|
void |
setEnableAppliesTo(boolean enableAppliesTo)
|
void |
setEnableLifetime(boolean enableLifetime)
|
void |
setEndpointName(String qn)
|
void |
setEndpointQName(QName qn)
|
void |
setFeatures(List<? extends org.apache.cxf.feature.Feature> f)
|
void |
setInFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
|
void |
setInInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
|
void |
setKeySize(int i)
|
void |
setKeyType(String keyType)
|
void |
setLocation(String location)
|
void |
setMessage(org.apache.cxf.message.Message message)
|
void |
setOnBehalfOf(Object onBehalfOf)
|
void |
setOnBehalfOfElement(Element onBehalfOfElement)
Deprecated. |
void |
setOutFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
|
void |
setOutInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
|
void |
setPolicy(Object newPolicy)
Sets the WS-P policy that is applied to communications between this client and the remote server if no value is supplied for setWsdlLocation(String). |
protected void |
setPolicyInternal(Element newPolicy)
|
protected void |
setPolicyInternal(org.apache.neethi.Policy newPolicy)
|
protected void |
setPolicyInternal(String policyReference)
|
void |
setProperties(Map<String,Object> p)
|
void |
setRequiresEntropy(boolean requiresEntropy)
|
void |
setSecureConv(boolean secureConv)
|
void |
setSendKeyType(boolean sendKeyType)
|
void |
setSendRenewing(boolean sendRenewing)
|
void |
setServiceName(String qn)
|
void |
setServiceQName(QName qn)
|
void |
setSoap11()
|
void |
setSoap11(boolean b)
|
void |
setSoap12()
|
void |
setSpnego(boolean spnego)
|
void |
setTemplate(Element rstTemplate)
|
void |
setTokenType(String tokenType)
|
void |
setTrust(Trust10 trust)
|
void |
setTrust(Trust13 trust)
|
void |
setTtl(int ttl)
|
void |
setUseCertificateForConfirmationKeyInfo(boolean useCertificate)
Indicate whether to use the signer's public X509 certificate for the subject confirmation key info when creating a RequestsSecurityToken message. |
void |
setUseKeyCertificate(X509Certificate useKeyCertificate)
|
void |
setWsdlLocation(String wsdl)
|
void |
setWspNamespace(String wspNamespace)
|
protected boolean |
useSecondaryParameters()
|
protected AbstractSTSClient.STSResponse |
validate(SecurityToken tok,
String tokentype)
Make an "Validate" invocation and return the response as a STSResponse Object |
protected void |
writeElementsForRSTPublicKey(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
X509Certificate cert)
|
protected byte[] |
writeElementsForRSTSymmetricKey(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
boolean wroteKeySize)
|
protected String |
writeKeyType(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
String keyTypeToWrite)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.cxf.Bus bus
protected String name
protected org.apache.cxf.endpoint.Client client
protected String location
protected String wsdlLocation
protected QName serviceName
protected QName endpointName
protected org.apache.neethi.Policy policy
protected String soapVersion
protected int keySize
protected boolean requiresEntropy
protected Element template
protected Element claims
protected CallbackHandler claimsCallbackHandler
protected AlgorithmSuite algorithmSuite
protected String namespace
protected String addressingNamespace
protected String wspNamespace
protected Object onBehalfOf
protected boolean enableAppliesTo
protected boolean useCertificateForConfirmationKeyInfo
protected boolean isSecureConv
protected boolean isSpnego
protected boolean enableLifetime
protected int ttl
protected boolean sendRenewing
protected boolean allowRenewing
protected boolean allowRenewingAfterExpiry
protected Object actAs
protected String tokenType
protected String keyType
protected boolean sendKeyType
protected org.apache.cxf.message.Message message
protected String context
protected X509Certificate useKeyCertificate
protected Map<String,Object> ctx
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> in
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> out
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> outFault
protected List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> inFault
protected List<org.apache.cxf.feature.Feature> features
| Constructor Detail |
|---|
public AbstractSTSClient(org.apache.cxf.Bus b)
| Method Detail |
|---|
public String getBeanName()
getBeanName in interface org.apache.cxf.configuration.Configurablepublic void setBeanName(String s)
public String getLocation()
public void setLocation(String location)
public void setMessage(org.apache.cxf.message.Message message)
public void setTtl(int ttl)
public void setEnableLifetime(boolean enableLifetime)
public void setSendRenewing(boolean sendRenewing)
public void setPolicy(Object newPolicy)
setWsdlLocation(String).
Accepts Policy or Element as input.
newPolicy - the policy object
IllegalArgumentException - if newPolicy is not one of the supported types.public void setSoap12()
public void setSoap11()
public void setSoap11(boolean b)
public void setAddressingNamespace(String ad)
public void setTrust(Trust10 trust)
public void setTrust(Trust13 trust)
public boolean isRequiresEntropy()
public void setRequiresEntropy(boolean requiresEntropy)
public boolean isSecureConv()
public void setSecureConv(boolean secureConv)
public boolean isSpnego()
public void setSpnego(boolean spnego)
public boolean isAllowRenewing()
public void setAllowRenewing(boolean allowRenewing)
public boolean isAllowRenewingAfterExpiry()
public void setAllowRenewingAfterExpiry(boolean allowRenewingAfterExpiry)
public boolean isEnableAppliesTo()
public void setEnableAppliesTo(boolean enableAppliesTo)
public String getContext()
public void setContext(String context)
public void setAlgorithmSuite(AlgorithmSuite ag)
public Map<String,Object> getRequestContext()
public void setProperties(Map<String,Object> p)
public Map<String,Object> getProperties()
public void setWsdlLocation(String wsdl)
public String getWsdlLocation()
public void setServiceName(String qn)
public void setEndpointName(String qn)
public void setServiceQName(QName qn)
public QName getServiceQName()
public void setEndpointQName(QName qn)
public QName getEndpointQName()
public void setActAs(Object actAs)
public void setKeySize(int i)
public int getKeySize()
public void setTokenType(String tokenType)
public String getTokenType()
public void setSendKeyType(boolean sendKeyType)
public void setKeyType(String keyType)
@Deprecated public void setOnBehalfOfElement(Element onBehalfOfElement)
public void setOnBehalfOf(Object onBehalfOf)
public void setUseCertificateForConfirmationKeyInfo(boolean useCertificate)
public boolean isUseCertificateForConfirmationKeyInfo()
protected void setPolicyInternal(org.apache.neethi.Policy newPolicy)
protected void setPolicyInternal(Element newPolicy)
protected void setPolicyInternal(String policyReference)
public org.apache.cxf.endpoint.Client getClient()
throws org.apache.cxf.BusException,
org.apache.cxf.endpoint.EndpointException
org.apache.cxf.BusException
org.apache.cxf.endpoint.EndpointException
public void configureViaEPR(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
boolean useEPRWSAAddrAsMEXLocation)
protected String findMEXLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
boolean useEPRWSAAddrAsMEXLocation)
protected String findMEXLocation(Element ref)
protected void createClient()
throws org.apache.cxf.BusException,
org.apache.cxf.endpoint.EndpointException
org.apache.cxf.BusException
org.apache.cxf.endpoint.EndpointExceptionprotected org.apache.cxf.service.model.BindingOperationInfo findOperation(String suffix)
protected AbstractSTSClient.STSResponse issue(String appliesTo,
String action,
String requestType,
String binaryExchange)
throws Exception
Exception
public Element getOnBehalfOfToken()
throws Exception
Exception
public Element getActAsToken()
throws Exception
Exception
protected Element getDelegationSecurityToken(Object delegationObject)
throws Exception
Exception
protected byte[] writeElementsForRSTSymmetricKey(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
boolean wroteKeySize)
throws Exception
Exception
protected void writeElementsForRSTPublicKey(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
X509Certificate cert)
throws Exception
Exception
protected void addBinaryExchange(String binaryExchange,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
throws XMLStreamException
XMLStreamException
protected void addKeySize(int keysize,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
throws XMLStreamException
XMLStreamException
protected void addRequestType(String requestType,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
throws XMLStreamException
XMLStreamExceptionprotected Element getDocumentElement(DOMSource ds)
public AbstractSTSClient.STSResponse renew(SecurityToken tok)
throws Exception
Exceptionprotected org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion getAddressingAssertion()
protected AbstractSTSClient.STSResponse validate(SecurityToken tok,
String tokentype)
throws Exception
Exception
protected AbstractSTSClient.STSResponse cancel(SecurityToken token)
throws Exception
Exceptionprotected boolean useSecondaryParameters()
protected String writeKeyType(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
String keyTypeToWrite)
throws XMLStreamException
XMLStreamException
protected X509Certificate getCert(org.apache.ws.security.components.crypto.Crypto crypto)
throws Exception
Exception
protected void addLifetime(XMLStreamWriter writer)
throws XMLStreamException
XMLStreamException
protected void addAppliesTo(XMLStreamWriter writer,
String appliesTo)
throws XMLStreamException
XMLStreamException
protected void addTokenType(XMLStreamWriter writer)
throws XMLStreamException
XMLStreamException
protected void addClaims(XMLStreamWriter writer)
throws Exception
Exception
protected SecurityToken createSecurityToken(Element el,
byte[] requestorEntropy)
throws org.apache.ws.security.WSSecurityException
org.apache.ws.security.WSSecurityException
protected byte[] decryptKey(Element child)
throws TrustException,
org.apache.ws.security.WSSecurityException
TrustException
org.apache.ws.security.WSSecurityExceptionprotected CallbackHandler createHandler()
protected Object getProperty(String s)
protected org.apache.ws.security.components.crypto.Crypto createCrypto(boolean decrypt)
throws IOException,
org.apache.ws.security.WSSecurityException
IOException
org.apache.ws.security.WSSecurityException
protected String findID(Element rar,
Element rur,
Element rst)
protected String getIDFromSTR(Element el)
public void setTemplate(Element rstTemplate)
public void setClaims(Element rstClaims)
public Element getClaims()
public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()
getOutFaultInterceptors in interface org.apache.cxf.interceptor.InterceptorProviderpublic List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()
getInFaultInterceptors in interface org.apache.cxf.interceptor.InterceptorProviderpublic List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()
getInInterceptors in interface org.apache.cxf.interceptor.InterceptorProviderpublic List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()
getOutInterceptors in interface org.apache.cxf.interceptor.InterceptorProviderpublic void setInInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setInFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setOutInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setOutFaultInterceptors(List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> interceptors)
public void setFeatures(List<? extends org.apache.cxf.feature.Feature> f)
public List<org.apache.cxf.feature.Feature> getFeatures()
public CallbackHandler getClaimsCallbackHandler()
public void setClaimsCallbackHandler(CallbackHandler claimsCallbackHandler)
public String getWspNamespace()
public void setWspNamespace(String wspNamespace)
public X509Certificate getUseKeyCertificate()
public void setUseKeyCertificate(X509Certificate useKeyCertificate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||