Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.portlet.service.credentialvault.spi
Deprecated. since 6.1.0.3 use VaultAdapter instead
Interface VaultAdapterDN
public interface VaultAdapterDNInterface that defines a Vault that may be plugged into the portal. Note, there is only one instance of a particular Vault Adapter. Therefore, an implementation must be guaranteed thread safe.
Credentials may be shared across different portlets (apps, instances, etc.) and different backends. Credentials also may already be populated for various backend resources.
An instance of the vault itself is only available to the Vault Service. The Vault Service is responsible for authorization of accesses between the service and the installed Vaults.
Credential information is identified by Secret Types, and are defined by the Credential Service Credential Secret Objects. Vaults may only support a subset of the Secret Types, so a SecretTypeNotSupportedException must be thrown.
Communication between an implementation of a Vault Adapter and the Vault Service is done via Credential Secret Objects.
A particular Vault may also categorize mapped credentials based on resources. Therefore, the Vault Interface provides add, delete, and modify for individual resources. If the Vault cannot handle such categorization, then the Adapter implementation must handle the resource logic.
- Since:
- 5.1.0.1
- Note:
This interface is designed to be implemented by clients.
Field Summary static java.lang.String VAULT_SECRET_CONTEXT
Deprecated. The name of the context used in a Jndi lookup to get the CredentialSecretFactory class.
Method Summary void addCredential(CredentialSecret secret, java.lang.String aDN, java.lang.String resource)
Deprecated. Adds a mapped credential of the provided secret type under the specified resource.boolean containsResource(java.lang.String resource)
Deprecated. Tells if the Vault contains the specified resource.void createResource(java.lang.String resource)
Deprecated. Adds a resource of the given name to the Vault.void deleteCredential(int secretType, java.lang.String aUser, java.lang.String resource)
Deprecated. Deletes a mapped credential of the provided Secret Type under the specified resource.void deleteResource(java.lang.String resource)
Deprecated. Deletes the specified resource from the Vault.void destroy()
Deprecated. Termination Routine.CredentialSecret getCredential(int secretType, java.lang.String aUser, java.lang.String resource)
Deprecated. Retreives a mapped credential of the provided Secret Type under the specified resource.int[] getSupportedSecretTypes()
Deprecated. Return an array of integers of the supported Secret Types.java.lang.String getVersion()
Deprecated. Return the descriptive Version String of this Vault Adapter.boolean init(java.lang.String configFilename)
Deprecated. Initialization Routine.boolean isSecretTypeSupported(int secretType)
Deprecated. Tells if the specified Secret Type is supportedjava.util.Iterator<java.lang.String> listResources()
Deprecated. Return a list of resources as strings.void modifyCredential(CredentialSecret secret, java.lang.String aUser, java.lang.String resource)
Deprecated. Modifies a mapped credential of the provided secret type under the specified resource.
Field Detail VAULT_SECRET_CONTEXT
static final java.lang.String VAULT_SECRET_CONTEXT
- Deprecated.
- The name of the context used in a Jndi lookup to get the CredentialSecretFactory class. The CredentialSecretFactory class is used to create Credential Secret instances.
- See Also:
- com.ibm.portal.portlet.service.credentialvault.spi.secret.CredentialSecretFactory, Constant Field Values
Method Detail init
boolean init(java.lang.String configFilename)
- Deprecated.
- Initialization Routine. The file name of the configuration file is provided form the VaultService.properties file, that is located in the
\shared\app\config\services directory. The parameter to set the config file name is myadapter.config. A custom Vault Adpater has to handle in the init method whether this file is set or not. This means whether config parameters are needed or not. If config parameters are set, do the following to read the properties:
- java.io.InputStream in = getClass().getResourceAsStream("/config/" + configFilename);
- Properties props = new Properties();
- props.load(in);
- Parameters:
- configFilename - Configuration file name
- Returns:
- True if initialization succeeded, false if initialization failed.
destroy
void destroy()
- Deprecated.
- Termination Routine. Performs any necessary shutdown processing.
addCredential
void addCredential(CredentialSecret secret, java.lang.String aDN, java.lang.String resource) throws SecretTypeNotSupportedException, CredentialVaultException
- Deprecated.
- Adds a mapped credential of the provided secret type under the specified resource.
- Parameters:
- secret - Credential Secret to add. The code of the custom Vault Adapter has to throw a CredentialVaultException if the secret is null.
- aDN - A User's distinguished name
- resource - Resource to add the credential under, arbitrary String
- Throws:
- SecretTypeNotSupportedException - The provided secret type is not supported.
- CredentialVaultException - Problem communicating with the backend Vault or the credential could not be added
modifyCredential
void modifyCredential(CredentialSecret secret, java.lang.String aUser, java.lang.String resource) throws SecretTypeNotSupportedException, CredentialVaultException
- Deprecated.
- Modifies a mapped credential of the provided secret type under the specified resource.
- Parameters:
- secret - New Credential Secret. The code of the custom Vault Adapter has to throw a CredentialVaultException if the secret is null.
- aUser - A User's distinguished name
- resource - Resource to modify the credential under, arbitrary String if the resource is not found, the secret cannot be changed and a CredentialVaultException is thrown
- Throws:
- SecretTypeNotSupportedException - The provided secret type is not supported.
- CredentialVaultException - Problem communicating with the backend Vault or the credential could not be modified
deleteCredential
void deleteCredential(int secretType, java.lang.String aUser, java.lang.String resource) throws SecretTypeNotSupportedException, CredentialVaultException
- Deprecated.
- Deletes a mapped credential of the provided Secret Type under the specified resource.
- Parameters:
- secretType - Secret Type
- aUser - The distiguished name of an user
- resource - Resource to delete the credential under. If the resource is not found, the secret cannot be deleted and a CredentialVaultException is thrown
- Throws:
- SecretTypeNotSupportedException - The provided secret type is not supported.
- CredentialVaultException - Problem communicating with the backend Vault or the credential could not be deleted
getCredential
CredentialSecret getCredential(int secretType, java.lang.String aUser, java.lang.String resource) throws SecretTypeNotSupportedException, CredentialVaultException
- Deprecated.
- Retreives a mapped credential of the provided Secret Type under the specified resource.
- Parameters:
- secretType - Secret Type
- aUser - The distiguishedname of an user
- resource - Resource to delete the credential under
- Returns:
- CredentialSecret containing the mapped credentials
- Throws:
- SecretTypeNotSupportedException - The provided secret type is not supported.
- CredentialVaultException - Problem communicating with the backend Vault or the credential could not be retrieved
createResource
void createResource(java.lang.String resource) throws CredentialVaultException
- Deprecated.
- Adds a resource of the given name to the Vault.
- Parameters:
- resource - Resource name to create. The resource name can be any string.
- Throws:
- CredentialVaultException - Problem communicating with the backend Vault or the resource could not be added
deleteResource
void deleteResource(java.lang.String resource) throws CredentialVaultException
- Deprecated.
- Deletes the specified resource from the Vault.
- Parameters:
- resource - Resource name to delete
- Throws:
- CredentialVaultException - Problem communicating with the backend Vault or the resource could not be deleted
containsResource
boolean containsResource(java.lang.String resource) throws CredentialVaultException
- Deprecated.
- Tells if the Vault contains the specified resource.
- Parameters:
- resource - Resource name
- Returns:
- boolean True if the resource exists, otherwise false
- Throws:
- CredentialVaultException - Problem communicating with the backend Vault
listResources
java.util.Iterator<java.lang.String> listResources() throws CredentialVaultException
- Deprecated.
- Returns a list of resources as strings.
- Returns:
- Iterator of resources
- Throws:
- CredentialVaultException - Problem communicating with the backend Vault
getSupportedSecretTypes
int[] getSupportedSecretTypes()
- Deprecated.
- Returns an array of integers of the supported Secret Types. The supported Secret Types can be any of the types defined in the com.ibm.portal.portlet.service.credentialVault.spi.secrets.CredentialSecret interface.
- Returns:
- int[] array of supported Secret Types
- See Also:
- CredentialSecret
getVersion
java.lang.String getVersion()
- Deprecated.
- Returns the descriptive Version String of this Vault Adapter. There is no predefined format for the version, it is an arbitrary string. If no version is set in a custom Vault Adapter, nothing happens. The version is written in the log file if tracing is activated. Therefore it is only a means to control which Vault Adapter is used.
- Returns:
- Descriptive Version String
isSecretTypeSupported
boolean isSecretTypeSupported(int secretType)
- Deprecated.
- Tells if the specified Secret Type is supported
- Parameters:
- secretType - Secret Type to check
- Returns:
- true if the secret type is supported, false otherwise
- See Also:
- CredentialSecret
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD