When you save a secret using Truefoundry’s UI, the actual secrets are stored
in your SecretManager and Truefoundry never stores the secret with itself. You
will then get a fqn (fully-qualified-name) for your secret which you can then
use in your deployments.
Creating and Managing Secrets
In a project, you likely have a set of secrets associated with it. Managing access to each individual secret can become cumbersome. Hence, we have the concept of secret groups which lets you organize and manage related secrets for a specific project. Within a Secret Group, you can easily add, remove, and update secrets. You can configure access control on each secret group and grant users/teams read, write or admin access. You can check the demo below on how to add a secret group and some secrets in the group.
There are 3 roles in Secret groups:
- Secret Group Admin: Can create, edit and delete secrets in the group.
- Secret Group Editor: Can edit and delete secrets in the group and also see the secret values.
- Secret Group Viewer: Can only see the secret keys, but not the values.

By default, a tenant admin has access to all secret groups. For tenant members
and teams you need to assign roles for each secret group.
Using the Secrets
Each secret will have a fully-qualified-name (FQN) next to the secret using which you can refer to and use the secret in the places mentioned below.
Environment variables in deployments
Environment variables in deployments

Volume Mounts in deployments
Volume Mounts in deployments
You can mount secrets as a volume in your deployments.
API keys / sensitive values in Integrations
API keys / sensitive values in Integrations

API keys for Models in AI Gateway
API keys for Models in AI Gateway

Secret Management API
This document describes how to manage secrets using APIOverview
The TrueFoundry API allows you to create and manage secret groups, which are collections of key-value pairs stored securely. Secret groups can be created, searched, and updated through REST API endpoints.Prerequisites
Before using the Secret Management API, ensure you have:- TrueFoundry API Server URL:
<control-plane-url>/api/svc - API Key: Set the
TFY_API_KEYenvironment variable for authentication
API Endpoints
1. Create or Update Secret Group
Creates a new secret group or updates an existing one. Endpoint:PUT /v1/secret-groups Refer
Headers:
name(string, required): Name of the secret group. If the name is 5 characters or less, it’s recommended to append-tenantsuffix.type(string, required): Always set to"secret-group"integration_fqn(string, required): Integration fully qualified name. Default:"internal:aws:aws-1:secret-store:internal-secret-store"collaborators(array, required): List of collaborators with their rolesrole_id(string): Role identifier ("secret-group-admin"or"secret-group-editor")subject(string): Subject in format"user:email@example.com"or"team:team-name"Response:
2. Add Secrets to Secret Group
Adds secrets (key-value pairs) to an existing secret group. Endpoint:PUT /v1/secret-groups/{secret_group_id} Refer
Path Parameters:
secret_group_id(string, required): The ID of the secret group returned from the create operation
- Each object in the
secretsarray contains:key(string, required): The secret key/namevalue(string, optional): The secret valueNote Even if updating value of one of the secret in secret group, you need to pass the keys for all other secrets. For eg, if i just want to update value ofSECRET_KEY_1tosecret-value-1-updated, the payload would be following:
3. Search Secret Groups
Searches for existing secret groups by fqn. Endpoint:GET /v1/secret-groups?fqn={fqn} Refer
Query Parameters:
fqn(string, required): Use FQN to search for a specific secret group. Format<tenant-name>:<secret-group-name>