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
UI: add a tooltip on the UI explaining that this suffix is necessary
adilsonf83b989a8c3c
diff --git a/docs/documentation/platform/dynamic-secrets/gcp-iam.mdx b/docs/documentation/platform/dynamic-secrets/gcp-iam.mdxindex a76b7b2305..48e4c1ef3c 100644--- a/docs/documentation/platform/dynamic-secrets/gcp-iam.mdx+++ b/docs/documentation/platform/dynamic-secrets/gcp-iam.mdx@@ -73,6 +73,14 @@ The Infisical GCP IAM dynamic secret allows you to generate GCP service account</Step><Step title="Create Service Account">+ Create a new service account with an ID that follows this requirement:++ Your service account ID must end with the first two sections of your Infisical organization ID.++ Example:+ - Infisical organization ID: `df92581a-0fe9-42b5-b526-0a1e88ec8085`+ - Required service account ID suffix: `df92581a-0fe9`+</Step><Step title="Configure Service Account Permissions">@@ -121,7 +129,7 @@ The Infisical GCP IAM dynamic secret allows you to generate GCP service accountMaximum time-to-live for a generated secret</ParamField><ParamField path="Service Account Email" type="string" required>- The email tied to the service account created in earlier steps.+ The email tied to the service account created in earlier steps. The service account ID (the part of the email before `@`) must end with the first two sections of your Infisical organization ID, e.g. `my-service-account-df92581a-0fe9@my-project.iam.gserviceaccount.com` for organization ID `df92581a-0fe9-42b5-b526-0a1e88ec8085`.</ParamField><ParamField path="Token Scopes" type="string[]" default="https://www.googleapis.com/auth/iam, https://www.googleapis.com/auth/cloud-platform">The OAuth scopes granted to the generated access token. Defaults to `https://www.googleapis.com/auth/iam` and `https://www.googleapis.com/auth/cloud-platform` scopes. You can add additional scopes such as `https://www.googleapis.com/auth/drive`.diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/GcpIamInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/GcpIamInputForm.tsxindex da9e9890d2..d4bbc86afd 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/GcpIamInputForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/GcpIamInputForm.tsx@@ -7,6 +7,7 @@ import { z } from "zod";import { TtlFormLabel } from "@app/components/features";import { Button, FilterableSelect, FormControl, IconButton, Input } from "@app/components/v2";+import { useOrganization } from "@app/context";import { useCreateDynamicSecret } from "@app/hooks/api";import { DynamicSecretProviders } from "@app/hooks/api/dynamicSecret/types";import { ProjectEnv } from "@app/hooks/api/types";@@ -65,6 +66,9 @@ export const GcpIamInputForm = ({projectSlug,isSingleEnvironmentMode}: Props) => {+ const { currentOrg } = useOrganization();+ const expectedAccountIdSuffix = currentOrg.id.split("-").slice(0, 2).join("-");+const {control,formState: { isSubmitting },@@ -186,6 +190,7 @@ export const GcpIamInputForm = ({className="grow"isError={Boolean(error?.message)}errorText={error?.message}+ tooltipText={`The service account ID (the part of the email before "@") must end with the first two sections of your organization ID: "${expectedAccountIdSuffix}". Example: my-service-account-${expectedAccountIdSuffix}@my-project.iam.gserviceaccount.com`}helperText={<span>Don't know where to get this value?{" "}diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretGcpIamForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretGcpIamForm.tsxindex c85317ef62..58e0947fc0 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretGcpIamForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretGcpIamForm.tsx@@ -8,6 +8,7 @@ import { z } from "zod";import { TtlFormLabel } from "@app/components/features";import { createNotification } from "@app/components/notifications";import { Button, FormControl, IconButton, Input } from "@app/components/v2";+import { useOrganization } from "@app/context";import { useUpdateDynamicSecret } from "@app/hooks/api";import { TDynamicSecret } from "@app/hooks/api/dynamicSecret/types";@@ -61,6 +62,9 @@ export const EditDynamicSecretGcpIamForm = ({environment,projectSlug}: Props) => {+ const { currentOrg } = useOrganization();+ const expectedAccountIdSuffix = currentOrg.id.split("-").slice(0, 2).join("-");+const {control,formState: { isSubmitting },@@ -181,6 +185,7 @@ export const EditDynamicSecretGcpIamForm = ({className="grow"isError={Boolean(error?.message)}errorText={error?.message}+ tooltipText={`The service account ID (the part of the email before "@") must end with the first two sections of your organization ID: "${expectedAccountIdSuffix}". Example: my-service-account-${expectedAccountIdSuffix}@my-project.iam.gserviceaccount.com`}><Input {...field} /></FormControl>