Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

futher improvements

Daniel54fe36cd762a
diff --git a/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx
index d605da9790..40d7b31fe0 100644
--- a/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx
+++ b/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx
@@ -21,7 +21,7 @@ The operator caches authenticated credentials using the token's TTL (at 70% of t
## Example
-Only define **one** authentication method per resource. Note that `spec.method` uses kebab-case while the corresponding configuration field uses camelCase.
+You can only define one authentication method per InfisicalAuth resource.
<AccordionGroup>
<Accordion title="Kubernetes Auth (Recommended)">
@@ -29,8 +29,114 @@ Authenticates using a Kubernetes service account token. This is the recommended
[Read more about Kubernetes Auth](/documentation/platform/identities/kubernetes-auth).
-<KubernetesAuthShortLivedTokens />
-<KubernetesAuthGatewayReviewer />
+<Accordion title="Short-lived service account tokens (Recommended)">
+ <Steps>
+ <KubernetesAuthShortLivedTokens />
+
+ <Step title="Create a generic Kubernetes secret containing the machine identity ID">
+ Create a generic Kubernetes secret containing the machine identity ID. Following this example, we'll create a secret named `kubernetes-credentials` in the default namespace, and add the machine identity ID as the value of the `identityId` key.
+
+ ```bash
+ kubectl create secret generic kubernetes-credentials \
+ --from-literal=identityId="<your-machine-identity-id>"
+ ```
+
+ <Tip>
+ You can find the machine identity ID in the Infisical UI by going to Access Control > Machine Identities, and clicking on the identity you want to view the details of.
+ </Tip>
+ </Step>
+
+ <Step title="Create the InfisicalAuth resource with your service account details">
+ After you bind the service account to the `system:auth-delegator` cluster role, you are ready to create the `InfisicalAuth` resource using the kubernetes auth method.
+
+
+ ```yaml infisical-auth.yaml
+ apiVersion: secrets.infisical.com/v1beta1
+ kind: InfisicalAuth
+ metadata:
+ name: my-infisical-auth
+ spec:
+ infisicalConnectionRef:
+ name: my-infisical-connection
+ namespace: default
+ method: kubernetes
+ kubernetes:
+ identityIdRef:
+ name: kubernetes-credentials
+ namespace: default
+ key: identityId
+ serviceAccountRef:
+ name: infisical-service-account
+ namespace: default
+ ```
+ </Step>
+
+ <Step title="Apply the resource">
+ ```bash
+ kubectl apply -f infisical-auth.yaml
+ ```
+ </Step>
+ </Steps>
+</Accordion>
+<Accordion title="Use Gateway as Reviewer">
+ <Note>
+ **When to use this option**: Choose this approach when you have a gateway deployed in your Kubernetes Cluster and wish to eliminate long-lived tokens. This approach simplifies Infisical Kubernetes Auth configuration, and only one service account will need to have the elevated `system:auth-delegator` ClusterRole binding.
+ </Note>
+
+ <Info>
+ **Note:** Gateway is a paid feature. - **Infisical Cloud users:** Gateway is
+ available under the **Enterprise Tier**. - **Self-Hosted Infisical:** Please
+ contact [[email protected]](mailto:[email protected]) to purchase an
+ enterprise license.
+ </Info>
+
+ <Steps>
+ <KubernetesAuthGatewayReviewer />
+
+ <Step title="Create a generic Kubernetes secret containing the machine identity ID">
+ Create a generic Kubernetes secret containing the machine identity ID. Following this example, we'll create a secret named `kubernetes-credentials` in the default namespace, and add the machine identity ID as the value of the `identityId` key.
+
+ ```bash
+ kubectl create secret generic kubernetes-credentials \
+ --from-literal=identityId="<your-machine-identity-id>"
+ ```
+ </Step>
+
+ <Step title="Create the InfisicalAuth resource">
+ After you have set up the Kubernetes Auth prerequisites above, add the identity ID and service account details to your InfisicalAuth resource.
+
+ ```yaml infisical-auth.yaml
+ apiVersion: secrets.infisical.com/v1beta1
+ kind: InfisicalAuth
+ metadata:
+ name: my-infisical-auth
+ spec:
+ infisicalConnectionRef:
+ name: my-infisical-connection
+ namespace: default
+ method: kubernetes
+ kubernetes:
+ identityIdRef:
+ name: kubernetes-credentials
+ namespace: default
+ key: identityId
+ serviceAccountRef:
+ name: infisical-service-account # Change to whichever service account you want the operator to use for authentication.
+ namespace: default
+ ```
+
+ <Tip>
+ Because you are using the gateway as the token reviewer, you are able to use a different service account for authentication. The gateway sits inside your Kubernetes cluster and has permissions to perform token reviews against the Kubernetes API Server. This means you can use any valid service account in the InfisicalAuth resource, as long as it lives inside the same Kubernetes cluster as the gateway configured inside Infisical.
+ </Tip>
+ </Step>
+
+ <Step title="Apply the resource">
+ ```bash
+ kubectl apply -f infisical-auth.yaml
+ ```
+ </Step>
+ </Steps>
+</Accordion>
| Field | Required | Description |
| ------------------------------ | -------- | --------------------------------------------------------- |
@@ -40,41 +146,8 @@ Authenticates using a Kubernetes service account token. This is the recommended
| `serviceAccountTokenAudiences` | No | Custom audiences for the generated service account token. |
<KubernetesAuthOperatorSetup apiVersion="v1beta1"/>
+</Accordion>
-
-```yaml infisical-auth.yaml
-apiVersion: secrets.infisical.com/v1beta1
-kind: InfisicalAuth
-metadata:
- name: my-infisical-auth
-spec:
- infisicalConnectionRef:
- name: my-infisical-connection
- namespace: default
- method: kubernetes
- kubernetes:
- identityIdRef:
- name: kubernetes-credentials
- namespace: default
- key: identityId
- serviceAccountRef:
- name: infisical-service-account
- namespace: default
-```
-
-The referenced Kubernetes secret must contain the machine identity ID:
-
-```bash
-kubectl create secret generic kubernetes-credentials \
- --from-literal=identityId="<your-machine-identity-id>"
-```
-
-Apply the resource:
-
-```bash
-kubectl apply -f infisical-auth.yaml
-```
- </Accordion>
<Accordion title="Universal Auth">
Authenticates using a client ID and client secret. Works anywhere, not tied to any cloud provider.
diff --git a/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx
index 69001eb1dc..ff75421bb3 100644
--- a/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx
+++ b/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx
@@ -6,7 +6,7 @@ description: "Learn how to configure the InfisicalConnection CRD to define how t
## Overview
-The **InfisicalConnection** CRD defines how the Infisical Operator connects to your Infisical instance. It holds the instance address and optional TLS configuration. Once created, it can be referenced by multiple `InfisicalAuth` so you only need to define connection details once per Infisical instance.
+The **InfisicalConnection** CRD defines how the Infisical Operator connects to your Infisical instance. It holds the instance address and an optional TLS configuration. Once created, it can be referenced by multiple `InfisicalAuth` CRDs so you only need to define connection details once per Infisical instance.
### Prerequisites
diff --git a/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx
index 9bad802fb0..66fcb76e5c 100644
--- a/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx
+++ b/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx
@@ -219,9 +219,27 @@ spec:
<Accordion title="authentication.kubernetesAuth">
The Kubernetes machine identity authentication method is used to authenticate with Infisical. The identity ID is stored in a field in the InfisicalSecret resource. This authentication method can only be used within a Kubernetes environment.
- <KubernetesAuthShortLivedTokens />
+ <Accordion title="Short-lived service account tokens (Recommended)">
+ <Steps>
+ <KubernetesAuthShortLivedTokens />
+ </Steps>
+ </Accordion>
<KubernetesAuthLongLivedTokens />
- <KubernetesAuthGatewayReviewer />
+ <Accordion title="Use Gateway as Reviewer">
+ <Note>
+ **When to use this option**: Choose this approach when you have a gateway deployed in your Kubernetes Cluster and wish to eliminate long-lived tokens. This approach simplifies Infisical Kubernetes Auth configuration, and only one service account will need to have the elevated `system:auth-delegator` ClusterRole binding.
+ </Note>
+
+ <Info>
+ **Note:** Gateway is a paid feature. - **Infisical Cloud users:** Gateway is
+ available under the **Enterprise Tier**. - **Self-Hosted Infisical:** Please
+ contact [[email protected]](mailto:[email protected]) to purchase an
+ enterprise license.
+ </Info>
+ <Steps>
+ <KubernetesAuthGatewayReviewer />
+ </Steps>
+ </Accordion>
Once you have set up the Kubernetes Auth prerequisites above, add the identity ID and service account details to your InfisicalSecret resource.
In the `authentication.kubernetesAuth.identityId` field, add the identity ID of the machine identity you created.
diff --git a/docs/snippets/documentation/platform/identities/kubernetes-auth-gateway-reviewer.mdx b/docs/snippets/documentation/platform/identities/kubernetes-auth-gateway-reviewer.mdx
index f8efc19a1d..216ea6d702 100644
--- a/docs/snippets/documentation/platform/identities/kubernetes-auth-gateway-reviewer.mdx
+++ b/docs/snippets/documentation/platform/identities/kubernetes-auth-gateway-reviewer.mdx
@@ -1,54 +1,11 @@
-<Accordion title="Use Gateway as Reviewer">
- <Note>
- **When to use this option**: Choose this approach when you have a gateway deployed in your Kubernetes Cluster and wish to eliminate long-lived tokens. This approach simplifies Infisical Kubernetes Auth configuration, and only one service account will need to have the elevated `system:auth-delegator` ClusterRole binding.
- </Note>
+<Step title="Deploying a gateway">
+ To deploy a gateway in your Kubernetes cluster, follow our [Gateway deployment guide using Helm](/documentation/platform/gateways/gateway-deployment).
+</Step>
- <Info>
- **Note:** Gateway is a paid feature. - **Infisical Cloud users:** Gateway is
- available under the **Enterprise Tier**. - **Self-Hosted Infisical:** Please
- contact [[email protected]](mailto:[email protected]) to purchase an
- enterprise license.
- </Info>
+<Step title="Configure the Kubernetes Auth authentication method for the identity">
+ To configure your Kubernetes Auth method to use the gateway as the token reviewer, set the `Review Method` to "Gateway as Reviewer", and select the gateway you want to use as the token reviewer.
- <Steps>
- <Step title="Deploying a gateway">
- To deploy a gateway in your Kubernetes cluster, follow our [Gateway deployment guide using Helm](/documentation/platform/gateways/gateway-deployment).
- </Step>
+ You can select either an individual gateway or a **Gateway Pool** for automatic failover. When a pool is selected, the platform routes through a healthy gateway at request time. See [Gateway Pools](/documentation/platform/gateways/gateway-pools) for more details.
- <Step title="Grant the gateway the system:auth-delegator ClusterRole binding">
- To grant the gateway the `system:auth-delegator` ClusterRole binding, you can use the following command:
-
- ```yaml gateway-role-binding.yaml
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRoleBinding
- metadata:
- name: infisical-token-reviewer-role-binding
- namespace: default # Replace with your namespace if not default
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: system:auth-delegator
- subjects:
- - kind: ServiceAccount
- name: infisical-gateway # The name of the gateway service account
- namespace: default # Replace with your namespace if not default
- ```
-
- ```bash
- kubectl apply -f gateway-role-binding.yaml
- ```
-
- <Tip>
- The gateway service account name is `infisical-gateway` by default if deployed using Helm.
- </Tip>
- </Step>
-
- <Step title="Configure the Kubernetes Auth authentication method for the identity">
- To configure your Kubernetes Auth method to use the gateway as the token reviewer, set the `Review Method` to "Gateway as Reviewer", and select the gateway you want to use as the token reviewer.
-
- You can select either an individual gateway or a **Gateway Pool** for automatic failover. When a pool is selected, the platform routes through a healthy gateway at request time. See [Gateway Pools](/documentation/platform/gateways/gateway-pools) for more details.
-
- ![identities organization create kubernetes auth method](/images/platform/identities/identities-kubernetes-auth-gateway-as-reviewer.png)
- </Step>
- </Steps>
-</Accordion>
+ ![identities organization create kubernetes auth method](/images/platform/identities/identities-kubernetes-auth-gateway-as-reviewer.png)
+</Step>
diff --git a/docs/snippets/documentation/platform/identities/kubernetes-auth-short-lived-tokens.mdx b/docs/snippets/documentation/platform/identities/kubernetes-auth-short-lived-tokens.mdx
index a6f07a8bc8..106af497ba 100644
--- a/docs/snippets/documentation/platform/identities/kubernetes-auth-short-lived-tokens.mdx
+++ b/docs/snippets/documentation/platform/identities/kubernetes-auth-short-lived-tokens.mdx
@@ -1,5 +1,3 @@
-<Accordion title="Short-lived service account tokens (Recommended)">
-<Steps>
<Step title="Create a machine identity">
To create an identity, head to your Organization Settings > Access Control > Identities and press **Create identity**.
@@ -73,6 +71,4 @@
```bash
kubectl apply -f infisical-cluster-role-binding.yaml
```
- </Step>
-</Steps>
-</Accordion>
+ </Step>
\ No newline at end of file