Package org.apache.cxf.sts
Class StaticSTSProperties
- java.lang.Object
-
- org.apache.cxf.sts.StaticSTSProperties
-
- All Implemented Interfaces:
STSPropertiesMBean
public class StaticSTSProperties extends Object implements STSPropertiesMBean
A static implementation of the STSPropertiesMBean.
-
-
Constructor Summary
Constructors Constructor Description StaticSTSProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureProperties()Load the CallbackHandler, Crypto objects, if necessary.BusgetBus()CallbackHandlergetCallbackHandler()Get the CallbackHandler object.StringgetCallbackHandlerClass()org.apache.wss4j.common.crypto.CryptogetEncryptionCrypto()Get the encryption Crypto objectObjectgetEncryptionCryptoProperties()EncryptionPropertiesgetEncryptionProperties()Get the EncryptionProperties to use.StringgetEncryptionUsername()Get the username/alias to use to encrypt any issued tokens.IdentityMappergetIdentityMapper()Get the IdentityMapper object to use.StringgetIssuer()Get the STS issuer nameRealmParsergetRealmParser()Get the RealmParser object to use.RelationshipResolvergetRelationshipResolver()Get the RelationshipResolver objects to use.List<Relationship>getRelationships()Get the list of Relationship objects to use.SAMLRealmCodecgetSamlRealmCodec()Get the SAML Realm Codec object to use.org.apache.wss4j.common.crypto.CryptogetSignatureCrypto()Get the signature Crypto objectObjectgetSignatureCryptoProperties()SignaturePropertiesgetSignatureProperties()Get the SignatureProperties to use.StringgetSignatureUsername()Get the username/alias to use to sign any issued tokensbooleanisValidateUseKey()Get whether to validate a client Public Key or Certificate presented as part of a UseKey element.voidsetBus(Bus bus)voidsetCallbackHandler(CallbackHandler callbackHandler)Set the CallbackHandler object.voidsetCallbackHandlerClass(String callbackHandlerClass)Set the String corresponding to the CallbackHandler class.voidsetEncryptionCrypto(org.apache.wss4j.common.crypto.Crypto encryptionCrypto)Set the encryption Crypto objectvoidsetEncryptionCryptoProperties(Object encryptionCryptoProperties)Set the Object corresponding to the encryption Properties class.voidsetEncryptionProperties(EncryptionProperties encryptionProperties)Set the EncryptionProperties to use.voidsetEncryptionUsername(String encryptionUsername)Set the username/alias to use to encrypt any issued tokens.voidsetIdentityMapper(IdentityMapper identityMapper)Set the IdentityMapper object to use.voidsetIssuer(String issuer)Set the STS issuer namevoidsetRealmParser(RealmParser realmParser)Set the RealmParser object to use.voidsetRelationships(List<Relationship> relationships)Set the list of Relationship objects to use.voidsetSamlRealmCodec(SAMLRealmCodec samlRealmCodec)Set the SAML Realm Codec object to use.voidsetSignatureCrypto(org.apache.wss4j.common.crypto.Crypto signatureCrypto)Set the signature Crypto objectvoidsetSignatureCryptoProperties(Object signatureCryptoProperties)Set the Object corresponding to the signature Properties class.voidsetSignatureProperties(SignatureProperties signatureProperties)Set the SignatureProperties to use.voidsetSignatureUsername(String signatureUsername)Set the username/alias to use to sign any issued tokensvoidsetValidateUseKey(boolean validateUseKey)Set whether to validate a client Public Key or Certificate presented as part of a UseKey element.
-
-
-
Method Detail
-
configureProperties
public void configureProperties() throws STSExceptionLoad the CallbackHandler, Crypto objects, if necessary.- Specified by:
configurePropertiesin interfaceSTSPropertiesMBean- Throws:
STSException
-
setCallbackHandler
public void setCallbackHandler(CallbackHandler callbackHandler)
Set the CallbackHandler object.- Specified by:
setCallbackHandlerin interfaceSTSPropertiesMBean- Parameters:
callbackHandler- the CallbackHandler object.
-
setCallbackHandlerClass
public void setCallbackHandlerClass(String callbackHandlerClass)
Set the String corresponding to the CallbackHandler class.- Parameters:
callbackHandlerClass- the String corresponding to the CallbackHandler class.
-
getCallbackHandlerClass
public String getCallbackHandlerClass()
-
getCallbackHandler
public CallbackHandler getCallbackHandler()
Get the CallbackHandler object.- Specified by:
getCallbackHandlerin interfaceSTSPropertiesMBean- Returns:
- the CallbackHandler object.
-
setSignatureCrypto
public void setSignatureCrypto(org.apache.wss4j.common.crypto.Crypto signatureCrypto)
Set the signature Crypto object- Specified by:
setSignatureCryptoin interfaceSTSPropertiesMBean- Parameters:
signatureCrypto- the signature Crypto object
-
setSignatureCryptoProperties
public void setSignatureCryptoProperties(Object signatureCryptoProperties)
Set the Object corresponding to the signature Properties class. It can be a String corresponding to a filename, a Properties object, or a URL.- Parameters:
signatureCryptoProperties- the object corresponding to the signature properties
-
getSignatureCryptoProperties
public Object getSignatureCryptoProperties()
-
getSignatureCrypto
public org.apache.wss4j.common.crypto.Crypto getSignatureCrypto()
Get the signature Crypto object- Specified by:
getSignatureCryptoin interfaceSTSPropertiesMBean- Returns:
- the signature Crypto object
-
setSignatureUsername
public void setSignatureUsername(String signatureUsername)
Set the username/alias to use to sign any issued tokens- Specified by:
setSignatureUsernamein interfaceSTSPropertiesMBean- Parameters:
signatureUsername- the username/alias to use to sign any issued tokens
-
getSignatureUsername
public String getSignatureUsername()
Get the username/alias to use to sign any issued tokens- Specified by:
getSignatureUsernamein interfaceSTSPropertiesMBean- Returns:
- the username/alias to use to sign any issued tokens
-
setEncryptionCrypto
public void setEncryptionCrypto(org.apache.wss4j.common.crypto.Crypto encryptionCrypto)
Set the encryption Crypto object- Specified by:
setEncryptionCryptoin interfaceSTSPropertiesMBean- Parameters:
encryptionCrypto- the encryption Crypto object
-
setEncryptionCryptoProperties
public void setEncryptionCryptoProperties(Object encryptionCryptoProperties)
Set the Object corresponding to the encryption Properties class. It can be a String corresponding to a filename, a Properties object, or a URL.- Parameters:
encryptionCryptoProperties- the object corresponding to the encryption properties
-
getEncryptionCryptoProperties
public Object getEncryptionCryptoProperties()
-
getEncryptionCrypto
public org.apache.wss4j.common.crypto.Crypto getEncryptionCrypto()
Get the encryption Crypto object- Specified by:
getEncryptionCryptoin interfaceSTSPropertiesMBean- Returns:
- the encryption Crypto object
-
setEncryptionUsername
public void setEncryptionUsername(String encryptionUsername)
Set the username/alias to use to encrypt any issued tokens. This is a default value - it can be configured per Service in the ServiceMBean.- Specified by:
setEncryptionUsernamein interfaceSTSPropertiesMBean- Parameters:
encryptionUsername- the username/alias to use to encrypt any issued tokens
-
getEncryptionUsername
public String getEncryptionUsername()
Get the username/alias to use to encrypt any issued tokens. This is a default value - it can be configured per Service in the ServiceMBean- Specified by:
getEncryptionUsernamein interfaceSTSPropertiesMBean- Returns:
- the username/alias to use to encrypt any issued tokens
-
setEncryptionProperties
public void setEncryptionProperties(EncryptionProperties encryptionProperties)
Set the EncryptionProperties to use.- Specified by:
setEncryptionPropertiesin interfaceSTSPropertiesMBean- Parameters:
encryptionProperties- the EncryptionProperties to use.
-
getEncryptionProperties
public EncryptionProperties getEncryptionProperties()
Get the EncryptionProperties to use.- Specified by:
getEncryptionPropertiesin interfaceSTSPropertiesMBean- Returns:
- the EncryptionProperties to use.
-
setIssuer
public void setIssuer(String issuer)
Set the STS issuer name- Specified by:
setIssuerin interfaceSTSPropertiesMBean- Parameters:
issuer- the STS issuer name
-
getIssuer
public String getIssuer()
Get the STS issuer name- Specified by:
getIssuerin interfaceSTSPropertiesMBean- Returns:
- the STS issuer name
-
setSignatureProperties
public void setSignatureProperties(SignatureProperties signatureProperties)
Set the SignatureProperties to use.- Specified by:
setSignaturePropertiesin interfaceSTSPropertiesMBean- Parameters:
signatureProperties- the SignatureProperties to use.
-
getSignatureProperties
public SignatureProperties getSignatureProperties()
Get the SignatureProperties to use.- Specified by:
getSignaturePropertiesin interfaceSTSPropertiesMBean- Returns:
- the SignatureProperties to use.
-
setRealmParser
public void setRealmParser(RealmParser realmParser)
Set the RealmParser object to use.- Specified by:
setRealmParserin interfaceSTSPropertiesMBean- Parameters:
realmParser- the RealmParser object to use.
-
getRealmParser
public RealmParser getRealmParser()
Get the RealmParser object to use.- Specified by:
getRealmParserin interfaceSTSPropertiesMBean- Returns:
- the RealmParser object to use.
-
setIdentityMapper
public void setIdentityMapper(IdentityMapper identityMapper)
Set the IdentityMapper object to use.- Specified by:
setIdentityMapperin interfaceSTSPropertiesMBean- Parameters:
identityMapper- the IdentityMapper object to use.
-
getIdentityMapper
public IdentityMapper getIdentityMapper()
Get the IdentityMapper object to use.- Specified by:
getIdentityMapperin interfaceSTSPropertiesMBean- Returns:
- the IdentityMapper object to use.
-
setRelationships
public void setRelationships(List<Relationship> relationships)
Description copied from interface:STSPropertiesMBeanSet the list of Relationship objects to use.- Specified by:
setRelationshipsin interfaceSTSPropertiesMBean- Parameters:
relationships- the Listobject to use.
-
getRelationships
public List<Relationship> getRelationships()
Description copied from interface:STSPropertiesMBeanGet the list of Relationship objects to use.- Specified by:
getRelationshipsin interfaceSTSPropertiesMBean- Returns:
- the List
object to use.
-
getRelationshipResolver
public RelationshipResolver getRelationshipResolver()
Description copied from interface:STSPropertiesMBeanGet the RelationshipResolver objects to use.- Specified by:
getRelationshipResolverin interfaceSTSPropertiesMBean- Returns:
- the RelationshipResolver object to use.
-
getSamlRealmCodec
public SAMLRealmCodec getSamlRealmCodec()
Description copied from interface:STSPropertiesMBeanGet the SAML Realm Codec object to use.- Specified by:
getSamlRealmCodecin interfaceSTSPropertiesMBean- Returns:
- the SAMLRealmCodec object to use.
-
setSamlRealmCodec
public void setSamlRealmCodec(SAMLRealmCodec samlRealmCodec)
Description copied from interface:STSPropertiesMBeanSet the SAML Realm Codec object to use.- Specified by:
setSamlRealmCodecin interfaceSTSPropertiesMBean- Parameters:
samlRealmCodec- the SAMLRealmCodec object to use.
-
getBus
public Bus getBus()
-
setBus
public void setBus(Bus bus)
-
isValidateUseKey
public boolean isValidateUseKey()
Get whether to validate a client Public Key or Certificate presented as part of a UseKey element. This is true by default.- Specified by:
isValidateUseKeyin interfaceSTSPropertiesMBean
-
setValidateUseKey
public void setValidateUseKey(boolean validateUseKey)
Set whether to validate a client Public Key or Certificate presented as part of a UseKey element. If this is set to true (the default), the public key must be trusted by the Signature Crypto of the STS.- Specified by:
setValidateUseKeyin interfaceSTSPropertiesMBean- Parameters:
validateUseKey- whether to validate a client UseKey or not.
-
-