Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs: add screenshots
adilson2ea470fef451
diff --git a/backend/src/ee/services/dynamic-secret/providers/models.ts b/backend/src/ee/services/dynamic-secret/providers/models.tsindex 7456694457..484c53b648 100644--- a/backend/src/ee/services/dynamic-secret/providers/models.ts+++ b/backend/src/ee/services/dynamic-secret/providers/models.ts@@ -830,73 +830,88 @@ const DynamicSecretTailscaleAuthSchema = z.discriminatedUnion("method", [})]);-export const DynamicSecretTailscaleSchema = z.discriminatedUnion("authType", [- z.object({- authType: z.literal(TailscaleKeyAuthType.AuthKeys),- auth: DynamicSecretTailscaleAuthSchema,- tailnet: z- .string()- .trim()- .min(1)- .default("-")- .describe("Tailnet identifier. Use '-' for the token owner's default tailnet."),- description: z.string().trim().max(50).optional().describe("Description applied to the created key."),- tags: z- .array(z.string().trim().min(1))- .default([])- .describe("ACL tags to attach to devices (e.g. tag:ci). Required when authenticating with an OAuth token."),- reusable: z.boolean().default(false).describe("Whether the auth key can register multiple devices."),- ephemeral: z.boolean().default(false).describe("Whether devices registered with the key are ephemeral."),- preauthorized: z.boolean().default(false).describe("Whether devices registered with the key are pre-authorized.")- }),- z.object({- authType: z.literal(TailscaleKeyAuthType.OAuthKeys),- auth: DynamicSecretTailscaleAuthSchema,- tailnet: z- .string()- .trim()- .min(1)- .default("-")- .describe("Tailnet identifier. Use '-' for the token owner's default tailnet."),- description: z.string().trim().max(50).optional().describe("Description applied to the created OAuth client."),- tags: z- .array(z.string().trim().min(1))- .default([])- .describe("ACL tags to attach (e.g. tag:ci). Required if scopes include devices:core or auth_keys."),- scopes: z.array(z.string().trim().min(1)).min(1).describe("OAuth scopes granted to the client.")- }),- z.object({- authType: z.literal(TailscaleKeyAuthType.FederatedKeys),- auth: DynamicSecretTailscaleAuthSchema,- tailnet: z- .string()- .trim()- .min(1)- .default("-")- .describe("Tailnet identifier. Use '-' for the token owner's default tailnet."),- description: z- .string()- .trim()- .max(50)- .optional()- .describe("Description applied to the created federated identity."),- tags: z- .array(z.string().trim().min(1))- .default([])- .describe("ACL tags to attach (e.g. tag:ci). Required if scopes include devices:core or auth_keys."),- scopes: z- .array(z.string().trim().min(1))- .min(1)- .describe("OAuth scopes granted to tokens issued via this federated identity."),- issuer: z.string().trim().min(1).describe("HTTPS URL of the OIDC issuer trusted for token exchange."),- subject: z.string().trim().min(1).describe("Pattern matched against the sub claim of the OIDC identity token."),- audience: z- .string()- .trim()- .optional()- .describe("Audience for the OIDC token exchange. Tailscale auto-generates one if omitted.")- })-]);+export const DynamicSecretTailscaleSchema = z+ .discriminatedUnion("authType", [+ z.object({+ authType: z.literal(TailscaleKeyAuthType.AuthKeys),+ auth: DynamicSecretTailscaleAuthSchema,+ tailnet: z+ .string()+ .trim()+ .min(1)+ .default("-")+ .describe("Tailnet identifier. Use '-' for the token owner's default tailnet."),+ description: z.string().trim().max(50).optional().describe("Description applied to the created key."),+ tags: z+ .array(z.string().trim().min(1))+ .default([])+ .describe("ACL tags to attach to devices (e.g. tag:ci). Required when authenticating with an OAuth token."),+ reusable: z.boolean().default(false).describe("Whether the auth key can register multiple devices."),+ ephemeral: z.boolean().default(false).describe("Whether devices registered with the key are ephemeral."),+ preauthorized: z.boolean().default(false).describe("Whether devices registered with the key are pre-authorized.")+ }),+ z.object({+ authType: z.literal(TailscaleKeyAuthType.OAuthKeys),+ auth: DynamicSecretTailscaleAuthSchema,+ tailnet: z+ .string()+ .trim()+ .min(1)+ .default("-")+ .describe("Tailnet identifier. Use '-' for the token owner's default tailnet."),+ description: z.string().trim().max(50).optional().describe("Description applied to the created OAuth client."),+ tags: z+ .array(z.string().trim().min(1))+ .default([])+ .describe("ACL tags to attach (e.g. tag:ci). Required if scopes include devices:core or auth_keys."),+ scopes: z.array(z.string().trim().min(1)).min(1).describe("OAuth scopes granted to the client.")+ }),+ z.object({+ authType: z.literal(TailscaleKeyAuthType.FederatedKeys),+ auth: DynamicSecretTailscaleAuthSchema,+ tailnet: z+ .string()+ .trim()+ .min(1)+ .default("-")+ .describe("Tailnet identifier. Use '-' for the token owner's default tailnet."),+ description: z+ .string()+ .trim()+ .max(50)+ .optional()+ .describe("Description applied to the created federated identity."),+ tags: z+ .array(z.string().trim().min(1))+ .default([])+ .describe("ACL tags to attach (e.g. tag:ci). Required if scopes include devices:core or auth_keys."),+ scopes: z+ .array(z.string().trim().min(1))+ .min(1)+ .describe("OAuth scopes granted to tokens issued via this federated identity."),+ issuer: z.string().trim().min(1).describe("HTTPS URL of the OIDC issuer trusted for token exchange."),+ subject: z.string().trim().min(1).describe("Pattern matched against the sub claim of the OIDC identity token."),+ audience: z+ .string()+ .trim()+ .optional()+ .describe("Audience for the OIDC token exchange. Tailscale auto-generates one if omitted.")+ })+ ])+ .superRefine((data, ctx) => {+ // Mirrors the UI validation: Tailscale requires ACL tags on tailnet-owned auth keys created via OAuth.+ if (+ data.authType === TailscaleKeyAuthType.AuthKeys &&+ data.auth.method === TailscaleAuthMethod.OAuth &&+ data.tags.length === 0+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ path: ["tags"],+ message: "Tags are required when creating auth keys with OAuth authentication"+ });+ }+ });export const DynamicSecretSshSchema = z.object({principals: z.array(z.string().trim().min(1)).min(1),diff --git a/docs/documentation/platform/dynamic-secrets/tailscale.mdx b/docs/documentation/platform/dynamic-secrets/tailscale.mdxindex 9fb69b9f6d..322029288f 100644--- a/docs/documentation/platform/dynamic-secrets/tailscale.mdx+++ b/docs/documentation/platform/dynamic-secrets/tailscale.mdx@@ -7,18 +7,23 @@ The Infisical Tailscale dynamic secret allows you to generate short-lived Tailsc## Prerequisites-Infisical needs a credential that is allowed to create and revoke keys in your tailnet. You can authenticate with either a Tailscale **API access token** or a Tailscale **OAuth client**.+Infisical needs a credential that is allowed to create and revoke keys in your tailnet. You can authenticate with either **API access token** or **OAuth client**.<Tabs><Tab title="API Key"><Steps><Step title="Open the Tailscale admin console">- Navigate to [Settings → Keys](https://login.tailscale.com/admin/settings/keys) in the Tailscale admin console.+ Open the Tailscale admin console and select **Settings** in the top navigation, then open [Settings → Keys](https://login.tailscale.com/admin/settings/keys).++ + +</Step><Step title="Generate an API access token">- Click **Generate access token…**, give it a description, and create the token.+ In the **API access tokens** section, click **Generate access token…**, give it a description, set an expiration (up to 90 days), and create the token.- + + Copy the token and save it for later steps. This token is used by Infisical to create and revoke keys.</Step>@@ -27,19 +32,32 @@ Infisical needs a credential that is allowed to create and revoke keys in your t<Tab title="OAuth"><Steps><Step title="Open the Tailscale admin console">- Navigate to [Settings → OAuth clients](https://login.tailscale.com/admin/settings/oauth) in the Tailscale admin console.+ Open the Tailscale admin console and select **Settings** in the top navigation, then open **Trust credentials** in the sidebar.++ + </Step>- <Step title="Generate an OAuth client">- Click **Generate OAuth client…** and grant the scopes required for the keys you want to mint (for example, write access to `auth_keys` and/or `devices`). Attach any ACL tags that the client must be allowed to assign.+ <Step title="Create a trust credential">+ Click **+ Credential** to start the new credential wizard.++ ++ Choose **OAuth**, then click **Continue**.++ - + Under **Keys**, grant **write** access to the scopes for the credentials you plan to mint (for example, `auth_keys`, `oauth_keys`, and/or `federated_keys`). Attach any ACL tags the credential must be allowed to assign (for example, `tag:infisical-dynamic-secrets`), then click **Generate credential**.- Copy the **Client ID** and **Client Secret** and save them for later steps.+ ++ Copy the **Client ID** and **Client Secret** and save them for later steps. The client secret is shown only once.++ </Step></Steps><Note>- Tailscale requires ACL tags on tailnet-owned auth keys created through OAuth. Make sure the tags you plan to use are owned by the OAuth client in your tailnet policy file.+ Tailscale requires ACL tags on tailnet-owned auth keys created through OAuth. Make sure the tags you plan to use are owned by the trust credential in your tailnet policy file.</Note></Tab></Tabs>@@ -124,6 +142,10 @@ Infisical needs a credential that is allowed to create and revoke keys in your t<ParamField path="Pre-authorized" type="boolean" default="false">Whether devices registered with the key are pre-authorized. Available only when the key type is **Auth Key**.</ParamField>++ <Note>+ All credentials are created with `ephemeral` set to `false` because they are managed by Infisical. This ensures that only one system is responsible for revoking the credentials, avoiding concurrency issues.+ </Note></Step><Step title="Click `Submit`">After submitting the form, you will see a dynamic secret created in the dashboard.@@ -142,14 +164,15 @@ Infisical needs a credential that is allowed to create and revoke keys in your tOnce you click the `Submit` button, a new lease will be generated and its values will be shown to you. The values returned depend on the key type:- - **Auth Key**: an `AUTH_KEY` (the Tailscale auth key) and its `KEY_ID`.+ - **Auth Key**: an `AUTH_KEY` and its `KEY_ID`.- **OAuth Client**: a `CLIENT_ID` and `CLIENT_SECRET`.- **Federated Identity**: a `FEDERATED_CREDENTIAL_ID` and an `AUDIENCE`. No secret is issued; the workload authenticates by exchanging its own OIDC token for a short-lived Tailscale token.+ {/* TODO: capture Infisical UI screenshot — lease.png does not exist yet */}<Warning>- Copy these values right away. For security reasons, secret values (auth keys and client secrets) are only shown once at creation time and cannot be retrieved again afterwards.+ Copy these values right away. For security reasons, secret values (auth keys and client secrets) are shown only once at creation time and cannot be retrieved again. If the issued credential is a federated identity, you can view its values again in the Tailscale dashboard.</Warning></Step></Steps>diff --git a/docs/images/platform/dynamic-secrets/tailscale/lease.png b/docs/images/platform/dynamic-secrets/tailscale/lease.pngnew file mode 100644index 0000000000..f86bfc6c16Binary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/lease.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/modal.png b/docs/images/platform/dynamic-secrets/tailscale/modal.pngnew file mode 100644index 0000000000..1306b07e4eBinary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/modal.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-1.png b/docs/images/platform/dynamic-secrets/tailscale/step-1.pngnew file mode 100644index 0000000000..a569cb169cBinary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-1.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-2-access-token.png b/docs/images/platform/dynamic-secrets/tailscale/step-2-access-token.pngnew file mode 100644index 0000000000..b53787ede2Binary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-2-access-token.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-2-trusted-credentials.png b/docs/images/platform/dynamic-secrets/tailscale/step-2-trusted-credentials.pngnew file mode 100644index 0000000000..f5ee5fc8eaBinary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-2-trusted-credentials.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-3-access-token.png b/docs/images/platform/dynamic-secrets/tailscale/step-3-access-token.pngnew file mode 100644index 0000000000..f5b285fedeBinary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-3-access-token.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-3-trusted-credentials.png b/docs/images/platform/dynamic-secrets/tailscale/step-3-trusted-credentials.pngnew file mode 100644index 0000000000..0c0e51433cBinary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-3-trusted-credentials.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-4-access-token.png b/docs/images/platform/dynamic-secrets/tailscale/step-4-access-token.pngnew file mode 100644index 0000000000..c57f153f36Binary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-4-access-token.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-4-trusted-credentials.png b/docs/images/platform/dynamic-secrets/tailscale/step-4-trusted-credentials.pngnew file mode 100644index 0000000000..39262e58a5Binary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-4-trusted-credentials.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-5-trusted-credentials.png b/docs/images/platform/dynamic-secrets/tailscale/step-5-trusted-credentials.pngnew file mode 100644index 0000000000..b372cfc4b0Binary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-5-trusted-credentials.png differdiff --git a/docs/images/platform/dynamic-secrets/tailscale/step-6-trusted-credentials.png b/docs/images/platform/dynamic-secrets/tailscale/step-6-trusted-credentials.pngnew file mode 100644index 0000000000..4745bff4bcBinary files /dev/null and b/docs/images/platform/dynamic-secrets/tailscale/step-6-trusted-credentials.png differ