This page describes how to manage secrets using Infisical Agent.
Method
, which is the authentication process suitable for your current setup, and Sinks
, which are the places where the agent deposits the new access token whenever it receives updates.
When the Infisical Agent is started, it will attempt to obtain a valid access token using the authentication method you have configured. If the agent is unable to fetch a valid token, the agent will keep trying, increasing the time between each attempt.
Once a access token is successfully fetched, the agent will make sure the access token stays valid, continuing to renew it before it expires.
Every time the agent successfully retrieves a new access token, it writes the new token to the Sinks you’ve configured.
Field | Description |
---|---|
infisical.address | The URL of the Infisical service. Default: "https://app.infisical.com" . |
auth.type | The type of authentication method used. Available options: universal-auth , kubernetes , azure , gcp-id-token , gcp-iam , aws-iam |
auth.config.identity-id | The file path where the machine identity id is stored This field is required when using any of the following auth types: kubernetes , azure , gcp-id-token , gcp-iam , or aws-iam . |
auth.config.service-account-token | Path to the Kubernetes service account token to use (optional) Default: /var/run/secrets/kubernetes.io/serviceaccount/token |
auth.config.service-account-key | Path to your GCP service account key file. This field is required when using gcp-iam auth type.Please note that the file should be in JSON format. |
auth.config.client-id | The file path where the universal-auth client id is stored. |
auth.config.client-secret | The file path where the universal-auth client secret is stored. |
auth.config.remove_client_secret_on_read | This will instruct the agent to remove the client secret from disk. |
sinks[].type | The type of sink in a list of sinks. Each item specifies a sink type. Currently, only "file" type is available. |
sinks[].config.path | The file path where the access token should be stored for each sink in the list. |
templates[].source-path | The path to the template file that should be used to render secrets. |
templates[].template-content | The inline secret template to be used for rendering the secrets. |
templates[].destination-path | The path where the rendered secrets from the source template will be saved to. |
templates[].config.polling-interval | How frequently to check for secret changes. Default: 5 minutes (optional) |
templates[].config.execute.command | The command to execute when secret change is detected (optional) |
templates[].config.execute.timeout | How long in seconds to wait for command to execute before timing out (optional) |
Universal Auth
Create a universal auth machine identity
Configure the agent
auth
field when using the Universal Auth method.Native Kubernetes
Create a Kubernetes machine identity
Configure the agent
auth
field when using the Kubernetes method.Native Azure
Create an Azure machine identity
Configure the agent
auth
field when using the Azure method.Native GCP ID Token
Create a GCP machine identity
Configure the agent
auth
field when using the GCP ID Token method.GCP IAM
Create a GCP machine identity
Configure the agent
auth
field when using the GCP IAM method.Native AWS IAM
Create an AWS machine identity
Configure the agent
auth
field when using the AWS IAM method.=
sign. You’ll notice that a custom function named secret
is used to fetch the secrets.
This function takes the following arguments: secret "<project-id>" "<environment-slug>" "<secret-path>"
.
listSecrets
recursive
, which defaults to false, and expandSecretReferences
, which defaults to true and expands the returned secrets.Returns: A single secret object with the following keys Key, WorkspaceId, Value, SecretPath, Type, ID, and Comment
getSecretByName
Key, WorkspaceId, Value, Type, ID, and Comment