> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/secrets-manager/about/federated-identity-with-oauth-oidc.md).

# Federated Identity with OAuth / OIDC

Authenticate Secrets Manager and Keeper Vault sessions with a short-lived signed JWT with any federated identity provider

## Federated Authentication for Secrets Manager

Secrets Manager clients can authenticate with a short-lived token from **any OAuth 2.0 / OpenID Connect provider**, instead of a key pair created from a one-time token.

### One-Time Access Token vs. Federated Auth

| Use Case               | One-Time Access Token                                       | Federated                                                         |
| ---------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------- |
| Setup                  | Generate a one-time token and initialize the device with it | Bind the client to an issuer and a subject. No token to hand out. |
| What proves the client | A private key stored in the configuration                   | A short-lived token from the provider, sent with every request    |
| Credential rotation    | The key lives until the client is removed                   | The provider issues new tokens on its own                         |
| A copied configuration | Works on its own                                            | Useless without a valid token for the bound identity              |

{% hint style="warning" %}
A federated configuration still contains the **application key**, which decrypts the records and folders shared with the application. Store it as a secret (for example a Kubernetes Secret or a GitHub encrypted secret). The difference from a normal configuration is that the configuration alone is not enough to call Keeper: the caller also needs a valid token for the bound identity.
{% endhint %}

### What it can be used for

Any workload that can get a signed JWT from an OAuth / OIDC provider:

* **CI/CD:** GitHub Actions, GitLab CI/CD and similar pipelines read secrets without a stored Keeper credential.
* **Kubernetes:** pods authenticate with their service account token.
* **Cloud workloads and identity providers:** cloud workload identity, Okta, Microsoft Entra ID, Auth0, Keycloak or your own issuer.
* **Commander Service Mode:** runs in Kubernetes and logs in with its service account instead of a stored password.

Each client has one **access type**:

* **Secrets Manager** (default): normal Secrets Manager calls, limited to the records and folders shared with the application.
* **Vault session:** can also exchange the token for the vault session of the user who added the client (for example, for Commander Service Mode). It is never on by default.

### How it works

1. A Secrets Manager user adds a federated client to an application in Commander and gives the **issuer** and **subject** of the workload's token. For example:

   ```
   secrets-manager client add --app "Billing App" --federated \
       --oidc-issuer https://token.actions.githubusercontent.com \
       --oidc-subject repo:acme/billing:environment:production
   ```
2. The workload gets a token from its provider, with the Keeper host (`https://keepersecurity.com`) as the audience. The host changes based on the tenant location (EU, AU, JP, CA, Gov, etc).
3. The client sends the token with each Secrets Manager request, encrypted with the request's transmission key, so it can't be read or reused even if TLS is inspected.
4. Keeper checks the token's signature against the issuer's public keys, and checks that the issuer, subject and audience match and the token hasn't expired. Then it handles the request as usual.

Locking or removing the client device stops its access on the next request.

{% hint style="info" %}
Requirement: the issuer must be an https URL, and its public keys must be reachable on the public internet (through OIDC discovery or a given JWKS URL) or at least accessible by Keeper's infrastructure. The IP addresses where the requests are made can be found on: [Keeper FQDNs and IP Addresses](https://docs.keeper.io/enterprise-guide/ip-allow-keeper.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/secrets-manager/about/federated-identity-with-oauth-oidc.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
