Loading...
Loading...
Manages TrueFoundry secret groups and secrets. Handles listing, creating, updating, and deleting secret groups and individual key-value secrets.
npx skill4agent add truefoundry/tfy-deploy-skills truefoundry-secrets<objective>Routing note: For ambiguous user intents, use the shared clarification templates in references/intent-clarification.md.
Security Policy: Credential Handling
- The agent MUST NOT accept, store, log, echo, or display raw secret values in any context.
- Always instruct the user to set secret values as environment variables before running commands.
- If the user provides a raw secret value directly in conversation, warn them and refuse to use it. Instruct them to set it as an env var instead.
- When displaying secrets, show only "(set)" or the first 4 characters followed by "***".
TFY_API_SHscripts/tfy-api.shreferences/tfy-api-setup.mdtfy_secrets_list()
tfy_secrets_list(secret_group_id="group-id") # get group + secrets
tfy_secrets_list(secret_id="secret-id") # get one secret# Set the path to tfy-api.sh for your agent (example for Claude Code):
TFY_API_SH=~/.claude/skills/truefoundry-secrets/scripts/tfy-api.sh
# List all secret groups
$TFY_API_SH GET /api/svc/v1/secret-groups
# Get a specific group
$TFY_API_SH GET /api/svc/v1/secret-groups/GROUP_ID
# List secrets in a group
$TFY_API_SH POST /api/svc/v1/secrets '{"secretGroupId":"GROUP_ID","limit":100,"offset":0}'
# Get a specific secret
$TFY_API_SH GET /api/svc/v1/secrets/SECRET_IDSecret Groups:
| Name | ID | Secrets |
|---------------|----------|---------|
| prod-secrets | sg-abc | 5 |
| dev-secrets | sg-def | 3 |Security: Credential Handling
- The agent must NEVER accept, echo, or transmit raw secret values inline.
- Never ask the user to paste secret values in chat.
- Always instruct the user to store secret values in environment variables first, then reference those variables.
- If the user provides a raw secret value directly, warn them and suggest using an env var instead.
# Prompt user to set secret values as environment variables first
tfy_secret_groups_create(payload={"name": "my-secrets", ...})# SECURITY: Never hardcode secret values in commands — they will appear in shell
# history and process listings. Read from environment variables or files instead.
# User must set: export DB_PASSWORD="..." before running this command.
payload=$(jq -n \
--arg name "my-secrets" \
--arg integration "INTEGRATION_ID" \
--arg db_password "$DB_PASSWORD" \
'{
name: $name,
integrationId: $integration,
secrets: [{key: "DB_PASSWORD", value: $db_password}]
}')
$TFY_API_SH POST /api/svc/v1/secret-groups "$payload"# Instruct user to set env vars with new values, then reference them.
# The agent must NEVER accept raw secret values — always use indirection.
tfy_secret_groups_update(
id="GROUP_ID",
payload={"secrets": [{"key": "DB_PASSWORD", "value": "<secure-input-from-env>"}, {"key": "API_KEY", "value": "<secure-input-from-env>"}]}
)# SECURITY: Read secret values from environment variables, not inline.
payload=$(jq -n \
--arg db_password "$DB_PASSWORD" \
--arg api_key "$NEW_API_KEY" \
'{
secrets: [
{key: "DB_PASSWORD", value: $db_password},
{key: "API_KEY", value: $api_key}
]
}')
$TFY_API_SH PUT /api/svc/v1/secret-groups/GROUP_ID "$payload"tfy_secret_groups_delete(id="GROUP_ID")$TFY_API_SH DELETE /api/svc/v1/secret-groups/GROUP_ID# List all secret store provider accounts and their integrations
bash $TFY_API_SH GET '/api/svc/v1/provider-accounts?type=secret-store'type: "secret-store"integrationsintegration/secret-store/aws/secrets-managerintegration/secret-store/aws/parameter-storeintegration/secret-store/azure/vaultintegration/secret-store/gcp/secret-manageridintegrationIdtfy-secret://tfy-secret://<TENANT_NAME>:<SECRET_GROUP_NAME>:<SECRET_KEY>TENANT_NAMETFY_BASE_URLmy-orghttps://my-org.truefoundry.cloudSECRET_GROUP_NAMESECRET_KEYmy-app-secretsDB_PASSWORDAPI_KEYname: my-app
type: service
image:
type: image
image_uri: docker.io/myorg/my-app:latest
ports:
- port: 8000
expose: false
app_protocol: http
resources:
cpu_request: 0.5
cpu_limit: 1
memory_request: 512
memory_limit: 1024
ephemeral_storage_request: 1000
ephemeral_storage_limit: 2000
env:
LOG_LEVEL: info
DB_PASSWORD: tfy-secret://my-org:my-app-secrets:DB_PASSWORD
API_KEY: tfy-secret://my-org:my-app-secrets:API_KEY
workspace_fqn: cluster-id:workspace-nameenvtfy-secret://tfy apply -f manifest.yamltfy_secrets_delete(id="SECRET_ID")$TFY_API_SH DELETE /api/svc/v1/secrets/SECRET_IDSecret group ID not found. List groups first to find the correct ID.Cannot access secrets. Check your API key permissions.Secret group with this name already exists. Use a different name.Cannot update secret group with zero secrets. Include at least one secret in the payload.No secret store configured for this workspace. Contact your platform admin.Key name does not support underscores (_)DB-PASSWORDError: Secret <name> is already in a deleted state / conflict with soft-deleted resourceaz keyvault secret purge --vault-name <vault> --name <secret-name>Note: If the platform's Key Vault has soft-delete protection but not purge protection, options 1/2 work. If purge protection is also enabled, you must wait out the retention period (up to 90 days).
Unprocessable entity. Ensure all secrets have both "key" and "value" fields.