You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In multi-tenant deployments, each organization can configure their own identity provider via the Admin UI. JWTs from per-org IdPs are automatically validated — the gateway decodes the `iss` claim and routes the token to the correct org's validator. No global `[auth.gateway.jwt]` config is needed for this to work.
108
+
109
+
See [Per-Org JWT Routing](/docs/authentication#per-org-jwt-routing) for details.
110
+
105
111
### Supported Algorithms
106
112
107
113
| Algorithm | Description |
@@ -134,6 +140,12 @@ With this configuration:
134
140
2. If `Authorization: Bearer` header is present with JWT format, validate as JWT
135
141
3. If `Authorization: Bearer` header is present with `gw_` prefix, validate as API key
136
142
143
+
<Callouttype="info">
144
+
The `[auth.gateway.jwt]` section is optional in multi-auth mode. When per-organization SSO is
The `[auth.gateway.jwt]` section is **optional** in multi-auth mode. When per-organization SSO is
270
+
configured, each org's SSO config automatically provides JWT validation on `/v1/*` endpoints. If
271
+
`[auth.gateway.jwt]` is omitted, only per-org SSO configs and API keys are used — there is no
272
+
global JWT fallback. See [Per-Org JWT Routing](/docs/authentication#per-org-jwt-routing).
273
+
</Callout>
274
+
275
+
**Multi-auth with API keys only (per-org JWT):**
276
+
277
+
```toml
278
+
[auth.gateway]
279
+
type = "multi"
280
+
281
+
[auth.gateway.api_key]
282
+
key_prefix = "gw_"
283
+
cache_ttl_secs = 300
284
+
285
+
# No [auth.gateway.jwt] — per-org SSO configs provide JWT validation
286
+
```
287
+
268
288
**Request Examples:**
269
289
270
290
```bash
@@ -1356,3 +1376,57 @@ slug = "default"
1356
1376
name = "Default Organization"
1357
1377
admin_identities = ["admin@example.com"]
1358
1378
```
1379
+
1380
+
### Multi-Org with Per-IdP API Authentication
1381
+
1382
+
Each organization configures their own identity provider via the Admin UI. No global `[auth.gateway.jwt]` is needed — per-org SSO configs automatically enable JWT validation on `/v1/*` endpoints.
1383
+
1384
+
```toml
1385
+
[auth.gateway]
1386
+
type = "multi"
1387
+
1388
+
[auth.gateway.api_key]
1389
+
key_prefix = "gw_"
1390
+
cache_ttl_secs = 300
1391
+
1392
+
# No [auth.gateway.jwt] section.
1393
+
# Per-org SSO configs provide JWT validation for each org's IdP.
1394
+
1395
+
[auth.admin]
1396
+
type = "session"
1397
+
secret = "${SESSION_SECRET}"
1398
+
1399
+
[auth.admin.session]
1400
+
secure = true
1401
+
same_site = "lax"
1402
+
1403
+
[auth.rbac]
1404
+
enabled = true
1405
+
default_effect = "deny"
1406
+
1407
+
[[auth.rbac.policies]]
1408
+
name = "super-admin"
1409
+
resource = "*"
1410
+
action = "*"
1411
+
condition = "'super_admin' in subject.roles"
1412
+
effect = "allow"
1413
+
priority = 100
1414
+
1415
+
[[auth.rbac.policies]]
1416
+
name = "org-isolation"
1417
+
resource = "*"
1418
+
action = "*"
1419
+
condition = "context.org_id in subject.org_ids"
1420
+
effect = "allow"
1421
+
priority = 10
1422
+
1423
+
[auth.bootstrap]
1424
+
api_key = "${HADRIAN_BOOTSTRAP_KEY}"
1425
+
auto_verify_domains = ["acme.com", "globex.io"]
1426
+
```
1427
+
1428
+
<Callouttype="info">
1429
+
After deploying, use the bootstrap API key to create organizations and their SSO configs. Once SSO
1430
+
is configured, each org's users can authenticate with both the web UI (via SSO login) and the API
0 commit comments