Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion info/workload-identity/custom-oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In the [dashboard](https://dashboard.onkernel.com), open **Keys** > **Workload i
| **JWKS source** | How KERNEL gets the issuer's public signing keys. See the next table. |
| **CA certificate** | Optional. PEM-encoded public CA certificates to trust instead of the system roots when fetching discovery and keys. |
| **Enforce single-use tokens (JTI replay protection)** | On by default. Each token's `jti` can be exchanged once. Turn it off only if your workload must present the same token more than once. |
| **Maximum token lifetime (hours)** | Tokens whose `exp` minus `iat` exceeds this are refused. The default is 1 hour and the maximum is 24. |
| **Maximum token lifetime (hours)** | Tokens whose `exp` minus `iat` exceeds this are refused. The default is 1 hour and the maximum is 48. |

### JWKS source

Expand Down
6 changes: 4 additions & 2 deletions info/workload-identity/microsoft-entra.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ Under **Authorization**, choose the **Project**, the **Permissions**, and the **
Choose or create a service account, click **Create rule**, then turn on the issuer and the rule in the **Test** step. Copy the rule ID (`wifr_...`).
</Step>

<Step title="Allow token reuse if your workload caches tokens">
<Step title="Adjust the issuer for cached or long-lived tokens">
Entra tokens are single-use in KERNEL by default. The Azure Identity libraries and managed identity endpoints cache a token and return the same one until it nears expiry, so a second exchange with it is refused.

If your workload gets its token that way, open the **Issuers** tab, select **Edit** on the issuer, and turn off **Enforce single-use tokens (JTI replay protection)**. The token can then be exchanged until it expires.

A managed identity token lives a little over 24 hours: `exp` minus `iat` is about 86,700 seconds. On the same issuer, set **Maximum token lifetime (hours)** to 25. Without it, KERNEL refuses every managed identity token, because the default limit for Entra is 7,500 seconds.
</Step>
</Steps>

Expand Down Expand Up @@ -182,7 +184,7 @@ Two more details:

- **Entra's token ID is `uti`.** KERNEL uses it, not `jti`, for single-use checks.
- **Switching between v1.0 and v2.0 changes both `iss` and `aud`.** If you change the app registration's token version, change the issuer and the rule's expected audience together.
- **Long-lived tokens need a higher limit.** By default, KERNEL accepts an Entra token only if its lifetime, `exp` minus `iat`, is 7,500 seconds or less. If your tokens live longer, raise **Maximum token lifetime (hours)** on the issuer, up to 24 hours.
- **Long-lived tokens need a higher limit.** By default, KERNEL accepts an Entra token only if its lifetime, `exp` minus `iat`, is 7,500 seconds or less. If your tokens live longer, raise **Maximum token lifetime (hours)** on the issuer, up to 48 hours. Managed identity tokens need 25 hours.

## Next steps

Expand Down
4 changes: 2 additions & 2 deletions info/workload-identity/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ An issuer (`wii_...`) registers one identity provider.
| `issuer_url` | The exact `iss` value expected in tokens. An `https` URL with no query string. Optional for `github_actions` and `google_cloud`, which each have one fixed issuer. |
| `preset_type` | The provider type. See the next table. Defaults to the type the issuer URL belongs to, or `custom_oidc`. |
| `jwks` | Where the public signing keys come from. See [Key sources](#key-sources). |
| `token_validation.max_lifetime_seconds` | The longest lifetime, `exp` minus `iat`, an incoming token can have. 1 to 86,400. Defaults to 3,600, or 7,500 for `microsoft_entra`. |
| `token_validation.max_lifetime_seconds` | The longest lifetime, `exp` minus `iat`, an incoming token can have. 1 to 172,800 (48 hours). Defaults to 3,600, or 7,500 for `microsoft_entra`. Set 90,000 (25 hours) for Azure managed identity tokens. |
| `token_validation.replay_protection` | `single_use` or `allow_reuse`. See the next table. |
| `enabled` | Defaults to `false`. Enabling an issuer checks that its keys can be fetched. |

Expand Down Expand Up @@ -509,7 +509,7 @@ Every resource has a `security_version` that increases when a change affects wha
| --- | --- |
| Access token lifetime | 300 seconds by default; 1 to 600 |
| Identity token size | 16 KiB |
| Identity token lifetime (`exp` minus `iat`) | 3,600 seconds by default, 7,500 for Microsoft Entra; up to 86,400 |
| Identity token lifetime (`exp` minus `iat`) | 3,600 seconds by default, 7,500 for Microsoft Entra; up to 172,800 |
| Clock difference allowed | 30 seconds |
| Projects per rule | 1 |
| Policy statements per rule | 1 to 256 |
Expand Down
Loading