Authentication And Tokens
Gestalt has three separate credential layers:
- platform auth for the human caller of the server
- integration auth for outbound calls to upstream systems
- API tokens for programmatic access to Gestalt itself
Platform Auth
Platform auth is configured under auth.
auth:
provider: oidc
config:
issuer_url: https://login.example.com
client_id: ${OIDC_CLIENT_ID}
client_secret: ${OIDC_CLIENT_SECRET}Built-in platform auth providers are:
nonelocalgoogleoidc
The platform auth provider controls login to the UI, authenticated HTTP routes,
and /mcp.
Integration Auth
Integration auth lives inside providers.*.connections.
Examples:
type: nonefor public spec-backed surfaces that use amode: noneconnectiontype: oauth2for user-scoped or shared OAuth flowstype: manualortype: bearerfor manually entered credentialstype: mcp_oauthfor upstream MCP servers that implement MCP OAuth
OAuth connections are started through POST /api/v1/auth/start-oauth and
completed by GET /api/v1/auth/callback.
Manual connections are created through POST /api/v1/auth/connect-manual.
Stored Connections
Gestalt stores integration credentials by:
- user
- integration
- connection name
- instance
This lets one user keep multiple instances of the same integration, such as:
- separate Jira sites
- different tenant parameters
- multiple named auth flows on one integration
API Tokens
API tokens authenticate callers to Gestalt itself.
Create them with:
gestalt tokens create --name automationOr through the HTTP API:
POST /api/v1/tokens
Authorization: Bearer <session-or-api-token>
Content-Type: application/jsonThey can be scoped to specific integrations and are accepted through:
Authorization: Bearer gst_api_...- the
gestaltclient CLI - authenticated calls to
/mcp
server.api_token_ttl controls the token lifetime.
Session Cookies
When platform auth is enabled, the browser session is stored in a
session_token cookie.
- Cookies are
HttpOnly. - Cookies use
SameSite=Lax. - Cookies are marked
Securewhenserver.base_urluseshttps://.
Choosing An Auth Strategy
- Use
auth.provider: nonefor local development and trusted internal environments. - Use
localfor a single-user dev server that still exercises login flows. - Use
googleoroidcfor normal multi-user deployments. - Use OAuth integration auth when each user should bring their own account.
- Use
identitymode when the server should call upstreams with one shared service credential.