org.jboss.security.plugins
Interface JaasSecurityDomainMBean

All Superinterfaces:
org.jboss.system.Service, org.jboss.system.ServiceMBean
All Known Implementing Classes:
JaasSecurityDomain

public interface JaasSecurityDomainMBean
extends org.jboss.system.ServiceMBean

The JaasSecurityDomainMBean adds support for KeyStore management.

Version:
$Revision: 1.7 $
Author:
Scott.Stark@jboss.org, Jason Essington

Field Summary
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Method Summary
 byte[] decode(byte[] secret)
          Decode a secret using the keystore password and PBEwithMD5andDES algo
 byte[] decode64(String secret)
          Decode a secret using the keystore password and PBEwithMD5andDES algo
 byte[] encode(byte[] secret)
          Encode a secret using the keystore password and PBEwithMD5andDES algo
 String encode64(byte[] secret)
          Encode a secret using the keystore password and PBEwithMD5andDES algo
 String getKeyStoreType()
          KeyStore implementation type being used.
 String getKeyStoreURL()
          Get the KeyStore database URL string.
 javax.management.ObjectName getManagerServiceName()
          The JMX object name string of the security manager service.
 String getTrustStoreType()
          Get the type of the trust store
 String getTrustStoreURL()
          Get the trust store database URL string.
 void reloadKeyAndTrustStore()
          Reload the key- and truststore
 void setIterationCount(int count)
          Set the iteration count used with PBE based on the keystore password.
 void setKeyStorePass(String password)
          Set the credential string for the KeyStore.
 void setKeyStoreType(String type)
          Set the type of KeyStore implementation to use.
 void setKeyStoreURL(String storeURL)
          Set the KeyStore database URL string.
 void setManagerServiceName(javax.management.ObjectName jmxName)
          Set the JMX object name string of the security manager service.
 void setSalt(String salt)
          Set the salt used with PBE based on the keystore password.
 void setTrustStorePass(String password)
          Set the credential string for the trust store.
 void setTrustStoreType(String type)
          Set the type of the trust store
 void setTrustStoreURL(String storeURL)
          Set the trust store database URL string.
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Method Detail

getKeyStoreType

public String getKeyStoreType()
KeyStore implementation type being used.

Returns:
the KeyStore implementation type being used.

setKeyStoreType

public void setKeyStoreType(String type)
Set the type of KeyStore implementation to use. This is passed to the KeyStore.getInstance() factory method.


getKeyStoreURL

public String getKeyStoreURL()
Get the KeyStore database URL string.


setKeyStoreURL

public void setKeyStoreURL(String storeURL)
                    throws IOException
Set the KeyStore database URL string. This is used to obtain an InputStream to initialize the KeyStore.

Throws:
IOException

setKeyStorePass

public void setKeyStorePass(String password)
Set the credential string for the KeyStore.


getTrustStoreType

public String getTrustStoreType()
Get the type of the trust store

Returns:
the type of the trust store

setTrustStoreType

public void setTrustStoreType(String type)
Set the type of the trust store

Parameters:
type - - the trust store implementation type

setTrustStorePass

public void setTrustStorePass(String password)
Set the credential string for the trust store.


getTrustStoreURL

public String getTrustStoreURL()
Get the trust store database URL string.


setTrustStoreURL

public void setTrustStoreURL(String storeURL)
                      throws IOException
Set the trust store database URL string. This is used to obtain an InputStream to initialize the trust store.

Throws:
IOException

reloadKeyAndTrustStore

public void reloadKeyAndTrustStore()
                            throws Exception
Reload the key- and truststore

Throws:
Exception

getManagerServiceName

public javax.management.ObjectName getManagerServiceName()
The JMX object name string of the security manager service.

Returns:
The JMX object name string of the security manager service.

setManagerServiceName

public void setManagerServiceName(javax.management.ObjectName jmxName)
Set the JMX object name string of the security manager service.


setSalt

public void setSalt(String salt)
Set the salt used with PBE based on the keystore password.

Parameters:
salt - - an 8 char randomization string

setIterationCount

public void setIterationCount(int count)
Set the iteration count used with PBE based on the keystore password.

Parameters:
count - - an iteration count randomization value

encode

public byte[] encode(byte[] secret)
              throws Exception
Encode a secret using the keystore password and PBEwithMD5andDES algo

Parameters:
secret - - the byte sequence to encrypt
Returns:
the encrypted byte sequence
Throws:
Exception

decode

public byte[] decode(byte[] secret)
              throws Exception
Decode a secret using the keystore password and PBEwithMD5andDES algo

Parameters:
secret - - the byte sequence to decrypt
Returns:
the decrypted byte sequence
Throws:
Exception

encode64

public String encode64(byte[] secret)
                throws Exception
Encode a secret using the keystore password and PBEwithMD5andDES algo

Parameters:
secret - - the byte sequence to encrypt as a base64 string using the Util.tob64() function
Returns:
the encrypted byte sequence
Throws:
Exception

decode64

public byte[] decode64(String secret)
                throws Exception
Decode a secret using the keystore password and PBEwithMD5andDES algo

Parameters:
secret - - the Util.tob64 string represention to decrypt
Returns:
the decrypted byte sequence
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.