Package ai.tock.shared.security
Interface SecretManagerService
-
- All Implemented Interfaces:
public interface SecretManagerServiceThe Secret Manager Service
-
-
Method Summary
Modifier and Type Method Description abstract CredentialsgetCredentials(String secretName)Retrieve credentials abstract AIProviderSecretgetAIProviderSecret(String secretName)Retrieve AI Provider Secret abstract UnitcreateOrUpdateAIProviderSecret(String secretName, AIProviderSecret secretValue)Create an AI Provider Secret if it doesn't exist. abstract StringgenerateSecretName(String namespace, String botId, String feature)Generate a Secret Name abstract SecretKeycreateSecretKeyInstance(String secretName)Create a SecretKey instance. SecretKeycreateOrUpdateSecretKey(String namespace, String botId, String feature, String secretValue)Create or update a SecretKey abstract BooleanisSecretTypeSupported(SecretKey secret)Check if the SecretType is supported abstract SecretManagerProviderTypegetType()-
-
Method Detail
-
getCredentials
abstract Credentials getCredentials(String secretName)
Retrieve credentials
- Parameters:
secretName- the secret name- Returns:
the Credentials
-
getAIProviderSecret
abstract AIProviderSecret getAIProviderSecret(String secretName)
Retrieve AI Provider Secret
- Parameters:
secretName- the secret name- Returns:
the AIProviderSecret
-
createOrUpdateAIProviderSecret
abstract Unit createOrUpdateAIProviderSecret(String secretName, AIProviderSecret secretValue)
Create an AI Provider Secret if it doesn't exist. Else, update it
- Parameters:
secretName- the secret namesecretValue- the secret value to store
-
generateSecretName
abstract String generateSecretName(String namespace, String botId, String feature)
Generate a Secret Name
- Parameters:
namespace- the application namespacebotId- the bot ID (also known as application name)feature- the feature for which the secret will be created- Returns:
the generate secret name
-
createSecretKeyInstance
abstract SecretKey createSecretKeyInstance(String secretName)
Create a SecretKey instance.
- Parameters:
secretName- the secret name
-
createOrUpdateSecretKey
SecretKey createOrUpdateSecretKey(String namespace, String botId, String feature, String secretValue)
Create or update a SecretKey
- Parameters:
namespace- the application namespacebotId- the bot ID (also known as application name)feature- the feature for which the secret will be createdsecretValue- the secret value to store- Returns:
-
isSecretTypeSupported
abstract Boolean isSecretTypeSupported(SecretKey secret)
Check if the SecretType is supported
- Returns:
true if supported. Else no.
-
getType
abstract SecretManagerProviderType getType()
-
-
-
-