Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-04


oracle.security.jps.service.credstore
Interface CredentialStore

All Superinterfaces:
JpsPersistable, ServiceInstance

public interface CredentialStore
extends ServiceInstance

A CredentialStore is a secure store that maintains mappings of map names to Credential maps. <p/> Each map name is mapped to a CredentialMap, which is a secure map of keys to Credential objects. <p/> The operations on this interface are secured by CredentialAccessPermission.


Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.security.jps.service.JpsPersistable
JpsPersistable.Mode

 

Method Summary
 boolean containsCredential(java.lang.String mapName, java.lang.String key)
          Returns true if an entry associated with the specified map name for this key exist in this store, false otherwise.
 boolean containsMap(java.lang.String mapName)
          Returns true if an map associated with the specified map name exist in this store, false otherwise.
 void deleteAllCredentials()
          Removes all the Credential objects from this CredentialStore You need delete CredentialAccessPermission permission to execute this API.
 void deleteCredential(java.lang.String mapName, java.lang.String key)
          Removes the Credential objects associated with the specified mapName and key.
 void deleteCredentialMap(java.lang.String mapName)
          Removes the CredentialMap objects associated with the specified mapName.
 void deleteStore()
          Deprecated. This has beed deprecated because there are no explicit delete of store are supported.
 java.util.Set<java.lang.String> getAliases()
          Deprecated. This method has been deprecated. Please use getMapNames instead.
 Credential getCredential(java.lang.String mapName, java.lang.String key)
          Returns the Credential objects associated with the specified mapName and key.
 CredentialMap getCredentialMap(java.lang.String mapName)
          Returns the CredentialMap of Credential objects associated with the specified mapName.
 java.util.Set<java.lang.String> getMapNames()
          Returns the Set of all the available mapName.
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Returns the configured properties for this instance
 void resetCredential(java.lang.String mapName, java.lang.String key, Credential credential)
          Overrides the Credential object for the specified mapName and key.
 void resetCredentialMap(java.lang.String mapName, CredentialMap credentialMap)
          Overrides the CredentialMap of Credential objects for the specified mapName.
 void setCredential(java.lang.String mapName, java.lang.String key, Credential credential)
          Stores the Credential object for the specified mapName and key.
 void setCredentialMap(java.lang.String mapName, CredentialMap credentialMap)
          Stores the CredentialMap of Credential objects for the specified mapName.
 void store()
          Deprecated. This method has been deprecated. Please use persist if needed.
 java.lang.String toString()
          Returns the store name as string representation of this Credential Store.

 

Methods inherited from interface oracle.security.jps.service.ServiceInstance
accept, getName, getServiceProvider

 

Methods inherited from interface oracle.security.jps.service.JpsPersistable
persist, refresh

 

Method Detail

containsMap

boolean containsMap(java.lang.String mapName)
                    throws CredStoreException,
                           java.security.AccessControlException
Returns true if an map associated with the specified map name exist in this store, false otherwise. You need read CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
Returns:
true - if map name exists, false otherwise
Throws:
CredStoreException - - if the Credential Store has not been initialized
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

containsCredential

boolean containsCredential(java.lang.String mapName,
                           java.lang.String key)
                           throws CredStoreException,
                                  java.security.AccessControlException
Returns true if an entry associated with the specified map name for this key exist in this store, false otherwise. You need read CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
key - This Credential key of this map name. Must be non-null and length must be greater than zero.
Returns:
true if this Credential exists, false otherwise
Throws:
CredStoreException - - if the Credential Store has not been initialized
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

getAliases

@Deprecated
java.util.Set<java.lang.String> getAliases()
                                           throws CredStoreException,
                                                  java.security.AccessControlException
Deprecated. This method has been deprecated. Please use getMapNames instead.
Returns the Set of all the available mapName. You need read CredentialAccessPermission permission to execute this API.
Returns:
Set of all the map names
Throws:
CredStoreException - - if the Credential Store has not been initialized
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0
See Also:
getMapNames

getMapNames

java.util.Set<java.lang.String> getMapNames()
                                            throws CredStoreException,
                                                   java.security.AccessControlException
Returns the Set of all the available mapName. You need read CredentialAccessPermission permission to execute this API.
Returns:
Set of all the map names
Throws:
CredStoreException - - if the Credential Store has not been initialized
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

getCredential

Credential getCredential(java.lang.String mapName,
                         java.lang.String key)
                         throws CredentialExpiredException,
                                CredStoreException,
                                java.security.AccessControlException
Returns the Credential objects associated with the specified mapName and key. Returns null if this Credential is not found. This is equivalent to getCredentialMap(mapName).getCredential(key). You need read CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
key - The Credential key of this map name. Must be non-null and length must be greater than zero.
Returns:
credetnial object if exists, null otherwise
Throws:
CredentialExpiredException - - if this credential is already expired
CredStoreException - - if the Credential Store has not been initialized properly or there is an error.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

getCredentialMap

CredentialMap getCredentialMap(java.lang.String mapName)
                               throws CredStoreException,
                                      java.security.AccessControlException
Returns the CredentialMap of Credential objects associated with the specified mapName. Returns null if this Credential is not found. You need read CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
Returns:
Credential Map for this map name if exists, null otherwise
Throws:
CredStoreException - - if the Credential Store has not been initialized properly or there is an error.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

setCredential

void setCredential(java.lang.String mapName,
                   java.lang.String key,
                   Credential credential)
                   throws CredentialAlreadyExistsException,
                          CredentialInvalidException,
                          CredStoreException,
                          java.security.AccessControlException
Stores the Credential object for the specified mapName and key. By default, this method always persits this credential to store. See also store method. You need write CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
key - The name of the Credential key. Must be non-null and length must be greater than zero.
credential - The Credential object to be stored
Throws:
CredentialInvalidException - - if the credential data is not valid and can not be stored
CredentialAlreadyExistsException - - if this credential alrady exists
CredStoreException - - if the Credential Store has not been initialized properly or this Credential Map cannot be set.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

resetCredential

void resetCredential(java.lang.String mapName,
                     java.lang.String key,
                     Credential credential)
                     throws CredentialInvalidException,
                            CredStoreException,
                            java.security.AccessControlException
Overrides the Credential object for the specified mapName and key. If the credential already exists, it will override it otherwise new credential will be created. By default, this method always persits this credential to store. See also store method. You need update CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
key - The name of the Credential key. Must be non-null and length must be greater than zero.
credential - The Credential object to be stored
Throws:
CredentialInvalidException - - if the credential data is not valid and can not be stored
CredStoreException - - if the Credential Store has not been initialized properly or this Credential Map cannot be set.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

setCredentialMap

void setCredentialMap(java.lang.String mapName,
                      CredentialMap credentialMap)
                      throws CredentialAlreadyExistsException,
                             CredentialInvalidException,
                             CredStoreException,
                             java.security.AccessControlException
Stores the CredentialMap of Credential objects for the specified mapName. By default, this method always persits these credentials to store. See also store method. You need write CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The map name. Must be non-null and length must be greater than zero.
credentialMap - Map of all the Credentials. Must not be null.
Throws:
CredentialInvalidException - - if the credential data is not valid and can not be stored
CredentialAlreadyExistsException - - if this credential alrady exists
CredStoreException - - if the credential store has not been initialized properly or this Credential cannot be set.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

resetCredentialMap

void resetCredentialMap(java.lang.String mapName,
                        CredentialMap credentialMap)
                        throws CredentialInvalidException,
                               CredStoreException,
                               java.security.AccessControlException
Overrides the CredentialMap of Credential objects for the specified mapName. If the Map already exists, it will override it, otherwise new map will be created. By default, this method always persits these credentials to store. See also store method. You need update CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The map name. Must be non-null and length must be greater than zero.
credentialMap - Map of all the Credentials
Throws:
CredentialInvalidException - - if the credential data is not valid and can not be stored
CredStoreException - - if the credential store has not been initialized properly or this Credential cannot be set
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

deleteCredential

void deleteCredential(java.lang.String mapName,
                      java.lang.String key)
                      throws CredentialNotFoundException,
                             CredStoreException,
                             java.security.AccessControlException
Removes the Credential objects associated with the specified mapName and key. You need delete CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
key - The key for this map name. Must be non-null and length must be greater than zero.
Throws:
CredStoreException - - if the Credential Store has not been initialized properly or credential cannot be deleted
CredentialNotFoundException - - if this credential does not exist.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

deleteCredentialMap

void deleteCredentialMap(java.lang.String mapName)
                         throws CredentialNotFoundException,
                                CredStoreException,
                                java.security.AccessControlException
Removes the CredentialMap objects associated with the specified mapName. You need delete CredentialAccessPermission permission to execute this API.
Parameters:
mapName - The name of the map. Must be non-null and length must be greater than zero.
Throws:
CredStoreException - - if the Credential Store has not been initialized properly or credential cannot be deleted
CredentialNotFoundException - - if this credential does not exist.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

deleteAllCredentials

void deleteAllCredentials()
                          throws CredStoreException,
                                 java.security.AccessControlException
Removes all the Credential objects from this CredentialStore You need delete CredentialAccessPermission permission to execute this API.
Throws:
CredStoreException - - if the Credential Store has not been initialized properly or credentials cannot be deleted
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

deleteStore

@Deprecated
void deleteStore()
                 throws CredStoreException,
                        java.security.AccessControlException
Deprecated. This has beed deprecated because there are no explicit delete of store are supported.
Delete this store. This has beed deprecated because there are no explicit delete of store are supported. You need delete CredentialAccessPermission permission to execute this API.
Throws:
CredStoreException - - if the credential store has not been initialized properly or this Credential cannot be set
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

store

@Deprecated
void store()
           throws CredStoreException,
                  java.security.AccessControlException
Deprecated. This method has been deprecated. Please use persist if needed.
Persists this CredentialStore object explicitly. By default all credentials are persisted implicitly. But this is configurable using property "oracle.security.jps.persist.credstore". This property is true by default. But if this property is set to false, then use persist method to explicitly persist the credentials if any write/update operation is called on this store. You need write CredentialAccessPermission permission to execute this API.
Throws:
CredStoreException - - if the Credential Store has not been initialized properly or credential cannot be saved.
java.security.AccessControlException - - if a requested access to credentials or store is denied
Since:
CSF 11.1.0.0

toString

java.lang.String toString()
Returns the store name as string representation of this Credential Store.
Overrides:
toString in class java.lang.Object
Returns:
String
Since:
CSF 11.1.0.0

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns the configured properties for this instance
Returns:
The properties
Since:
CSF 11.1.0.0

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-04


Copyright © 2011, Oracle. All rights reserved.