|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.security.plugins.JaasSecurityManager
org.jboss.security.plugins.JaasSecurityDomain
public class JaasSecurityDomain
The JaasSecurityDomain is an extension of JaasSecurityManager that addes the notion of a KeyStore, and JSSE KeyManagerFactory and TrustManagerFactory for supporting SSL and other cryptographic use cases. Attributes:
Field Summary |
---|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
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 |
Constructor Summary | |
---|---|
JaasSecurityDomain()
Creates a default JaasSecurityDomain for with a securityDomain name of 'other'. |
|
JaasSecurityDomain(String securityDomain)
Creates a JaasSecurityDomain for with a securityDomain name of that given by the 'securityDomain' argument. |
|
JaasSecurityDomain(String securityDomain,
CallbackHandler handler)
Creates a JaasSecurityDomain for with a securityDomain name of that given by the 'securityDomain' argument. |
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 |
getCipherAlgorithm()
Obtains the cypher algorithm used in then encode and decode operations. |
KeyManagerFactory |
getKeyManagerFactory()
|
KeyStore |
getKeyStore()
|
String |
getKeyStoreAlias()
Get the alias of the KeyStore. |
String |
getKeyStoreType()
KeyStore implementation type being used. |
String |
getKeyStoreURL()
Get the KeyStore database URL string. |
ObjectName |
getManagerServiceName()
The JMX object name string of the security manager service. |
String |
getName()
|
String |
getSecurityDomain()
Get the name of the security domain associated with this security mgr. |
org.jboss.security.ISecurityManagement |
getSecurityManagement()
Obtains a reference to the ISecurityManagement implementation that registered this domain. |
TrustManagerFactory |
getTrustManagerFactory()
|
KeyStore |
getTrustStore()
|
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 |
setCipherAlgorithm(String cipherAlgorithm)
Sets the cipher algorithm to be used in the encode and decode operations. |
void |
setIterationCount(int iterationCount)
Set the iteration count used with PBE based on the keystore password. |
void |
setKeyStoreAlias(String alias)
Set the alias of the KeyStore. |
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(ObjectName managerServiceName)
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 |
setSecurityManagement(org.jboss.security.ISecurityManagement securityManagement)
Sets the ISecurityManagement implementation that must be used to register this domain. |
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. |
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.security.plugins.JaasSecurityManager |
---|
doesUserHaveRole, flushCache, getActiveSubject, getPrincipal, getTargetPrincipal, getUserRoles, isValid, isValid, setCachePolicy, setDeepCopySubjectOption |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.security.AuthenticationManager |
---|
getActiveSubject, getTargetPrincipal, isValid, isValid |
Methods inherited from interface org.jboss.security.RealmMapping |
---|
doesUserHaveRole, getPrincipal, getUserRoles |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Constructor Detail |
---|
public JaasSecurityDomain()
public JaasSecurityDomain(String securityDomain)
securityDomain
- , the name of the security domainpublic JaasSecurityDomain(String securityDomain, CallbackHandler handler)
securityDomain
- , the name of the security domainhandler
- , the CallbackHandler to use to obtain login module infoMethod Detail |
---|
public String getSecurityDomain()
JaasSecurityManager
getSecurityDomain
in interface org.jboss.security.BaseSecurityManager
getSecurityDomain
in class JaasSecurityManager
public String getKeyStoreType()
JaasSecurityDomainMBean
getKeyStoreType
in interface JaasSecurityDomainMBean
public void setKeyStoreType(String type)
JaasSecurityDomainMBean
setKeyStoreType
in interface JaasSecurityDomainMBean
public String getKeyStoreURL()
JaasSecurityDomainMBean
getKeyStoreURL
in interface JaasSecurityDomainMBean
public void setKeyStoreURL(String storeURL) throws IOException
JaasSecurityDomainMBean
setKeyStoreURL
in interface JaasSecurityDomainMBean
IOException
public void setKeyStorePass(String password) throws Exception
JaasSecurityDomainMBean
setKeyStorePass
in interface JaasSecurityDomainMBean
Exception
public String getKeyStoreAlias()
JaasSecurityDomainMBean
getKeyStoreAlias
in interface JaasSecurityDomainMBean
public void setKeyStoreAlias(String alias)
JaasSecurityDomainMBean
setKeyStoreAlias
in interface JaasSecurityDomainMBean
public String getTrustStoreType()
JaasSecurityDomainMBean
getTrustStoreType
in interface JaasSecurityDomainMBean
public void setTrustStoreType(String type)
JaasSecurityDomainMBean
setTrustStoreType
in interface JaasSecurityDomainMBean
type
- - the trust store implementation typepublic String getTrustStoreURL()
JaasSecurityDomainMBean
getTrustStoreURL
in interface JaasSecurityDomainMBean
public void setTrustStoreURL(String storeURL) throws IOException
JaasSecurityDomainMBean
setTrustStoreURL
in interface JaasSecurityDomainMBean
IOException
public void setTrustStorePass(String password) throws Exception
JaasSecurityDomainMBean
setTrustStorePass
in interface JaasSecurityDomainMBean
Exception
public void setSalt(String salt)
JaasSecurityDomainMBean
setSalt
in interface JaasSecurityDomainMBean
salt
- - an 8 char randomization stringpublic void setIterationCount(int iterationCount)
JaasSecurityDomainMBean
setIterationCount
in interface JaasSecurityDomainMBean
iterationCount
- - an iteration count randomization valuepublic String getCipherAlgorithm()
Obtains the cypher algorithm used in then encode and decode operations.
String
representing the name of the cipher algorithm.public void setCipherAlgorithm(String cipherAlgorithm)
Sets the cipher algorithm to be used in the encode and decode operations.
cipherAlgorithm
- a String
representing the name of the cipher algorithm.public ObjectName getManagerServiceName()
getManagerServiceName
in interface JaasSecurityDomainMBean
public void setManagerServiceName(ObjectName managerServiceName)
setManagerServiceName
in interface JaasSecurityDomainMBean
public org.jboss.security.ISecurityManagement getSecurityManagement()
Obtains a reference to the ISecurityManagement
implementation that registered this domain.
ISecurityManagement
bean.public void setSecurityManagement(org.jboss.security.ISecurityManagement securityManagement)
Sets the ISecurityManagement
implementation that must be used to register this domain.
securityManagement
- a reference to the ISecurityManagement
be to be used.public String getName()
getName
in interface ServiceMBean
getName
in class ServiceMBeanSupport
public KeyStore getKeyStore() throws SecurityException
getKeyStore
in interface org.jboss.security.SecurityDomain
SecurityException
public KeyManagerFactory getKeyManagerFactory() throws SecurityException
getKeyManagerFactory
in interface org.jboss.security.SecurityDomain
SecurityException
public KeyStore getTrustStore() throws SecurityException
getTrustStore
in interface org.jboss.security.SecurityDomain
SecurityException
public TrustManagerFactory getTrustManagerFactory() throws SecurityException
getTrustManagerFactory
in interface org.jboss.security.SecurityDomain
SecurityException
public byte[] encode(byte[] secret) throws Exception
JaasSecurityDomainMBean
encode
in interface JaasSecurityDomainMBean
secret
- - the byte sequence to encrypt
Exception
public byte[] decode(byte[] secret) throws Exception
JaasSecurityDomainMBean
decode
in interface JaasSecurityDomainMBean
secret
- - the byte sequence to decrypt
Exception
public String encode64(byte[] secret) throws Exception
JaasSecurityDomainMBean
encode64
in interface JaasSecurityDomainMBean
secret
- - the byte sequence to encrypt as a base64 string using
the Util.tob64() function
Exception
public byte[] decode64(String secret) throws Exception
JaasSecurityDomainMBean
decode64
in interface JaasSecurityDomainMBean
secret
- - the Util.tob64 string represention to decrypt
Exception
public void reloadKeyAndTrustStore() throws Exception
JaasSecurityDomainMBean
reloadKeyAndTrustStore
in interface JaasSecurityDomainMBean
Exception
protected void startService() throws Exception
startService
in class ServiceMBeanSupport
Exception
protected void stopService()
stopService
in class ServiceMBeanSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |