com.sun.enterprise.server.pluggable
Class SecuritySupport

java.lang.Object
  extended by com.sun.enterprise.server.pluggable.SecuritySupport
Direct Known Subclasses:
SecuritySupportImpl

@Contract
public abstract class SecuritySupport
extends java.lang.Object

SecuritySupport is part of PluggableFeature that provides access to internal services managed by application server.

Author:
Shing Wai Chan

Field Summary
static java.lang.String KEYSTORE_PASS_PROP
           
static java.lang.String KEYSTORE_TYPE_PROP
           
static java.lang.String keyStoreProp
           
static java.lang.String TRUSTSTORE_PASS_PROP
           
static java.lang.String TRUSTSTORE_TYPE_PROP
           
static java.lang.String trustStoreProp
           
 
Constructor Summary
SecuritySupport()
           
 
Method Summary
abstract  void checkPermission(java.lang.String key)
          Check permission for the given key.
static SecuritySupport getDefaultInstance()
           
abstract  javax.net.ssl.KeyManager[] getKeyManagers(java.lang.String algorithm)
           
abstract  java.security.KeyStore getKeyStore(java.lang.String token)
           
abstract  java.security.KeyStore[] getKeyStores()
          This method returns an array of keystores containing keys and certificates.
abstract  java.security.PrivateKey getPrivateKeyForAlias(java.lang.String alias, int keystoreIndex)
          Gets the PrivateKey for specified alias from the corresponding keystore indicated by the index.
abstract  java.lang.String[] getTokenNames()
          This method returns an array of token names in order corresponding to array of keystores.
abstract  javax.net.ssl.TrustManager[] getTrustManagers(java.lang.String algorithm)
           
abstract  java.security.KeyStore getTrustStore(java.lang.String token)
           
abstract  java.security.KeyStore[] getTrustStores()
          This method returns an array of truststores containing certificates.
abstract  java.security.KeyStore loadNullStore(java.lang.String type, int index)
           
abstract  void synchronizeKeyFile(java.lang.Object configContext, java.lang.String fileRealmName)
          TODO:V3:Cluster ConfigContext is no longer present so find out what this needs to be
abstract  boolean verifyMasterPassword(char[] masterPass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEYSTORE_PASS_PROP

public static final java.lang.String KEYSTORE_PASS_PROP
See Also:
Constant Field Values

TRUSTSTORE_PASS_PROP

public static final java.lang.String TRUSTSTORE_PASS_PROP
See Also:
Constant Field Values

KEYSTORE_TYPE_PROP

public static final java.lang.String KEYSTORE_TYPE_PROP
See Also:
Constant Field Values

TRUSTSTORE_TYPE_PROP

public static final java.lang.String TRUSTSTORE_TYPE_PROP
See Also:
Constant Field Values

keyStoreProp

public static final java.lang.String keyStoreProp
See Also:
Constant Field Values

trustStoreProp

public static final java.lang.String trustStoreProp
See Also:
Constant Field Values
Constructor Detail

SecuritySupport

public SecuritySupport()
Method Detail

getDefaultInstance

public static SecuritySupport getDefaultInstance()

getKeyStores

public abstract java.security.KeyStore[] getKeyStores()
This method returns an array of keystores containing keys and certificates.


getTrustStores

public abstract java.security.KeyStore[] getTrustStores()
This method returns an array of truststores containing certificates.


getKeyStore

public abstract java.security.KeyStore getKeyStore(java.lang.String token)
Parameters:
token -
Returns:
a keystore. If token is null, return the the first keystore.

getTrustStore

public abstract java.security.KeyStore getTrustStore(java.lang.String token)
Parameters:
token -
Returns:
a truststore. If token is null, return the first truststore.

loadNullStore

public abstract java.security.KeyStore loadNullStore(java.lang.String type,
                                                     int index)
                                              throws java.security.KeyStoreException,
                                                     java.io.IOException,
                                                     java.security.NoSuchAlgorithmException,
                                                     java.security.cert.CertificateException
Parameters:
type -
index -
Returns:
load a null keystore of given type.
Throws:
java.security.KeyStoreException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException

verifyMasterPassword

public abstract boolean verifyMasterPassword(char[] masterPass)
Parameters:
masterPass -
Returns:
result whether the given master password is correct.

getKeyManagers

public abstract javax.net.ssl.KeyManager[] getKeyManagers(java.lang.String algorithm)
                                                   throws java.io.IOException,
                                                          java.security.KeyStoreException,
                                                          java.security.NoSuchAlgorithmException,
                                                          java.security.UnrecoverableKeyException
Parameters:
algorithm -
Returns:
KeyManagers for the specified algorithm.
Throws:
java.io.IOException
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException

getTrustManagers

public abstract javax.net.ssl.TrustManager[] getTrustManagers(java.lang.String algorithm)
                                                       throws java.io.IOException,
                                                              java.security.KeyStoreException,
                                                              java.security.NoSuchAlgorithmException
Parameters:
algorithm -
Returns:
TrustManagers for the specified algorithm.
Throws:
java.io.IOException
java.security.KeyStoreException
java.security.NoSuchAlgorithmException

getPrivateKeyForAlias

public abstract java.security.PrivateKey getPrivateKeyForAlias(java.lang.String alias,
                                                               int keystoreIndex)
                                                        throws java.security.KeyStoreException,
                                                               java.security.NoSuchAlgorithmException,
                                                               java.security.UnrecoverableKeyException
Gets the PrivateKey for specified alias from the corresponding keystore indicated by the index.

Parameters:
alias - Alias for which the PrivateKey is desired.
keystoreIndex - Index of the keystore.
Returns:
Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException

getTokenNames

public abstract java.lang.String[] getTokenNames()
This method returns an array of token names in order corresponding to array of keystores.


synchronizeKeyFile

public abstract void synchronizeKeyFile(java.lang.Object configContext,
                                        java.lang.String fileRealmName)
                                 throws java.lang.Exception
TODO:V3:Cluster ConfigContext is no longer present so find out what this needs to be

Throws:
java.lang.Exception

checkPermission

public abstract void checkPermission(java.lang.String key)
Check permission for the given key.

Parameters:
key -


Copyright © 2012 GlassFish Community. All Rights Reserved.