Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.0.0)

E17486-01

oracle.adf.share.security.providers.jps
Class CSFCredentialStore

java.lang.Object
  extended by oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
      extended by oracle.adf.share.security.providers.jps.CSFCredentialStore
All Implemented Interfaces:
CredentialProvisioning, CredentialProvisioning2, CredentialStorage, CredentialStorage2

public class CSFCredentialStore
extends GenericCredentialStore
implements CredentialProvisioning2

Since:
release specific (what release of product did this appear in)

Field Summary
static java.lang.String APP_MAP_NAME
           
protected static java.lang.String DEFAULT_JPS_LOCATION_DT
           
protected  ADFContext mADFContext
           
protected  oracle.security.jps.service.credstore.CredentialStore mCSFCredStore
           
protected  java.util.Map mEnv
           
protected  java.lang.String mJps_store
           
protected  java.lang.String mJpsConfigLocation
           
protected static ADFLogger sLogger
           
 
Fields inherited from class oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
_applicationUser, _contextName, MAP_CREDENTIAL_SEPARATOR
 
Constructor Summary
CSFCredentialStore()
          Initialize the csf credential store using the ADF Security context environment.
CSFCredentialStore(java.lang.String adfContextName)
          Initialize the csf credential store using the config from named ADF context
 
Method Summary
protected  void checkInitCSFStore()
           
 Credential fetchCredential(java.lang.String credKey)
          Retrieves the credential for the specified credential key.
 Credential fetchCredential(java.lang.String map_name, java.lang.String adfCredKey, java.lang.String credentialKey)
          Fetches the credential for the given key.
 java.io.Serializable fetchSerializableCredential(java.lang.String credentialKey)
          Fetches the serializable credential for the given key.
 java.io.Serializable fetchSerializableCredential(java.lang.String map_name, java.lang.String adfCredKey, java.lang.String credentialKey)
          Internal: Applications should not use this method. Returns the serializable credential for the specified credential key.
 java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String credentialKey)
          Fetches the serializable credential for the given key.
 java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey)
          Internal: Applications should not use this method. Returns the serializable credential for the specified credential key for current user.
 java.lang.String getJpsConfigLocation()
           
protected  java.lang.String getMapName()
           
 void initialize(java.util.Hashtable props)
          Internal: Applications should not use this method. Initializes the credentialstore from the properties.
 void initialize(java.util.Map props)
           
protected static void logFine(java.lang.String methodName, java.lang.String msg)
           
protected static void logFiner(java.lang.String methodName, java.lang.String msg)
           
protected static void logFinest(java.lang.String methodName, java.lang.String msg)
           
protected  java.util.Map obtainCredentialProperties(java.lang.String adfCtxName)
           
 void removeCredential(java.lang.String credentialKey)
          Deletes the credential for the given credential key.
 void removeCredential(java.lang.String credentialKey, java.security.Principal principal)
          Deletes the credential for the given credential key and user principal.
 void removeCredential(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey)
          Removes the credential specified credential idebtifier.
 void removeCredential(java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey, java.security.Principal principal)
          Internal: Applications should not use this method. Removes the credential specified by the credential key.
protected  void removeCredentialCSF(java.lang.String credentialKey, java.lang.String userUniqueId)
          Deletes the credential for the given credential key and user principal.
protected  void removeCredentialCSF(java.lang.String map_name, java.lang.String adfCredKey, java.lang.String credentialKey, java.lang.String userUniqueId)
          Deletes the credential for the given credential key and user principal.
 void storeCredential(Credential credential, java.lang.String credentialKey)
          Stores the given credential using the given credential key scoped to the current user.
 void storeCredential(Credential credential, java.lang.String credentialKey, java.security.Principal principal)
          Stores the given credential using the given credential key scoped to the given user principal.
 void storeCredential(Credential credential, java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credentialKey)
          Stores the given credential using the given credential key scoped to the current user.
 void storeCredential(Credential credential, java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credentialKey, java.security.Principal principal)
          Stores the given credential using the given credential key scoped to the given user principal.
protected  void storeCredentialCSF(Credential credential, java.lang.String credentialKey, java.lang.String userUniqueId)
          Stores the given credential using the given credential key scoped to the given user principal.
protected  void storeCredentialCSF(Credential credential, java.lang.String map_name, java.lang.String adfCredKey, java.lang.String credentialKey, java.lang.String userUniqueId)
          Stores the given credential using the given credential key scoped to the given user principal.
 void storeSerializableCredential(java.io.Serializable credential, java.lang.String credentialKey, java.security.Principal principal)
          Stores the given credential using the given credential key scoped to the given user principal.
 void storeSerializableCredential(java.io.Serializable cred, java.lang.String mapName, java.lang.String adfCredKey, java.lang.String credKey, java.security.Principal principal)
          Internal: Applications should not use this method. Store the credential for the specified credential key and principal.
protected  void storeSerializableCredentialCSF(java.io.Serializable credential, java.lang.String credentialKey, java.lang.String userUniqueId)
          Stores the given credential using the given credential key scoped to the given user principal.
protected  void storeSerializableCredentialCSF(java.io.Serializable credential, java.lang.String map_name, java.lang.String adfCredKey, java.lang.String credentialKey, java.lang.String userUniqueId)
          Stores the given credential using the given credential key scoped to the given user principal.
 
Methods inherited from class oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
getApplicationUserName, getCredStoreAbsoluteLocation, getDefaultUser, getSecurityContext, getUserPrincipal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mEnv

protected transient java.util.Map mEnv

sLogger

protected static ADFLogger sLogger

mADFContext

protected ADFContext mADFContext

mJps_store

protected java.lang.String mJps_store

mCSFCredStore

protected oracle.security.jps.service.credstore.CredentialStore mCSFCredStore

APP_MAP_NAME

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

DEFAULT_JPS_LOCATION_DT

protected static final java.lang.String DEFAULT_JPS_LOCATION_DT

mJpsConfigLocation

protected java.lang.String mJpsConfigLocation
Constructor Detail

CSFCredentialStore

public CSFCredentialStore()
Initialize the csf credential store using the ADF Security context environment.


CSFCredentialStore

public CSFCredentialStore(java.lang.String adfContextName)
Initialize the csf credential store using the config from named ADF context

Parameters:
adfContextName - ADF Context Name to obtain the concerned security environment
Method Detail

getJpsConfigLocation

public java.lang.String getJpsConfigLocation()

obtainCredentialProperties

protected java.util.Map obtainCredentialProperties(java.lang.String adfCtxName)

checkInitCSFStore

protected void checkInitCSFStore()
                          throws oracle.security.jps.JpsException
Throws:
oracle.security.jps.JpsException

initialize

public void initialize(java.util.Map props)

initialize

public void initialize(java.util.Hashtable props)
Description copied from class: GenericCredentialStore
Internal: Applications should not use this method. Initializes the credentialstore from the properties.

Specified by:
initialize in interface CredentialStorage
Specified by:
initialize in class GenericCredentialStore
Parameters:
props -

storeCredential

public void storeCredential(Credential credential,
                            java.lang.String credentialKey)
Stores the given credential using the given credential key scoped to the current user. If the current user is not available, then the credential is stored scoped to anonymous.

Specified by:
storeCredential in interface CredentialStorage
Specified by:
storeCredential in class GenericCredentialStore
Parameters:
credential - Credential to be stored
credentialKey - Key to be used for storing the credential

storeCredential

public void storeCredential(Credential credential,
                            java.lang.String mapName,
                            java.lang.String adfCredKey,
                            java.lang.String credentialKey)
Stores the given credential using the given credential key scoped to the current user. If the current user is not available, then the credential is stored scoped to anonymous.

Specified by:
storeCredential in interface CredentialStorage2
Overrides:
storeCredential in class GenericCredentialStore
Parameters:
credential - Credential to be stored
mapName - ADF cred map name
adfCredKey - ADF cred key value
credentialKey - Key to be used for storing the credential

storeSerializableCredential

public void storeSerializableCredential(java.io.Serializable cred,
                                        java.lang.String mapName,
                                        java.lang.String adfCredKey,
                                        java.lang.String credKey,
                                        java.security.Principal principal)
Internal: Applications should not use this method. Store the credential for the specified credential key and principal.

Specified by:
storeSerializableCredential in interface CredentialProvisioning2
Parameters:
cred - the serializable credential
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
principal - the user or role principal

removeCredential

public void removeCredential(java.lang.String mapName,
                             java.lang.String adfCredKey,
                             java.lang.String credKey,
                             java.security.Principal principal)
                      throws CredentialNotFoundException
Internal: Applications should not use this method. Removes the credential specified by the credential key.

Specified by:
removeCredential in interface CredentialProvisioning2
Parameters:
credKey - the credential key
mapName - the map name
adfCredKey - ADF cred key
principal - the user or role principal
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential does not exist for the given key
CredentialNotFoundException

fetchCredential

public Credential fetchCredential(java.lang.String map_name,
                                  java.lang.String adfCredKey,
                                  java.lang.String credentialKey)
                           throws CredentialNotFoundException
Fetches the credential for the given key. The credential fetched is mapped to the current user. If the current user is not available, then the credential is fetched scoped to anonymous.

Specified by:
fetchCredential in interface CredentialStorage2
Overrides:
fetchCredential in class GenericCredentialStore
Parameters:
credentialKey - Key for which the credential needs to be fetched
map_name - the map name
adfCredKey - ADF cred key
Returns:
Credential for the given key
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential does not exist
CredentialNotFoundException

fetchCredential

public Credential fetchCredential(java.lang.String credKey)
                           throws CredentialNotFoundException
Retrieves the credential for the specified credential key.

Specified by:
fetchCredential in interface CredentialStorage
Specified by:
fetchCredential in class GenericCredentialStore
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Returns:
the credential, or null if not found
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

fetchSerializableCredentialForCurrentUser

public java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String credentialKey)
                                                               throws CredentialNotFoundException
Fetches the serializable credential for the given key. The credential fetched is mapped to the current user. If the current user is not available, then the credential is fetched scoped to anonymous.

Specified by:
fetchSerializableCredentialForCurrentUser in interface CredentialStorage
Overrides:
fetchSerializableCredentialForCurrentUser in class GenericCredentialStore
Parameters:
credentialKey - Key to be used to fetch the credential
Returns:
Serializable credential stored
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found TODO: Check should we just throw exception incase current user principal is not available? Otherwise there's no difference between this and fetchSerializableCredential api.
CredentialNotFoundException

fetchSerializableCredentialForCurrentUser

public java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String mapName,
                                                                      java.lang.String adfCredKey,
                                                                      java.lang.String credKey)
                                                               throws CredentialNotFoundException
Internal: Applications should not use this method. Returns the serializable credential for the specified credential key for current user.

Specified by:
fetchSerializableCredentialForCurrentUser in interface CredentialStorage2
Overrides:
fetchSerializableCredentialForCurrentUser in class GenericCredentialStore
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Returns:
a valid credential, or null if not found
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

fetchSerializableCredential

public java.io.Serializable fetchSerializableCredential(java.lang.String map_name,
                                                        java.lang.String adfCredKey,
                                                        java.lang.String credentialKey)
                                                 throws CredentialNotFoundException
Internal: Applications should not use this method. Returns the serializable credential for the specified credential key.

Specified by:
fetchSerializableCredential in interface CredentialStorage2
Overrides:
fetchSerializableCredential in class GenericCredentialStore
Parameters:
map_name - the map name
adfCredKey - ADF cred key
credentialKey - the credential key
Returns:
a valid credential, or null if not found
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

fetchSerializableCredential

public java.io.Serializable fetchSerializableCredential(java.lang.String credentialKey)
                                                 throws CredentialNotFoundException
Fetches the serializable credential for the given key. The credential fetched is mapped to the current user. If the current user is not available, then the credential is fetched scoped to anonymous.

Specified by:
fetchSerializableCredential in interface CredentialStorage
Specified by:
fetchSerializableCredential in class GenericCredentialStore
Parameters:
credentialKey - Key to be used to fetch the credential
Returns:
Serializable credential stored
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

removeCredential

public void removeCredential(java.lang.String credentialKey)
                      throws CredentialNotFoundException
Deletes the credential for the given credential key. The credential to be deleted is arrived at by mapping current user principal to the credential. If user principal is not available, then credential bearing the same key against the anonymous will be deleted.

Specified by:
removeCredential in interface CredentialStorage
Specified by:
removeCredential in class GenericCredentialStore
Parameters:
credentialKey - Key for the credential to be deleted.
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

storeCredential

public void storeCredential(Credential credential,
                            java.lang.String credentialKey,
                            java.security.Principal principal)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Specified by:
storeCredential in interface CredentialProvisioning
Parameters:
credential - Credential to be stored
credentialKey - Key to be used for storing the credential
principal - User Principal to store the credential against

storeCredential

public void storeCredential(Credential credential,
                            java.lang.String mapName,
                            java.lang.String adfCredKey,
                            java.lang.String credentialKey,
                            java.security.Principal principal)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Specified by:
storeCredential in interface CredentialProvisioning2
Parameters:
credential - Credential to be stored
mapName - ADF map name for cred
adfCredKey - ADF cred key value
credentialKey - Key to be used for storing the credential
principal - User Principal to store the credential against

storeCredentialCSF

protected void storeCredentialCSF(Credential credential,
                                  java.lang.String credentialKey,
                                  java.lang.String userUniqueId)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Parameters:
credential - Credential to be stored
credentialKey - Key to be used for storing the credential
userUniqueId - User's unique id to store the credential against

storeCredentialCSF

protected void storeCredentialCSF(Credential credential,
                                  java.lang.String map_name,
                                  java.lang.String adfCredKey,
                                  java.lang.String credentialKey,
                                  java.lang.String userUniqueId)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Parameters:
credential - Credential to be stored
map_name - ADF map name value
adfCredKey - ADF cred key value
credentialKey - Key to be used for storing the credential
userUniqueId - User's unique id to store the credential against

storeSerializableCredential

public void storeSerializableCredential(java.io.Serializable credential,
                                        java.lang.String credentialKey,
                                        java.security.Principal principal)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Specified by:
storeSerializableCredential in interface CredentialProvisioning
Parameters:
credential - Serializable Credential to be stored
credentialKey - Key to be used for storing the credential
principal - User Principal to store the credential against

storeSerializableCredentialCSF

protected void storeSerializableCredentialCSF(java.io.Serializable credential,
                                              java.lang.String credentialKey,
                                              java.lang.String userUniqueId)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Parameters:
credential - Serializable Credential to be stored
credentialKey - Key to be used for storing the credential
userUniqueId - User's unique id to store the credential against

storeSerializableCredentialCSF

protected void storeSerializableCredentialCSF(java.io.Serializable credential,
                                              java.lang.String map_name,
                                              java.lang.String adfCredKey,
                                              java.lang.String credentialKey,
                                              java.lang.String userUniqueId)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Parameters:
credential - Serializable Credential to be stored
credentialKey - Key to be used for storing the credential
userUniqueId - User's unique id to store the credential against

removeCredential

public void removeCredential(java.lang.String credentialKey,
                             java.security.Principal principal)
                      throws CredentialNotFoundException
Deletes the credential for the given credential key and user principal. If the given principal is null then the credential scoped to anonymous is deleted.

Specified by:
removeCredential in interface CredentialProvisioning
Parameters:
credentialKey - key for the credential to be deleted
principal - User Principal for which the credential needs to be deleted.
Throws:
CredentialNotFoundException - if the credential does not exist for the given key

removeCredential

public void removeCredential(java.lang.String mapName,
                             java.lang.String adfCredKey,
                             java.lang.String credKey)
                      throws CredentialNotFoundException
Removes the credential specified credential idebtifier.

Specified by:
removeCredential in interface CredentialStorage2
Overrides:
removeCredential in class GenericCredentialStore
Parameters:
mapName - the map name
adfCredKey - ADF cred key
credKey - the credential key
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

removeCredentialCSF

protected void removeCredentialCSF(java.lang.String credentialKey,
                                   java.lang.String userUniqueId)
                            throws CredentialNotFoundException
Deletes the credential for the given credential key and user principal. If the given principal is null then the credential scoped to anonymous is deleted.

Parameters:
credentialKey - key for the credential to be deleted
userUniqueId - User's unique id for which the credential needs to be deleted.
Throws:
CredentialNotFoundException

removeCredentialCSF

protected void removeCredentialCSF(java.lang.String map_name,
                                   java.lang.String adfCredKey,
                                   java.lang.String credentialKey,
                                   java.lang.String userUniqueId)
                            throws CredentialNotFoundException
Deletes the credential for the given credential key and user principal. If the given principal is null then the credential scoped to anonymous is deleted.

Parameters:
map_name - ADF cred map name value
adfCredKey - ADF cred key value
credentialKey - key for the credential to be deleted
userUniqueId - User's unique id for which the credential needs to be deleted.
Throws:
CredentialNotFoundException

getMapName

protected java.lang.String getMapName()

logFine

protected static void logFine(java.lang.String methodName,
                              java.lang.String msg)

logFiner

protected static void logFiner(java.lang.String methodName,
                               java.lang.String msg)

logFinest

protected static void logFinest(java.lang.String methodName,
                                java.lang.String msg)

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.0.0)

E17486-01

Copyright © 1997, 2011, Oracle. All rights reserved.