de.fzj.unicore.wsrflite.security
Class SecurityProperties

java.lang.Object
  extended by de.fzj.unicore.wsrflite.security.DefaultSecurityProperties
      extended by de.fzj.unicore.wsrflite.security.SecurityProperties
All Implemented Interfaces:
ISecurityProperties, Cloneable

public class SecurityProperties
extends DefaultSecurityProperties

Properties that can be configured from a file or an input stream

Author:
schuller

Field Summary
 
Fields inherited from interface de.fzj.unicore.wsrflite.security.ISecurityProperties
WSRF_SSL, WSRF_SSL_CLIENTAUTH, WSRF_SSL_KEYALIAS, WSRF_SSL_KEYPASS, WSRF_SSL_KEYSTORE, WSRF_SSL_KEYTYPE, WSRF_SSL_TRUSTPASS, WSRF_SSL_TRUSTSTORE, WSRF_SSL_TRUSTTYPE
 
Constructor Summary
SecurityProperties()
           
SecurityProperties(InputStream is)
          construct SecurityProperties, reading from the supplied input stream
SecurityProperties(String fileName)
          construct SecurityProperties reading from the given file
 
Method Summary
protected  String doGetProperty(String key)
          Returns a system property.
 boolean isSslClientAuthenticated()
          returns true if SSL client authentication mode is enabled.
 boolean isSslEnabled()
          returns true if SSL mode is enabled.
 void setProperty(String key, String value)
          Allows for setting individual security properties
 
Methods inherited from class de.fzj.unicore.wsrflite.security.DefaultSecurityProperties
clone, getKeystore, getKeystoreAlias, getKeystorePassword, getKeystoreType, getTruststore, getTruststorePassword, getTruststoreType, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecurityProperties

public SecurityProperties(String fileName)
                   throws Exception
construct SecurityProperties reading from the given file

Parameters:
fileName -
Throws:
Exception

SecurityProperties

public SecurityProperties(InputStream is)
                   throws Exception
construct SecurityProperties, reading from the supplied input stream

Parameters:
is - InputStream
Throws:
Exception

SecurityProperties

public SecurityProperties()
Method Detail

doGetProperty

protected String doGetProperty(String key)
Description copied from class: DefaultSecurityProperties
Returns a system property. Override this in subclasses

Overrides:
doGetProperty in class DefaultSecurityProperties
Returns:
property value

isSslClientAuthenticated

public boolean isSslClientAuthenticated()
Description copied from interface: ISecurityProperties
returns true if SSL client authentication mode is enabled.
can be enabled by setting a property "unicore.wsrflite.ssl.clientauth" to "true" in the service.xml file or by defining a system property

Specified by:
isSslClientAuthenticated in interface ISecurityProperties
Overrides:
isSslClientAuthenticated in class DefaultSecurityProperties
Returns:

isSslEnabled

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

Specified by:
isSslEnabled in interface ISecurityProperties
Overrides:
isSslEnabled in class DefaultSecurityProperties
Returns:

setProperty

public void setProperty(String key,
                        String value)
Allows for setting individual security properties



Copyright © 2010. All Rights Reserved.