eu.emi.client
Class ClientSecurityProperties

java.lang.Object
  extended by eu.emi.client.ClientSecurityProperties
All Implemented Interfaces:
IAuthenticationConfiguration, IClientProperties, ISecurityConfiguration, Cloneable

public class ClientSecurityProperties
extends Object
implements IClientProperties

Author:
a.memon

Field Summary
static String REGISTRY_CHECKACCESS
          do we check access on the WSRF level?
static String REGISTRY_CHECKACCESS_PDP
          access control PDP class name (implementing de.fzj.uas.security.XacmlPDP)
static String REGISTRY_CHECKACCESS_PDPCONFIG
          configuration file for the PDP
static String REGISTRY_SSL_CLIENTAUTH
          property defining whether SSL is client authenticated
static String REGISTRY_SSL_ENABLED
          property defining whether SSL is enabled
static String REGISTRY_SSL_KEYALIAS
          property defining the alias of the key to use
static String REGISTRY_SSL_KEYPASS
          property defining the SSL keystore password
static String REGISTRY_SSL_KEYSTORE
          property defining the SSL keystore
static String REGISTRY_SSL_KEYTYPE
          property defining the SSL keystore type (e.g.
static String REGISTRY_SSL_TRUSTPASS
          property defining the SSL trust tore password
static String REGISTRY_SSL_TRUSTSTORE
          property defining the SSL trust store
static String REGISTRY_SSL_TRUSTTYPE
          property defining the SSL trust store type (e.g.
 
Constructor Summary
ClientSecurityProperties(Properties parent)
           
ClientSecurityProperties(Properties parent, InputStream is)
           
ClientSecurityProperties(Properties parent, Properties local)
           
ClientSecurityProperties(Properties parent, String propertiesFileName)
           
 
Method Summary
 ClientSecurityProperties clone()
          Makes a copy of these properties.
protected  String doGetProperty(String key)
          return named property.
 boolean doHttpAuthn()
          Returns true if HTTP BASIC Auth should be used.
 boolean doSignMessage()
          Digital signature mechanism can be disabled with this method returning false.
 boolean doSSLAuthn()
          Returns true if the client-side TLS authentication should be done.
 X509Certificate[] getCertificateChain()
          the user's certificate chain.
 ClassLoader getClassLoader()
          Get the classloader to be used e.g.
 Map<String,Object> getExtraSecurityTokens()
          For outgoing calls, get extra security information.
 Properties getExtraSettings()
          Returns additional settings which are used to set up the client call (e.g., HTTP client proxy settings or additional security handler settings)
 String getHttpPassword()
          Returns HTTP BASIC Auth user's password.
 String getHttpUser()
          Returns HTTP BASIC Auth user.
 String getInHandlerClassNames()
          Returns the names of the security handler classes for incoming messages, separated by a single space.
 String getKeystore()
          Returns keystore location.
 String getKeystoreAlias()
          Returns key alias in keystore.
 String getKeystoreKeyPassword()
          Returns key password in keystore.
 String getKeystorePassword()
          Returns keystore password.
 String getKeystoreType()
          Returns keystore type.
 String getOutHandlerClassNames()
          Returns the names of the security handler classes for outbound messages, separated by a single space.
 PrivateKey getPrivateKey()
          returns the private key entry identified by getKeystoreAlias() from the keystore
 X509Certificate getPublicKey()
          the user's certificate, equal to the first entry in the certificate chain (this is equivalent to calling getCertificateChain()[0])
 SSLContext getSSLContext()
          This method can return initialized SSLContext or null.
 String getTruststore()
          Returns truststore location.
 String getTruststorePassword()
          Returns truststore password.
 String getTruststoreType()
          Returns truststore type.
 boolean isSslEnabled()
          returns true if SSL mode is enabled.
SSL can be enabled by setting a property "unicore.wsrflite.ssl" to "true" in the wsrflite.xml file or by defining a system property
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REGISTRY_SSL_ENABLED

public static final String REGISTRY_SSL_ENABLED
property defining whether SSL is enabled

See Also:
Constant Field Values

REGISTRY_SSL_CLIENTAUTH

public static final String REGISTRY_SSL_CLIENTAUTH
property defining whether SSL is client authenticated

See Also:
Constant Field Values

REGISTRY_SSL_KEYSTORE

public static final String REGISTRY_SSL_KEYSTORE
property defining the SSL keystore

See Also:
Constant Field Values

REGISTRY_SSL_KEYPASS

public static final String REGISTRY_SSL_KEYPASS
property defining the SSL keystore password

See Also:
Constant Field Values

REGISTRY_SSL_KEYTYPE

public static final String REGISTRY_SSL_KEYTYPE
property defining the SSL keystore type (e.g. JKS)

See Also:
Constant Field Values

REGISTRY_SSL_KEYALIAS

public static final String REGISTRY_SSL_KEYALIAS
property defining the alias of the key to use

See Also:
Constant Field Values

REGISTRY_SSL_TRUSTSTORE

public static final String REGISTRY_SSL_TRUSTSTORE
property defining the SSL trust store

See Also:
Constant Field Values

REGISTRY_SSL_TRUSTPASS

public static final String REGISTRY_SSL_TRUSTPASS
property defining the SSL trust tore password

See Also:
Constant Field Values

REGISTRY_SSL_TRUSTTYPE

public static final String REGISTRY_SSL_TRUSTTYPE
property defining the SSL trust store type (e.g. JKS)

See Also:
Constant Field Values

REGISTRY_CHECKACCESS

public static final String REGISTRY_CHECKACCESS
do we check access on the WSRF level?

See Also:
Constant Field Values

REGISTRY_CHECKACCESS_PDP

public static final String REGISTRY_CHECKACCESS_PDP
access control PDP class name (implementing de.fzj.uas.security.XacmlPDP)

See Also:
Constant Field Values

REGISTRY_CHECKACCESS_PDPCONFIG

public static final String REGISTRY_CHECKACCESS_PDPCONFIG
configuration file for the PDP

See Also:
Constant Field Values
Constructor Detail

ClientSecurityProperties

public ClientSecurityProperties(Properties parent,
                                Properties local)
                         throws UnrecoverableKeyException,
                                KeyStoreException,
                                NoSuchAlgorithmException,
                                CertificateException,
                                IOException
Throws:
UnrecoverableKeyException
KeyStoreException
NoSuchAlgorithmException
CertificateException
IOException

ClientSecurityProperties

public ClientSecurityProperties(Properties parent)
                         throws UnrecoverableKeyException,
                                KeyStoreException,
                                NoSuchAlgorithmException,
                                CertificateException,
                                IOException
Throws:
UnrecoverableKeyException
KeyStoreException
NoSuchAlgorithmException
CertificateException
IOException

ClientSecurityProperties

public ClientSecurityProperties(Properties parent,
                                InputStream is)
                         throws UnrecoverableKeyException,
                                KeyStoreException,
                                NoSuchAlgorithmException,
                                CertificateException,
                                IOException
Throws:
UnrecoverableKeyException
KeyStoreException
NoSuchAlgorithmException
CertificateException
IOException

ClientSecurityProperties

public ClientSecurityProperties(Properties parent,
                                String propertiesFileName)
                         throws IOException,
                                UnrecoverableKeyException,
                                KeyStoreException,
                                NoSuchAlgorithmException,
                                CertificateException
Throws:
IOException
UnrecoverableKeyException
KeyStoreException
NoSuchAlgorithmException
CertificateException
Method Detail

clone

public ClientSecurityProperties clone()
Description copied from interface: IClientProperties
Makes a copy of these properties.

Specified by:
clone in interface IAuthenticationConfiguration
Specified by:
clone in interface IClientProperties
Specified by:
clone in interface ISecurityConfiguration
Overrides:
clone in class Object

doGetProperty

protected String doGetProperty(String key)
return named property. Lookup order: - own properties - Kernel.getKernel().getProperty()


isSslEnabled

public boolean isSslEnabled()
returns true if SSL mode is enabled.
SSL can be enabled by setting a property "unicore.wsrflite.ssl" to "true" in the wsrflite.xml file or by defining a system property

Specified by:
isSslEnabled in interface IClientProperties
Returns:

doSSLAuthn

public boolean doSSLAuthn()
Description copied from interface: IAuthenticationConfiguration
Returns true if the client-side TLS authentication should be done. If false then all (inherited from the super interface ISecurityConfiguration) getKeystore* methods are not used at all.

Specified by:
doSSLAuthn in interface IAuthenticationConfiguration
Returns:

getCertificateChain

public X509Certificate[] getCertificateChain()
Description copied from interface: IClientProperties
the user's certificate chain.

Specified by:
getCertificateChain in interface IClientProperties
Returns:
array of X509Certificates

getPublicKey

public X509Certificate getPublicKey()
Description copied from interface: IClientProperties
the user's certificate, equal to the first entry in the certificate chain (this is equivalent to calling getCertificateChain()[0])

Specified by:
getPublicKey in interface IClientProperties
Returns:
X509Certificate

getPrivateKey

public PrivateKey getPrivateKey()
returns the private key entry identified by getKeystoreAlias() from the keystore

Specified by:
getPrivateKey in interface IClientProperties
Returns:
PrivateKey

toString

public String toString()
Overrides:
toString in class Object

doSignMessage

public boolean doSignMessage()
Description copied from interface: IClientProperties
Digital signature mechanism can be disabled with this method returning false.

Specified by:
doSignMessage in interface IClientProperties

doHttpAuthn

public boolean doHttpAuthn()
Description copied from interface: IAuthenticationConfiguration
Returns true if HTTP BASIC Auth should be used.

Specified by:
doHttpAuthn in interface IAuthenticationConfiguration
Returns:

getHttpUser

public String getHttpUser()
Description copied from interface: IAuthenticationConfiguration
Returns HTTP BASIC Auth user. Required if doHttpAuthn is true.

Specified by:
getHttpUser in interface IAuthenticationConfiguration
Returns:

getHttpPassword

public String getHttpPassword()
Description copied from interface: IAuthenticationConfiguration
Returns HTTP BASIC Auth user's password. Required if doHttpAuthn is true.

Specified by:
getHttpPassword in interface IAuthenticationConfiguration
Returns:

getSSLContext

public SSLContext getSSLContext()
Description copied from interface: IAuthenticationConfiguration
This method can return initialized SSLContext or null. If null is returned then SSLContext will be created by this library itself using the data from the other methods defined in this interface. If this method returns non-null value then most of the methods in this interface are not used (only HTTP related are still used).

Specified by:
getSSLContext in interface IAuthenticationConfiguration
Returns:
initialized SSL context.

getKeystorePassword

public String getKeystorePassword()
Description copied from interface: ISecurityConfiguration
Returns keystore password.

Specified by:
getKeystorePassword in interface ISecurityConfiguration
Returns:

getKeystoreKeyPassword

public String getKeystoreKeyPassword()
Description copied from interface: ISecurityConfiguration
Returns key password in keystore.

Specified by:
getKeystoreKeyPassword in interface ISecurityConfiguration
Returns:

getKeystore

public String getKeystore()
Description copied from interface: ISecurityConfiguration
Returns keystore location.

Specified by:
getKeystore in interface ISecurityConfiguration
Returns:

getKeystoreType

public String getKeystoreType()
Description copied from interface: ISecurityConfiguration
Returns keystore type.

Specified by:
getKeystoreType in interface ISecurityConfiguration
Returns:

getKeystoreAlias

public String getKeystoreAlias()
Description copied from interface: ISecurityConfiguration
Returns key alias in keystore.

Specified by:
getKeystoreAlias in interface ISecurityConfiguration
Returns:

getTruststore

public String getTruststore()
Description copied from interface: IAuthenticationConfiguration
Returns truststore location. If this method returns null then (for SSL connections) client will trust ANY server certificate.

Specified by:
getTruststore in interface IAuthenticationConfiguration
Returns:

getTruststoreType

public String getTruststoreType()
Description copied from interface: IAuthenticationConfiguration
Returns truststore type.

Specified by:
getTruststoreType in interface IAuthenticationConfiguration
Returns:

getTruststorePassword

public String getTruststorePassword()
Description copied from interface: IAuthenticationConfiguration
Returns truststore password.

Specified by:
getTruststorePassword in interface IAuthenticationConfiguration
Returns:

getExtraSettings

public Properties getExtraSettings()
Description copied from interface: IClientProperties
Returns additional settings which are used to set up the client call (e.g., HTTP client proxy settings or additional security handler settings)

Specified by:
getExtraSettings in interface IClientProperties
Returns:
see above
See Also:
HttpUtils, XFireClientFactory

getOutHandlerClassNames

public String getOutHandlerClassNames()
Description copied from interface: IClientProperties
Returns the names of the security handler classes for outbound messages, separated by a single space.

Specified by:
getOutHandlerClassNames in interface IClientProperties

getInHandlerClassNames

public String getInHandlerClassNames()
Description copied from interface: IClientProperties
Returns the names of the security handler classes for incoming messages, separated by a single space.

Specified by:
getInHandlerClassNames in interface IClientProperties

getClassLoader

public ClassLoader getClassLoader()
Description copied from interface: IClientProperties
Get the classloader to be used e.g. for dynamically loading security handlers.

Specified by:
getClassLoader in interface IClientProperties

getExtraSecurityTokens

public Map<String,Object> getExtraSecurityTokens()
Description copied from interface: IClientProperties
For outgoing calls, get extra security information. This map is used whenever specialized objects are to be passed to the additional handlers which were configured by this class.

Specified by:
getExtraSecurityTokens in interface IClientProperties


Copyright © 2012 EMI. All Rights Reserved.