Secrets
Store project credentials or connect a secret manager, then check which keys resolve for a run.
Project secrets supply credentials to setup commands, tests and application code. Store them in hlix or connect your secret manager. hlix resolves the values for each job. Connected managers use a short-lived cache and can use a recent encrypted copy during an outage.
Use project secrets for application credentials. Configure Workspace model access under Models and keys.
Prerequisites
Section titled “Prerequisites”- A project in your Workspace.
manageaccess on the project.- For a connected secret manager, a machine identity with read access to the right project and environment.
Two ways to supply them
Section titled “Two ways to supply them”| Provider | Config it takes | Use it when |
|---|---|---|
manual |
{ "secrets": [{ "key": …, "value": … }] } |
hlix holds the values, encrypted at rest. The simplest option |
infisical |
{ "clientId": …, "clientSecret": …, "projectId": …, "environment": … } |
Your Infisical project stays the source of truth, and hlix reads from it when a task starts |
A project can hold more than one configuration — for example, a manual set for a few overrides beside a connected manager for the rest.
Give the values to hlix
Section titled “Give the values to hlix”curl -sS -X POST "$HLIX_BASE_URL/v1/api/secrets/project/$PROJECT_ID" \ -H "x-api-key: $HLIX_API_KEY" \ -H "X-Organization-Id: $HLIX_WORKSPACE_ID" \ -H 'content-type: application/json' \ -d '{ "provider": "manual", "label": "Test credentials", "config": { "secrets": [{ "key": "DATABASE_URL", "value": "…" }] } }'Expected result: 201 and the stored configuration. Configuration responses redact credential values. Use the test endpoint below to check resolved key names.
Point hlix at your secret manager
Section titled “Point hlix at your secret manager”curl -sS -X POST "$HLIX_BASE_URL/v1/api/secrets/project/$PROJECT_ID" \ -H "x-api-key: $HLIX_API_KEY" \ -H "X-Organization-Id: $HLIX_WORKSPACE_ID" \ -H 'content-type: application/json' \ -d '{ "provider": "infisical", "label": "Staging", "config": { "clientId": "…", "clientSecret": "…", "projectId": "…", "environment": "staging" }, "envFilter": "STRIPE" }'Expected result: 201, with the client secret rendered as •••••••• in the echo.
envFilter keeps keys containing that text: STRIPE includes STRIPE_KEY, for example. Omit it to receive every key from this configuration; environment selects the Infisical environment.
PATCH /v1/api/secrets/project/{projectId}/{configId} updates a configuration; DELETE on the same path removes it. GET /v1/api/secrets/project/{projectId} lists them, values redacted.
Check what will resolve
Section titled “Check what will resolve”Check which keys a task will receive before starting it.
curl -sS -X POST "$HLIX_BASE_URL/v1/api/secrets/project/$PROJECT_ID/test" \ -H "x-api-key: $HLIX_API_KEY" \ -H "X-Organization-Id: $HLIX_WORKSPACE_ID"Expected result:
{"count": 7, "keys": ["DATABASE_URL", "STRIPE_KEY", "…"]}The check returns key names and a count, and is recorded in the audit log.
GET /v1/api/secrets/project/{projectId}/sync-logs shows the history of reads from a connected manager, so an intermittent credential problem shows up as a pattern.
How a secret reaches a task
Section titled “How a secret reaches a task”hlix resolves the project’s secrets for each job. Project secrets take precedence over Environment variables of the same name. They are available to setup, tests and application commands through the job’s root .env file.
Keep the generated root .env out of source control. hlix excludes it from commits and checks for an existing tracked file before writing it. See Secrets & protected files for importing and synchronizing protected configuration.
If a secret does not reach a task
Section titled “If a secret does not reach a task”{"error":"Config not found"}with404. The configuration id does not belong to that project.- An invalid configuration. A
manualprovider needs asecretsarray; an Infisical provider needs the machine identity, project ID and environment shown above. - A
400from the test endpoint carrying the provider’s own message. The connected manager rejected the credentials or could not find the project or environment named inconfig. Check the provider details in the response and confirm the project, environment and machine identity. - The test lists fewer keys than you expect.
envFilteris narrowing them. Clear it to see everything the configuration resolves. - A job cannot start because its secret manager is unreachable. No saved copy from the last 24 hours is available. Restore access, check the configuration and retry.
- A value is present but wrong. Two configurations may both define the key. Later configurations override earlier ones, and project secrets override Environment variables. List the configurations and check for a duplicate key.
- A local variable is missing in a job. Add its value to project secrets, or use an Environment variable for non-secret configuration.
- A
403on these routes. Use an agency account withmanageaccess on the project.