Skip to main content

SecretStore

Class
📁application_sdk.services.secretstore

Use the SecretStore service to retrieve credentials from Atlan's secure credential storage during workflow execution. The service resolves credential GUIDs into actual credential values needed for connecting to external systems.

Methods1

get_credentials

async
async get_credentials(credential_guid: str) -> Dict[str, Any]
Retrieve credentials from the Secret Store using a credential GUID.
Parameters
credential_guidstr
Required
The unique identifier for the credentials stored in the Secret Store. This GUID is automatically provided in workflow_args when the workflow is triggered by the Atlan Orchestrator.
Returns
Dict[str, Any] - A dictionary containing the credential fields required for authentication. Structure varies based on credential type.
Example
# Example for database credentials:
{
"username": "db_user",
"password": "secure_password",
"host": "db.example.com",
"port": 5432
}

Usage Examples

Retrieve credentials in a workflow activity

Demonstrates how to securely retrieve credentials within a workflow activity using SecretStore.

from application_sdk.services.secretstore import SecretStore
from typing import Dict, Any, Optional
import logging

logger = logging.getLogger(__name__)

async def demo_activity(self, workflow_args: Dict[str, Any]) -> Optional[ActivityStatistics]:
credential_guid = workflow_args["credential_guid"]
credentials = await SecretStore.get_credentials(credential_guid)
logger.info("Credentials retrieved successfully")
return None

See also