From 2ca476f21e35923229181568c9ebdc1f96daa86d Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Sat, 7 Jun 2025 03:04:45 +0400 Subject: [PATCH] Update gateway.mdx --- docs/cli/commands/gateway.mdx | 138 ++++++++++------------------------ 1 file changed, 40 insertions(+), 98 deletions(-) diff --git a/docs/cli/commands/gateway.mdx b/docs/cli/commands/gateway.mdx index bd3ce503a..a12493c58 100644 --- a/docs/cli/commands/gateway.mdx +++ b/docs/cli/commands/gateway.mdx @@ -26,13 +26,11 @@ Run the Infisical gateway in the foreground or manage its systemd service instal Run the Infisical gateway in the foreground. The gateway will connect to the relay service and maintain a persistent connection. ```bash - infisical gateway --token= --domain= + infisical gateway --domain= --auth-method= ``` ### Authentication - - The Infisical CLI supports multiple authentication methods. Below are the available authentication methods, with their respective flags. @@ -53,19 +51,10 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create a universal auth machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/universal-auth). - - - Run the `login` command with the following flags to obtain an access token: + ```bash + infisical gateway --auth-method=universal-auth --client-id= --client-secret= + ``` - ```bash - infisical gateway --auth-method=universal-auth --client-id= --client-secret= - ``` - - - The Native Kubernetes method is used to authenticate with Infisical when running in a Kubernetes environment. It requires a service account token to authenticate with Infisical. @@ -85,20 +74,10 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create a Kubernetes machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/kubernetes-auth). - - - Run the `login` command with the following flags to obtain an access token: - ```bash - # --service-account-token-path is optional, and will default to '/var/run/secrets/kubernetes.io/serviceaccount/token' if not provided. - infisical gateway --auth-method=kubernetes --machine-identity-id= --service-account-token-path= - ``` - - - + ```bash + infisical gateway --auth-method=kubernetes --machine-identity-id= + ``` @@ -115,18 +94,12 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create an Azure machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/azure-auth). - - - Run the `login` command with the following flags to obtain an access token: - ```bash - infisical gateway --auth-method=azure --machine-identity-id= - ``` - - + + ```bash + infisical gateway --auth-method=azure --machine-identity-id= + ``` + The Native GCP ID Token method is used to authenticate with Infisical when running in a GCP environment. @@ -142,18 +115,12 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create a GCP machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/gcp-auth). - - - Run the `login` command with the following flags to obtain an access token: - ```bash - infisical gateway --auth-method=gcp-id-token --machine-identity-id= - ``` - - + + ```bash + infisical gateway --auth-method=gcp-id-token --machine-identity-id= + ``` + @@ -173,18 +140,9 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create a GCP machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/gcp-auth). - - - Run the `login` command with the following flags to obtain an access token: - - ```bash - infisical gateway --auth-method=gcp-iam --machine-identity-id= --service-account-key-file-path= - ``` - - + ```bash + infisical gateway --auth-method=gcp-iam --machine-identity-id= --service-account-key-file-path= + ``` @@ -201,18 +159,10 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create an AWS machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/aws-auth). - - - Run the `login` command with the following flags to obtain an access token: - ```bash infisical gateway --auth-method=aws-iam --machine-identity-id= ``` - - + @@ -232,18 +182,9 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - To create an OIDC machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/oidc-auth/general). - - - Run the `login` command with the following flags to obtain an access token: - - ```bash - infisical gateway --auth-method=oidc-auth --machine-identity-id= --jwt= - ``` - - + ```bash + infisical gateway --auth-method=oidc-auth --machine-identity-id= --jwt= + ``` @@ -263,25 +204,26 @@ Run the Infisical gateway in the foreground or manage its systemd service instal - - - Run the `login` command with the following flags to obtain an access token: - - ```bash - infisical gateway --auth-method=jwt-auth --jwt= --machine-identity-id= - ``` - - - - - You can use the `--token` flag to authenticate with Infisical with a raw machine identity access token. If the token is passed, no other flags are needed. ```bash - # Example - infisical gateway --token= + infisical gateway --auth-method=jwt-auth --jwt= --machine-identity-id= + ``` + + + You can use the `INFISICAL_TOKEN` environment variable to authenticate with Infisical with a raw machine identity access token. + + + + + The machine identity access token to use for authentication. + + + + + ```bash + infisical gateway --token= ``` - You may also expose the token to the CLI by setting the environment variable `INFISICAL_TOKEN` before executing the gateway command.