public abstract class AbstractSTSClient extends Object implements org.apache.cxf.configuration.Configurable, org.apache.cxf.interceptor.InterceptorProvider
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractSTSClient.STSResponse |
| Modifier and Type | Field and Description |
|---|---|
protected Object |
actAs |
protected String |
addressingNamespace |
protected org.apache.wss4j.policy.model.AlgorithmSuite |
algorithmSuite |
protected boolean |
allowRenewing |
protected boolean |
allowRenewingAfterExpiry |
protected org.apache.cxf.Bus |
bus |
protected Object |
claims |
protected CallbackHandler |
claimsCallbackHandler |
protected org.apache.cxf.endpoint.Client |
client |
protected String |
context |
protected Map<String,Object> |
ctx |
protected Object |
customContent |
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 org.apache.cxf.configuration.jsse.TLSClientParameters |
tlsClientParameters |
protected String |
tokenType |
protected int |
ttl |
protected boolean |
useCertificateForConfirmationKeyInfo |
protected X509Certificate |
useKeyCertificate |
protected String |
wsdlLocation |
protected String |
wspNamespace |
| Constructor and Description |
|---|
AbstractSTSClient(org.apache.cxf.Bus b) |
| Modifier and Type | Method and Description |
|---|---|
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.wss4j.common.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.wss4j.common.crypto.Crypto crypto) |
CallbackHandler |
getClaimsCallbackHandler() |
org.apache.cxf.endpoint.Client |
getClient() |
String |
getContext() |
Element |
getCustomContent()
Get some custom Element to be inserted into the RequestSecurityToken
|
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(org.apache.wss4j.policy.model.AlgorithmSuite ag) |
void |
setAllowRenewing(boolean allowRenewing) |
void |
setAllowRenewingAfterExpiry(boolean allowRenewingAfterExpiry) |
void |
setBeanName(String s) |
void |
setClaims(Object rstClaims)
Set a Claims Object to be included in the request.
|
void |
setClaimsCallbackHandler(CallbackHandler claimsCallbackHandler) |
void |
setContext(String context) |
void |
setCustomContent(Object customContent) |
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 |
setNamespace(String namespace) |
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 |
setTlsClientParameters(org.apache.cxf.configuration.jsse.TLSClientParameters tlsClientParameters) |
void |
setTokenType(String tokenType) |
void |
setTrust(org.apache.wss4j.policy.model.Trust10 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) |
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 Object customContent
protected Object claims
protected CallbackHandler claimsCallbackHandler
protected org.apache.wss4j.policy.model.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 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
protected org.apache.cxf.configuration.jsse.TLSClientParameters tlsClientParameters
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 setTlsClientParameters(org.apache.cxf.configuration.jsse.TLSClientParameters tlsClientParameters)
public void setPolicy(Object newPolicy)
setWsdlLocation(String).
Accepts Policy or Element as input.newPolicy - the policy objectIllegalArgumentException - 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(org.apache.wss4j.policy.model.Trust10 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(org.apache.wss4j.policy.model.AlgorithmSuite ag)
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 setCustomContent(Object customContent)
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.BusExceptionorg.apache.cxf.endpoint.EndpointExceptionpublic void configureViaEPR(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
boolean useEPRWSAAddrAsMEXLocation)
protected String findMEXLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref, boolean useEPRWSAAddrAsMEXLocation)
protected void createClient()
throws org.apache.cxf.BusException,
org.apache.cxf.endpoint.EndpointException
org.apache.cxf.BusExceptionorg.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
Exceptionpublic Element getOnBehalfOfToken() throws Exception
Exceptionpublic Element getActAsToken() throws Exception
Exceptionpublic Element getCustomContent() throws Exception
Exceptionprotected Element getDelegationSecurityToken(Object delegationObject) throws Exception
Exceptionprotected byte[] writeElementsForRSTSymmetricKey(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
boolean wroteKeySize)
throws Exception
Exceptionprotected void writeElementsForRSTPublicKey(org.apache.cxf.staxutils.W3CDOMStreamWriter writer,
X509Certificate cert)
throws Exception
Exceptionprotected void addBinaryExchange(String binaryExchange, org.apache.cxf.staxutils.W3CDOMStreamWriter writer) throws XMLStreamException
XMLStreamExceptionprotected void addKeySize(int keysize,
org.apache.cxf.staxutils.W3CDOMStreamWriter writer)
throws XMLStreamException
XMLStreamExceptionprotected void addRequestType(String requestType, org.apache.cxf.staxutils.W3CDOMStreamWriter writer) throws XMLStreamException
XMLStreamExceptionpublic 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
Exceptionprotected AbstractSTSClient.STSResponse cancel(SecurityToken token) throws Exception
Exceptionprotected boolean useSecondaryParameters()
protected String writeKeyType(org.apache.cxf.staxutils.W3CDOMStreamWriter writer, String keyTypeToWrite) throws XMLStreamException
XMLStreamExceptionprotected X509Certificate getCert(org.apache.wss4j.common.crypto.Crypto crypto) throws Exception
Exceptionprotected void addLifetime(XMLStreamWriter writer) throws XMLStreamException
XMLStreamExceptionprotected void addAppliesTo(XMLStreamWriter writer, String appliesTo) throws XMLStreamException
XMLStreamExceptionprotected void addTokenType(XMLStreamWriter writer) throws XMLStreamException
XMLStreamExceptionprotected void addClaims(XMLStreamWriter writer) throws Exception
Exceptionprotected SecurityToken createSecurityToken(Element el, byte[] requestorEntropy) throws org.apache.wss4j.common.ext.WSSecurityException, org.apache.xml.security.exceptions.Base64DecodingException
org.apache.wss4j.common.ext.WSSecurityExceptionorg.apache.xml.security.exceptions.Base64DecodingExceptionprotected byte[] decryptKey(Element child) throws TrustException, org.apache.wss4j.common.ext.WSSecurityException, org.apache.xml.security.exceptions.Base64DecodingException
TrustExceptionorg.apache.wss4j.common.ext.WSSecurityExceptionorg.apache.xml.security.exceptions.Base64DecodingExceptionprotected CallbackHandler createHandler()
protected org.apache.wss4j.common.crypto.Crypto createCrypto(boolean decrypt)
throws IOException,
org.apache.wss4j.common.ext.WSSecurityException
IOExceptionorg.apache.wss4j.common.ext.WSSecurityExceptionpublic void setTemplate(Element rstTemplate)
public void setClaims(Object rstClaims)
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)
public void setNamespace(String namespace)
Apache CXF