Secrets

Users can inject sensitive information into functions, sources, and sinks via secrets. This section describes how to manage secrets in Streamlio Cloud.

Creating Secrets

Every user will have a workspace in our secrets store. Secrets are stored as key-value pairs. Users can create secrets in their own secrets workspace with a command in the following format

streamlio secret create <SECRET-NAME> <KEY>=<VALUE>

For example, let us create a secret named my-secret with the keys login and password

streamlio secret create dbcreds login=username password=super-secret-pwd

Deleting Secrets

The user can delete an existing secret with the following command

streamlio secret delete <SECRET-NAME>

For example, to delete a secret called dbcreds issue the following command

streamlio secret delete dbcreds

Getting Secrets

The user can list all the key value pairs associated with the secret. Use the following command to get details about the key value pairs

streamlio secret get <SECRET-NAME>

For example, for getting the details of the secret called dbcreds issue the following command

streamlio secret get dbcreds

The command will give the following output

Key Value
--- -----
login username
password super-secret-pwd

Updating Secrets

The user can update an existing key value pair in a secret using the following command

streamlio secret update <SECRET-NAME> <KEY>=<VALUE>

For example, in order to update the key value pairs login and password in secret dbcreds to new values, do the following:

streamlio secret update dbcreds login=new-username password=new-secret-passwd

If you want to add new key value pair connstring to existing secret dbcreds, issue the following command:

streamlio secret update dbcreds connstring=newdb:6640

Update secret command can update existing key value pairs and/or insert new key value pairs, if they do not exist. You cannot delete an existing key value pair using update. Instead, you have to delete the entire secret and recreate without the intended key value pair.

_____ Copyright 2019 Streamlio, Inc. Apache, Apache BookKeeper, Apache Pulsar and associated open source project names are trademarks of the Apache Software Foundation.