com.filenet.api.engine
Interface CredentialsManager
-
public interface CredentialsManagerAn interface to be implemented by a dynamic credentials manager.A credentials manager is defined by a
CmCredentialsManagerobject and takes effect when theCredentialsManagerproperty is set on a supporting consuming object, such asCmS3StorageDevice.A credentials manager delivers credentials as a set of (key,value) pairs. Key names are defined by the consumer and will vary by the type of consumer. Names are case-sensitive and by convention should be all lower case. Credentials may be non-expiring or have limited valid lifetime
A manager implementation must be concurrency-safe, meaning that it must be capable of handling multiple overlapping method calls in different threads. Ideally it should accomplish that without synchronization/blocking.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intgetCredentials(EngineObject consumingArtifact, java.util.Map<java.lang.String,java.lang.Object> credentials)Retrieve credentials for a particular consuming object, such as aCmS3StorageDevice.java.lang.String[]getSupportedConsumers()Return a list of the metadata classes of the types of object for which this manager can return credentials.voidinitialize(java.lang.String configParameters, java.lang.String configSecrets)Verify the configuration settings for this manager and place it into a state where it is ready to handlegetCredentialscalls.
-
-
-
Method Detail
-
initialize
void initialize(java.lang.String configParameters, java.lang.String configSecrets)Verify the configuration settings for this manager and place it into a state where it is ready to handlegetCredentialscalls. This method is called when theCmCrndentialsManagerobject is created or updated and before any calls to togetCredentials. The manager should throw an exception if the configuration settings are invalid.- Parameters:
configParameters- The value of the ConfigurationParameters property of the CmCredentialsManager object defining this manager.configSecrets- The plaintext value of the ConfigurationSecrets property of the CmCredentialsManager object defining this manager.
-
getSupportedConsumers
java.lang.String[] getSupportedConsumers()
Return a list of the metadata classes of the types of object for which this manager can return credentials. In other words, the types of consuming artifacts supported. Manager should return null if it in any sense "universal" or if there is no straightforward to enumerate the supported classes. The manager will be initialized before this method is called. return String[] listing the supported consuming classes, or null.
-
getCredentials
int getCredentials(EngineObject consumingArtifact, java.util.Map<java.lang.String,java.lang.Object> credentials)
Retrieve credentials for a particular consuming object, such as aCmS3StorageDevice. The credentials returned must be suitable for use with the specified consumer and if the manager is unable to provide credentials for that object type it should throw an exception.- Parameters:
consumingArtifact- The CE object defining the service or resource for which credentials are requested.credentials- An initially empty Map into which the credentials (key,value) pairs should be inserted.- Returns:
- An integer value indicating the valid lifetime in seconds of the credentials returned, with zero indicating that they are non-expiring.
-
-