org.apache.rahas.impl
Class SAMLTokenIssuerConfig

java.lang.Object
  extended by org.apache.rahas.impl.AbstractIssuerConfig
      extended by org.apache.rahas.impl.SAMLTokenIssuerConfig

public class SAMLTokenIssuerConfig
extends AbstractIssuerConfig

Configuration manager for the SAMLTokenIssuer

See Also:
SAMLTokenIssuer

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.rahas.impl.AbstractIssuerConfig
AbstractIssuerConfig.KeyComputation
 
Field Summary
protected  SAMLCallbackHandler callbackHandler
           
protected  String callbackHandlerName
           
static QName ISSUER_NAME
           
protected  String issuerKeyAlias
           
protected  String issuerKeyPassword
           
protected  String issuerName
           
static QName SAML_CALLBACK_CLASS
           
static QName SAML_ISSUER_CONFIG
          The QName of the configuration element of the SAMLTokenIssuer
protected  Map trustedServices
           
protected  String trustStorePropFile
           
static QName USE_SAML_ATTRIBUTE_STATEMENT
           
 
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
SAMLTokenIssuerConfig(org.apache.axiom.om.OMElement elem)
          Create a SAMLTokenIssuer configuration using the give config element
SAMLTokenIssuerConfig(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 information
 
Method Summary
 void addTrustedServiceEndpointAddress(String address, String alias)
          Add a new trusted service endpoint address with its certificate
 SAMLCallbackHandler getCallbackHander()
          Deprecated. 
 SAMLCallbackHandler getCallbackHandler()
           
 String getCallbackHandlerName()
           
 String getIssuerKeyAlias()
           
 String getIssuerKeyPassword()
           
 org.apache.axis2.description.Parameter getParameter()
          Generate an Axis2 parameter for this configuration
 X509Certificate getServiceCert(org.apache.ws.security.components.crypto.Crypto crypto, String serviceAddress)
          Uses the wst:AppliesTo to figure out the certificate to encrypt the secret in the SAML token
 Map getTrustedServices()
          Return the list of trusted services as a java.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 mechanisms
 void 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
getKeyComputation, getKeySize, getProofKeyType, setAddRequestedAttachedRef, setAddRequestedUnattachedRef, setKeyComputation, setKeySize, setProofKeyType, setTtl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAML_ISSUER_CONFIG

public static final QName SAML_ISSUER_CONFIG
The QName of the configuration element of the SAMLTokenIssuer


USE_SAML_ATTRIBUTE_STATEMENT

public static final QName USE_SAML_ATTRIBUTE_STATEMENT

ISSUER_NAME

public static final QName ISSUER_NAME

SAML_CALLBACK_CLASS

public static final QName SAML_CALLBACK_CLASS

issuerKeyAlias

protected String issuerKeyAlias

issuerKeyPassword

protected String issuerKeyPassword

issuerName

protected String issuerName

trustedServices

protected Map trustedServices

trustStorePropFile

protected String trustStorePropFile

callbackHandler

protected SAMLCallbackHandler callbackHandler

callbackHandlerName

protected String callbackHandlerName
Constructor Detail

SAMLTokenIssuerConfig

public SAMLTokenIssuerConfig(String issuerName,
                             String cryptoProviderClassName,
                             Properties cryptoProps)
Create a new configuration with issuer name and crypto information

Parameters:
issuerName - Name of the issuer
cryptoProviderClassName - WSS4J Crypto impl class name
cryptoProps - Configuration properties of crypto impl

SAMLTokenIssuerConfig

public SAMLTokenIssuerConfig(String configFilePath)
                      throws TrustException
Create a SAMLTokenIssuer configuration with a config file picked from the given location.

Parameters:
configFilePath - Path to the config file
Throws:
TrustException

SAMLTokenIssuerConfig

public SAMLTokenIssuerConfig(org.apache.axiom.om.OMElement elem)
                      throws TrustException
Create a SAMLTokenIssuer configuration using the give config element

Parameters:
elem - Configuration element as an OMElement
Throws:
TrustException
Method Detail

getParameter

public org.apache.axis2.description.Parameter getParameter()
Generate an Axis2 parameter for this configuration

Returns:
An Axis2 Parameter instance with configuration information

setIssuerKeyAlias

public void setIssuerKeyAlias(String issuerKeyAlias)

getIssuerKeyAlias

public String getIssuerKeyAlias()

setIssuerKeyPassword

public void setIssuerKeyPassword(String issuerKeyPassword)

getIssuerKeyPassword

public String getIssuerKeyPassword()

setIssuerName

public void setIssuerName(String issuerName)

setTrustedServices

public void setTrustedServices(Map trustedServices)

setTrustStorePropFile

public void setTrustStorePropFile(String trustStorePropFile)

addTrustedServiceEndpointAddress

public void addTrustedServiceEndpointAddress(String address,
                                             String alias)
Add a new trusted service endpoint address with its certificate

Parameters:
address - Service endpoint address
alias - certificate alias

setCryptoProperties

public void setCryptoProperties(String providerClassName,
                                Properties props)
Set crypto information using WSS4J mechanisms

Parameters:
providerClassName - Provider class - an implementation of org.apache.ws.security.components.crypto.Crypto
props - Configuration properties

getTrustedServices

public Map getTrustedServices()
Return the list of trusted services as a java.util.Map. The services addresses are the keys and cert aliases available under those keys.

Returns:

getCallbackHander

@Deprecated
public SAMLCallbackHandler getCallbackHander()
Deprecated. 


setCallbackHander

@Deprecated
public void setCallbackHander(SAMLCallbackHandler callbackHandler)
Deprecated. 


getCallbackHandler

public SAMLCallbackHandler getCallbackHandler()

setCallbackHandler

public void setCallbackHandler(SAMLCallbackHandler callbackHandler)

getCallbackHandlerName

public String getCallbackHandlerName()

setCallbackHandlerName

public void setCallbackHandlerName(String callbackHandlerName)

getServiceCert

public X509Certificate getServiceCert(org.apache.ws.security.components.crypto.Crypto crypto,
                                      String serviceAddress)
                               throws TrustException
Uses the wst: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.


Copyright © Apache Software Foundation. All Rights Reserved.