Skip to content

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

fix docs

Thiago Araujo da Silvaba126218696b
diff --git a/docs/docs.json b/docs/docs.json
index 8f0e7f1116..8d4f1a0d53 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -86,8 +86,14 @@
"documentation/platform/identities/machine-identities"
]
},
- "documentation/platform/oauth-applications",
- "documentation/platform/oauth-token-exchange",
+ {
+ "group": "OAuth applications",
+ "pages": [
+ "documentation/platform/oauth-applications/overview",
+ "documentation/platform/oauth-applications/authorization-code",
+ "documentation/platform/oauth-applications/token-exchange"
+ ]
+ },
{
"group": "Access control",
"pages": [
@@ -4540,6 +4546,14 @@
}
},
"redirects": [
+ {
+ "source": "/documentation/platform/oauth-applications",
+ "destination": "/documentation/platform/oauth-applications/overview"
+ },
+ {
+ "source": "/documentation/platform/oauth-token-exchange",
+ "destination": "/documentation/platform/oauth-applications/token-exchange"
+ },
{
"source": "/integrations/platforms/docker-intro",
"destination": "/integrations/platforms/docker"
diff --git a/docs/documentation/platform/oauth-applications.mdx b/docs/documentation/platform/oauth-applications/authorization-code.mdx
similarity index 88%
rename from docs/documentation/platform/oauth-applications.mdx
rename to docs/documentation/platform/oauth-applications/authorization-code.mdx
index b49c0260e4..09e0f1c35c 100644
--- a/docs/documentation/platform/oauth-applications.mdx
+++ b/docs/documentation/platform/oauth-applications/authorization-code.mdx
@@ -1,14 +1,14 @@
---
-title: OAuth applications
+title: Authorization code
description: "Let external platforms request delegated access to Infisical on a user's behalf using OAuth 2.0."
---
-**OAuth Applications** let you register an external platform as an OAuth 2.0 client so it can request **delegated access** to Infisical on behalf of one of your users. The platform never sees the user's password or session; instead it runs a standard authorization code flow, the user reviews and approves the request on an Infisical consent screen, and the platform receives short-lived access and refresh tokens scoped to that user.
+The **authorization code** flow lets an [OAuth application](/documentation/platform/oauth-applications/overview) request **delegated access** to Infisical on behalf of one of your users. The platform never sees the user's password or session; instead it runs a standard authorization code flow, the user reviews and approves the request on an Infisical consent screen, and the platform receives short-lived access and refresh tokens scoped to that user.
A common use case is wiring Infisical into a developer platform as an External Auth provider, so that `infisical run` can fetch secrets at runtime inside a remote development environment using the developer's own permissions.
<Info>
- This page covers the browser-based authorization code flow, where each user approves the application on a consent screen. If you are registering trusted middleware that acts on behalf of many users and has no browser to redirect through, see [OAuth token exchange](/documentation/platform/oauth-token-exchange).
+ This page covers the browser-based flow, where each user approves the application on a consent screen. If you are registering trusted middleware that acts on behalf of many users and has no browser to redirect through, see [token exchange](/documentation/platform/oauth-applications/token-exchange).
</Info>
<Note>
@@ -17,7 +17,7 @@ A common use case is wiring Infisical into a developer platform as an External A
## Concept
-OAuth Applications turn Infisical into an OAuth 2.0 authorization server. The model has three parties:
+This flow turns Infisical into an OAuth 2.0 authorization server. The model has three parties:
- **OAuth application (client)** - the external platform you register in Infisical. It holds a client ID and client secret.
- **User (resource owner)** - the Infisical user who authorizes the application to act on their behalf.
@@ -70,7 +70,7 @@ OAuth applications are managed at the organization level. You need permission to
- **Name** (required): A friendly name shown to users on the consent screen.
- **Description** (optional): A short note about what the application is used for. Also shown on the consent screen.
- - **Flow**: Leave **Authorization code** selected. See [OAuth token exchange](/documentation/platform/oauth-token-exchange) for the other flow.
+ - **Flow**: Leave **Authorization code** selected. See [token exchange](/documentation/platform/oauth-applications/token-exchange) for the other flow.
- **Redirect URIs** (required): One URI per line. The authorization flow will only ever redirect to one of these exact URIs. Each must use `https://`; `http://` is allowed only for loopback addresses such as `localhost`, `127.0.0.1`, and `::1`.
- **Require PKCE (S256)**: When enabled, authorization requests that do not include a PKCE code challenge are rejected. Recommended for public clients.
</Step>
@@ -177,4 +177,4 @@ The effective permissions are the **intersection** of the user's permissions and
Deleting an OAuth application from the **OAuth Applications** tab immediately revokes every access and refresh token that application issued, so they stop working on the next request rather than living until expiry.
-Rotating the client secret invalidates the old secret for future token requests but leaves already-issued tokens working until they expire, so users of the integration are not signed out. The secret alone cannot mint a token in this flow: it has to be paired with an authorization code from a user's browser or with a refresh token. To cut existing access off immediately, delete the application. Rotation on a [token exchange](/documentation/platform/oauth-token-exchange) application behaves differently, because there the secret is sufficient on its own.
+Rotating the client secret invalidates the old secret for future token requests but leaves already-issued tokens working until they expire, so users of the integration are not signed out. The secret alone cannot mint a token in this flow: it has to be paired with an authorization code from a user's browser or with a refresh token. To cut existing access off immediately, delete the application. Rotation on a [token exchange](/documentation/platform/oauth-applications/token-exchange) application behaves differently, because there the secret is sufficient on its own.
diff --git a/docs/documentation/platform/oauth-applications/overview.mdx b/docs/documentation/platform/oauth-applications/overview.mdx
new file mode 100644
index 0000000000..cbb7f035ba
--- /dev/null
+++ b/docs/documentation/platform/oauth-applications/overview.mdx
@@ -0,0 +1,50 @@
+---
+title: OAuth applications
+sidebarTitle: Overview
+description: "Let external platforms and services act in Infisical on behalf of your users."
+---
+
+**OAuth Applications** let you register an outside platform or service as an OAuth 2.0 client so it can act in Infisical **on behalf of one of your users** rather than as a shared service account. The client never sees the user's password or session, every action is attributed to the real person, and the access it gets is bounded by that person's own permissions.
+
+An OAuth application obtains its tokens through one of two flows, chosen when you register it:
+
+<CardGroup cols={2}>
+ <Card
+ title="Authorization code"
+ icon="browser"
+ href="/documentation/platform/oauth-applications/authorization-code"
+ >
+ The user approves the application on an Infisical consent screen in their browser. Best for a platform integrating with Infisical as an external auth provider, such as one where `infisical run` fetches secrets with the developer's own permissions.
+ </Card>
+ <Card
+ title="Token exchange"
+ icon="right-left"
+ href="/documentation/platform/oauth-applications/token-exchange"
+ >
+ Trusted middleware you run presents a user's token from your identity provider and receives an Infisical token for that same user. Best for MCP servers, internal developer portals, and API gateways that have no browser to redirect through.
+ </Card>
+</CardGroup>
+
+## Choosing a flow
+
+| | Authorization code | Token exchange |
+| --- | --- | --- |
+| Who approves the delegation | Each user, on a consent screen | An organization admin, once at registration |
+| Needs a browser redirect | Yes | No |
+| What the token can do | Only the requested scopes, intersected with the user's permissions | The user's full effective permissions |
+| Refresh tokens | Yes | No, exchange again instead |
+| Prerequisites | Registered redirect URIs | An active OIDC SSO configuration for the organization |
+
+## Managing applications
+
+OAuth applications are managed at the organization level. Head to **Organization Settings** and open **OAuth Applications** from the sidebar. You need permission to manage OAuth applications in the organization, and token exchange additionally requires permission to manage SSO.
+
+Every application gets a **Client ID** and a **Client Secret** on creation. The secret is shown only once: store it securely, and if it is lost, rotate it from the application's menu rather than expecting to retrieve the original value.
+
+## What a delegated token can never do
+
+Whichever flow issued it, a delegated token cannot manage the authorizing user's account. Password, MFA, session, TOTP, and notification endpoints reject it outright, so an integration can never use its access to take over the account behind it. The individual flow pages cover the rest of each one's limits.
+
+## Revoking access
+
+Deleting an application immediately revokes every token it issued, in both flows. The other levers differ, most notably client secret rotation, which cuts off existing tokens on a token exchange application but not on an authorization code one. See [revoking authorization code access](/documentation/platform/oauth-applications/authorization-code#revoking-access) and [revoking token exchange access](/documentation/platform/oauth-applications/token-exchange#revoking-access).
diff --git a/docs/documentation/platform/oauth-token-exchange.mdx b/docs/documentation/platform/oauth-applications/token-exchange.mdx
similarity index 96%
rename from docs/documentation/platform/oauth-token-exchange.mdx
rename to docs/documentation/platform/oauth-applications/token-exchange.mdx
index 8901294ec7..d183166432 100644
--- a/docs/documentation/platform/oauth-token-exchange.mdx
+++ b/docs/documentation/platform/oauth-applications/token-exchange.mdx
@@ -1,12 +1,14 @@
---
-title: OAuth token exchange
+title: Token exchange
description: "Let trusted middleware act on behalf of your users in Infisical using tokens from your own identity provider."
---
**Token exchange** lets a trusted service you run present a user's token from your identity provider and receive an Infisical token for that same user. The service acts as the user rather than as a shared service account, so every action is attributed to the real person and bounded by their own access.
+It is one of the two flows an [OAuth application](/documentation/platform/oauth-applications/overview) can use, and the one to reach for when there is no browser to redirect.
+
<Info>
- This page is for organization admins registering middleware that acts on behalf of many users. If your platform can redirect a user's browser to a consent screen, use the authorization code flow on [OAuth applications](/documentation/platform/oauth-applications) instead.
+ This page is for organization admins registering middleware that acts on behalf of many users. If your platform can redirect a user's browser to a consent screen, use the [authorization code](/documentation/platform/oauth-applications/authorization-code) flow instead.
</Info>
<Note>
@@ -96,7 +98,7 @@ You need permission to manage both OAuth applications and SSO, because enabling
There is no issuer to set here. Infisical always verifies against your organization's OIDC SSO provider, which cannot be overridden per application.
- An application uses one flow or the other. Registering it for token exchange rules out the authorization code flow, and the reverse, so a service that needs both needs two registrations. This holds for the API too: sending `grantTypes` containing both the token-exchange grant and `authorization_code` is rejected.
+ An application uses one flow or the other, so a service that needs both needs two registrations.
</Step>
<Step title="Store the credentials">
Infisical shows the **Client ID** and **Client Secret** on creation.
diff --git a/sso.md b/sso.md
index 2a9472aad3..1cf0723a8a 100644
--- a/sso.md
+++ b/sso.md
@@ -164,7 +164,7 @@ Then test the login two ways:
Token exchange lets trusted middleware present a user's token from your IdP and receive that user's
Infisical token. Its trust anchor is the org's OIDC SSO config, so everything above has to be working
-first. See [OAuth Token Exchange](docs/documentation/platform/oauth-token-exchange) for the product docs.
+first. See [OAuth Token Exchange](docs/documentation/platform/oauth-applications/token-exchange) for the product docs.
No license is needed. `plan.oidcSSO` is only checked when creating or updating an OIDC config through
the API, and `make seed-dev-oidc` writes the row directly.