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
Review fixes
x0322059ac445352319
diff --git a/backend/src/ee/services/dynamic-secret/providers/github.ts b/backend/src/ee/services/dynamic-secret/providers/github.tsindex 9b5f02c783..67d92b2a67 100644--- a/backend/src/ee/services/dynamic-secret/providers/github.ts+++ b/backend/src/ee/services/dynamic-secret/providers/github.ts@@ -33,8 +33,8 @@ export const GithubProvider = (): TDynamicProviderFns => {const nowInSeconds = Math.floor(Date.now() / 1000);const jwtPayload = {- iat: nowInSeconds - 60,- exp: nowInSeconds + 10 * 60 - 60,+ iat: nowInSeconds - 5,+ exp: nowInSeconds + 60,iss: String(appId)};@@ -110,9 +110,12 @@ export const GithubProvider = (): TDynamicProviderFns => {};};- const revoke = async (_inputs: unknown, entityId: string) => {- // GitHub installation access tokens cannot be revoked.- return { entityId };+ const revoke = async () => {+ // GitHub installation tokens cannot be revoked.+ throw new BadRequestError({+ message:+ "Github dynamic secret does not support revocation because GitHub itself cannot revoke installation tokens"+ });};const renew = async () => {diff --git a/docs/documentation/platform/dynamic-secrets/github.mdx b/docs/documentation/platform/dynamic-secrets/github.mdxindex 9eced246d4..b1ceb98716 100644--- a/docs/documentation/platform/dynamic-secrets/github.mdx+++ b/docs/documentation/platform/dynamic-secrets/github.mdx@@ -1,23 +1,15 @@----title: "Github"-description: "Learn how to dynamically generate Github app tokens."+title: "GitHub"+description: "Learn how to dynamically generate GitHub App tokens."----The Infisical Github dynamic secret allows you to generate short-lived tokens for a Github app on demand based on service account permissions.+The Infisical GitHub dynamic secret allows you to generate short-lived tokens for a GitHub App on demand based on service account permissions.-<Warning>- Github app tokens cannot be revoked. As such, revoking a token on Infisical does not invalidate the Github token; it remains active until it expires.-</Warning>--<Warning>- Github app tokens are fixed to a TTL of 1 hour.-</Warning>--## Setup Github App+## Setup GitHub App<Steps><Step title="Create an application on GitHub">- Navigate to [GitHub app settings](https://github.com/settings/apps) and click **New GitHub App**.+ Navigate to [GitHub App settings](https://github.com/settings/apps) and click **New GitHub App**.@@ -26,9 +18,9 @@ The Infisical Github dynamic secret allows you to generate short-lived tokens foDisable webhook by unchecking the Active checkbox.- Configure the app's permissions to grant the necessary access for the dynamic secret's short-lived tokens.+ Configure the app's permissions to grant the necessary access for the dynamic secret's short-lived tokens based on your use case.- Create the Github application.+ Create the GitHub Application.<Note>@@ -37,7 +29,7 @@ The Infisical Github dynamic secret allows you to generate short-lived tokens fo</Note></Step><Step title="Save app credentials">- Copy the **App ID** and generate a new **Private Key** for your Github application.+ Copy the **App ID** and generate a new **Private Key** for your GitHub Application.Save these for later steps.@@ -53,7 +45,7 @@ The Infisical Github dynamic secret allows you to generate short-lived tokens fo</Step></Steps>-## Set up Dynamic Secrets with Github+## Set up Dynamic Secrets with GitHub<Steps><Step title="Open Secret Overview Dashboard">@@ -62,7 +54,7 @@ The Infisical Github dynamic secret allows you to generate short-lived tokens fo<Step title="Click on the 'Add Dynamic Secret' button"></Step>- <Step title="Select 'Github'">+ <Step title="Select 'GitHub'"></Step><Step title="Provide the inputs for dynamic secret parameters">@@ -110,11 +102,11 @@ This will allow you to see the expiration time of the lease or delete a lease be<Warning>- Github app tokens cannot be revoked. As such, revoking a token on Infisical does not invalidate the Github token; it remains active until it expires.+ GitHub App tokens cannot be revoked. As such, revoking a token on Infisical does not invalidate the GitHub token; it remains active until it expires.</Warning>## Renew Leases-<Warning>- Github app tokens cannot be renewed because they are fixed to a lifetime of 1 hour.-</Warning>+<Note>+ GitHub App tokens cannot be renewed because they are fixed to a lifetime of 1 hour.+</Note>diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CreateDynamicSecretForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CreateDynamicSecretForm.tsxindex 9e79cd0c82..18af939b16 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CreateDynamicSecretForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/CreateDynamicSecretForm.tsx@@ -148,7 +148,7 @@ const DYNAMIC_SECRET_LIST = [{icon: <FontAwesomeIcon icon={faGithub} size="lg" />,provider: DynamicSecretProviders.Github,- title: "Github"+ title: "GitHub"}];