org.apache.geronimo.system.util
Class ConfiguredEncryption

java.lang.Object
  extended by org.apache.geronimo.crypto.AbstractEncryption
      extended by org.apache.geronimo.system.util.ConfiguredEncryption
All Implemented Interfaces:
Encryption, GBeanLifecycle

public class ConfiguredEncryption
extends AbstractEncryption
implements GBeanLifecycle

Like SimpleEncryption except it uses a stored secret key. If the key file is missing, it makes up a new one. WARNING: NOT RECOMMENDED. If you lose the secret key file your encrypted passwords will be unavailable. Instead, secure your operationg environment and use something like ldap or a database to store passwords in. To use, include something like this in the rmi-naming module of var/config/config.xml: var/security/ConfiguredSecretKey.ser ServerInfo


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
ConfiguredEncryption(String path, ServerInfo serverInfo)
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
static GBeanInfo getGBeanInfo()
           
protected  SecretKeySpec getSecretKeySpec()
           
 
Methods inherited from class org.apache.geronimo.crypto.AbstractEncryption
decrypt, encrypt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

ConfiguredEncryption

public ConfiguredEncryption(String path,
                            ServerInfo serverInfo)
                     throws IOException,
                            ClassNotFoundException
Throws:
IOException
ClassNotFoundException
Method Detail

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getSecretKeySpec

protected SecretKeySpec getSecretKeySpec()
Specified by:
getSecretKeySpec in class AbstractEncryption

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.