|
||||||||||
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:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jboss.security.plugins.JaasSecurityManager |
---|
JaasSecurityManager.DomainInfo |
Field Summary |
---|
Fields inherited from class org.jboss.security.plugins.JaasSecurityManager |
---|
log, trace |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
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)
Decrypt the secret using the cipherKey. |
byte[] |
decode64(String secret)
Decrypt the base64 encoded secret using the cipherKey. |
byte[] |
encode(byte[] secret)
Encrypt the secret using the cipherKey. |
String |
encode64(byte[] secret)
Encrypt the secret using the cipherKey and return a base64 encoding. |
String |
getCipherAlgorithm()
|
KeyManagerFactory |
getKeyManagerFactory()
Get the KeyManagerFactory associated with the security domain |
KeyStore |
getKeyStore()
Get the keystore associated with the security domain |
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 |
getName()
|
TrustManagerFactory |
getTrustManagerFactory()
Get the TrustManagerFactory associated with the security domain |
KeyStore |
getTrustStore()
Get the truststore associated with the security domain. |
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)
|
void |
setIterationCount(int iterationCount)
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 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 |
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 |
---|
doesRoleGroupHaveRole, doesUserHaveRole, doesUserHaveRole, flushCache, getActiveSubject, getPrincipal, getSecurityDomain, getUserRoles, isValid, isValid, setCachePolicy, setDeepCopySubjectOption |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
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, getSecurityDomain, 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 KeyStore getKeyStore() throws SecurityException
SecurityDomain
getKeyStore
in interface SecurityDomain
SecurityException
public KeyManagerFactory getKeyManagerFactory() throws SecurityException
SecurityDomain
getKeyManagerFactory
in interface SecurityDomain
SecurityException
public KeyStore getTrustStore() throws SecurityException
SecurityDomain
getTrustStore
in interface SecurityDomain
SecurityException
public TrustManagerFactory getTrustManagerFactory() throws SecurityException
SecurityDomain
getTrustManagerFactory
in interface SecurityDomain
SecurityException
public javax.management.ObjectName getManagerServiceName()
getManagerServiceName
in interface JaasSecurityDomainMBean
public void setManagerServiceName(javax.management.ObjectName managerServiceName)
setManagerServiceName
in interface JaasSecurityDomainMBean
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)
JaasSecurityDomainMBean
setKeyStorePass
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 void setTrustStorePass(String password)
JaasSecurityDomainMBean
setTrustStorePass
in interface JaasSecurityDomainMBean
public String getTrustStoreURL()
JaasSecurityDomainMBean
getTrustStoreURL
in interface JaasSecurityDomainMBean
public void setTrustStoreURL(String storeURL) throws IOException
JaasSecurityDomainMBean
setTrustStoreURL
in interface JaasSecurityDomainMBean
IOException
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()
public void setCipherAlgorithm(String cipherAlgorithm)
public String getName()
getName
in interface org.jboss.system.ServiceMBean
getName
in class org.jboss.system.ServiceMBeanSupport
public byte[] encode(byte[] secret) throws Exception
encode
in interface JaasSecurityDomainMBean
secret
- - the plaintext secret to encrypt
Exception
public byte[] decode(byte[] secret) throws Exception
decode
in interface JaasSecurityDomainMBean
secret
- - the encrypted secret to decrypt.
Exception
public String encode64(byte[] secret) throws Exception
encode64
in interface JaasSecurityDomainMBean
secret
- - the plaintext secret to encrypt
Exception
public byte[] decode64(String secret) throws Exception
decode64
in interface JaasSecurityDomainMBean
secret
- - the base64 encoded encrypted secret to decrypt.
Exception
public void reloadKeyAndTrustStore() throws Exception
reloadKeyAndTrustStore
in interface JaasSecurityDomainMBean
Exception
protected void startService() throws Exception
startService
in class org.jboss.system.ServiceMBeanSupport
Exception
protected void stopService()
stopService
in class org.jboss.system.ServiceMBeanSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |