BaseTen
Search…
Secret management
Keep sensitive data out of plaintext
To keep sensitive data like API keys and passwords secret, instead of including those in plaintext in code you can use the secret manager to store them and retrieve them in code only when needed. To do so, open the secret manager from the settings menu:
Storing secrets in the secret manager
Once the secret data is there and given a name, you can retrieve the secret in your code using context.get_secret('my_secret_name').
Example:
1
slack_api_token = context.get_secret('slack_api_token')
2
slack_client = slack_sdk.WebClient(token=slack_api_token)
3
# Use slack_client to send messages, etc.
Copied!
Last modified 2mo ago
Copy link