Package org.apache.rahas.impl
Class SAMLTokenIssuerConfig
java.lang.Object
org.apache.rahas.impl.AbstractIssuerConfig
org.apache.rahas.impl.SAMLTokenIssuerConfig
Configuration manager for the
SAMLTokenIssuer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.rahas.impl.AbstractIssuerConfig
AbstractIssuerConfig.KeyComputation
-
Field Summary
Modifier and TypeFieldDescriptionprotected SAMLCallbackHandler
protected String
static final QName
protected String
protected String
protected String
static final QName
static final QName
The QName of the configuration element of the SAMLTokenIssuerprotected Map
protected String
static final QName
Fields inherited from class org.apache.rahas.impl.AbstractIssuerConfig
ADD_REQUESTED_ATTACHED_REF, ADD_REQUESTED_UNATTACHED_REF, addRequestedAttachedRef, addRequestedUnattachedRef, CRYPTO, CRYPTO_PROPERTIES, cryptoElement, cryptoPropertiesElement, cryptoPropertiesFile, keyComputation, keySize, PROOF_KEY_TYPE, proofKeyType, PROPERTY, PROVIDER, ttl
-
Constructor Summary
ConstructorDescriptionSAMLTokenIssuerConfig
(String configFilePath) Create a SAMLTokenIssuer configuration with a config file picked from the given location.SAMLTokenIssuerConfig
(String issuerName, String cryptoProviderClassName, Properties cryptoProps) Create a new configuration with issuer name and crypto informationSAMLTokenIssuerConfig
(org.apache.axiom.om.OMElement elem) Create a SAMLTokenIssuer configuration using the give config element -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTrustedServiceEndpointAddress
(String address, String alias) Add a new trusted service endpoint address with its certificateDeprecated.org.apache.wss4j.common.crypto.Crypto
getIssuerCrypto
(ClassLoader classLoader) This method will create a Crypto object based on property values defined in cryptoElement or cryptoPropertiesFile.org.apache.axis2.description.Parameter
Generate an Axis2 parameter for this configurationgetServiceCert
(org.apache.wss4j.common.crypto.Crypto crypto, String serviceAddress) Uses thewst:AppliesTo
to figure out the certificate to encrypt the secret in the SAML tokenReturn the list of trusted services as ajava.util.Map
.void
setCallbackHander
(SAMLCallbackHandler callbackHandler) Deprecated.void
setCallbackHandler
(SAMLCallbackHandler callbackHandler) void
setCallbackHandlerName
(String callbackHandlerName) void
setCryptoProperties
(String providerClassName, Properties props) Set crypto information using WSS4J mechanismsvoid
setIssuerKeyAlias
(String issuerKeyAlias) void
setIssuerKeyPassword
(String issuerKeyPassword) void
setIssuerName
(String issuerName) void
setTrustedServices
(Map trustedServices) void
setTrustStorePropFile
(String trustStorePropFile) Methods inherited from class org.apache.rahas.impl.AbstractIssuerConfig
getCryptoElement, getCryptoPropertiesElement, getCryptoPropertiesFile, getKeyComputation, getKeySize, getProofKeyType, getTtl, isAddRequestedAttachedRef, isAddRequestedUnattachedRef, setAddRequestedAttachedRef, setAddRequestedUnattachedRef, setKeyComputation, setKeySize, setProofKeyType, setTtl
-
Field Details
-
SAML_ISSUER_CONFIG
The QName of the configuration element of the SAMLTokenIssuer -
USE_SAML_ATTRIBUTE_STATEMENT
-
ISSUER_NAME
-
SAML_CALLBACK_CLASS
-
issuerKeyAlias
-
issuerKeyPassword
-
issuerName
-
trustedServices
-
trustStorePropFile
-
callbackHandler
-
callbackHandlerName
-
-
Constructor Details
-
SAMLTokenIssuerConfig
public SAMLTokenIssuerConfig(String issuerName, String cryptoProviderClassName, Properties cryptoProps) Create a new configuration with issuer name and crypto information- Parameters:
issuerName
- Name of the issuercryptoProviderClassName
- WSS4J Crypto impl class namecryptoProps
- Configuration properties of crypto impl
-
SAMLTokenIssuerConfig
Create a SAMLTokenIssuer configuration with a config file picked from the given location.- Parameters:
configFilePath
- Path to the config file- Throws:
TrustException
-
SAMLTokenIssuerConfig
Create a SAMLTokenIssuer configuration using the give config element- Parameters:
elem
- Configuration element as anOMElement
- Throws:
TrustException
-
-
Method Details
-
getParameter
public org.apache.axis2.description.Parameter getParameter()Generate an Axis2 parameter for this configuration- Returns:
- An Axis2 Parameter instance with configuration information
-
setIssuerKeyAlias
-
getIssuerKeyAlias
-
setIssuerKeyPassword
-
getIssuerKeyPassword
-
setIssuerName
-
setTrustedServices
-
setTrustStorePropFile
-
addTrustedServiceEndpointAddress
Add a new trusted service endpoint address with its certificate- Parameters:
address
- Service endpoint addressalias
- certificate alias
-
setCryptoProperties
Set crypto information using WSS4J mechanisms- Parameters:
providerClassName
- Provider class - an implementation of org.apache.ws.security.components.crypto.Cryptoprops
- Configuration properties
-
getTrustedServices
Return the list of trusted services as ajava.util.Map
. The services addresses are the keys and cert aliases available under those keys.- Returns:
-
getCallbackHander
Deprecated. -
setCallbackHander
Deprecated. -
getCallbackHandler
-
getIssuerName
-
getTrustStorePropFile
-
setCallbackHandler
-
getCallbackHandlerName
-
setCallbackHandlerName
-
getServiceCert
public X509Certificate getServiceCert(org.apache.wss4j.common.crypto.Crypto crypto, String serviceAddress) throws TrustException Uses thewst:AppliesTo
to figure out the certificate to encrypt the secret in the SAML token- Parameters:
crypto
-serviceAddress
- The address of the service- Returns:
- Throws:
TrustException
- If unable to find certificate by given alias.
-
getIssuerCrypto
public org.apache.wss4j.common.crypto.Crypto getIssuerCrypto(ClassLoader classLoader) throws TrustException This method will create a Crypto object based on property values defined in cryptoElement or cryptoPropertiesFile.- Parameters:
classLoader
- A class loader to pass into CryptoFactory.- Returns:
- A Crypto object
- Throws:
TrustException
- If an error occurred while creating the Crypto object.
-