@willyim/idp 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -358,9 +358,14 @@ const { token } = await api.request("post", "/api/v1/admin-keys", {
358
358
  // Authorization: Bearer wim_…
359
359
  ```
360
360
 
361
- The IdP's static `ADMIN_API_TOKEN` still works and still grants superadmin, but
362
- it is break-glass only: one shared secret, no name, no expiry, and no way to
363
- revoke it short of a redeploy.
361
+ There is no static superadmin secret: every bearer the IdP accepts is a key row
362
+ it issued, so every superadmin action names a revocable credential.
363
+
364
+ **Break-glass.** If every admin key is lost, recover by writing one bootstrap
365
+ key straight into D1 — insert an `api_key` row with `application_id` NULL and
366
+ `key_hash` set to the SHA-256 hex digest of a token you generate — then use it
367
+ to mint a real key via `POST /api/v1/admin-keys` and revoke the bootstrap row
368
+ through `DELETE /api/v1/admin-keys/{id}`.
364
369
 
365
370
  The OIDC endpoints are not in that document and never will be: they are
366
371
  standards-defined and discovered at runtime from `.well-known`.
package/dist/src/api.d.ts CHANGED
@@ -42,7 +42,7 @@ export type RequestOptions<P extends string, O> = PathParams<P> & RequestBody<O>
42
42
  export type ManagementApiOptions = {
43
43
  /** IdP origin — the API lives at the root, not under the `/auth` basepath. */
44
44
  baseUrl: string;
45
- /** Superadmin `ADMIN_API_TOKEN` or a scoped `wim_…` key. */
45
+ /** An IdP-level admin key or a per-app scoped `wim_…` key. */
46
46
  token: string;
47
47
  fetch?: typeof fetch;
48
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAG5B,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,yBAAyB,CAAA;AAGhC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AmE;AACnE,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAA;CAAE,GACzE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GACX,KAAK,CAAA;AAET,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAC7D,WAAW,CAAC,CAAC,CAAC,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IAC7D,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAEH,MAAM,MAAM,oBAAoB,GAAG;IACjC,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAA;IACf,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB;YAK/C,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,UAC3C,CAAC,QACH,CAAC,SACD,cAAc,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAC1C,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;EAuC9C;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
@@ -16,7 +16,7 @@ import { lookup, operations } from "./operations.js";
16
16
  */
17
17
  const json = (schema) => z.toJSONSchema(schema);
18
18
  const jsonInput = (schema) => z.toJSONSchema(schema, { io: "input" });
19
- const DESCRIPTION = "Management API for the willy.im identity provider. Authenticate with `Authorization: Bearer <token>`. Two kinds of token: the superadmin `ADMIN_API_TOKEN` (every app) and per-app **scoped API keys** minted in the admin console (one app, a fixed permission set). The cross-app endpoints below require the superadmin token.";
19
+ const DESCRIPTION = "Management API for the willy.im identity provider. Authenticate with `Authorization: Bearer <token>`. Two kinds of bearer, both `wim_` keys: IdP-level **admin keys** (every permission on every app, minted at `/api/v1/admin-keys`) and per-app **scoped keys** minted in the admin console (one app, a fixed permission set). The cross-app endpoints below require an admin key.";
20
20
  function pathParamNames(path) {
21
21
  return [...path.matchAll(/\{([^}]+)\}/g)].map((match) => match[1]);
22
22
  }
@@ -45,8 +45,8 @@ function operationObject(method, path, def) {
45
45
  summary: def.summary,
46
46
  description: def.description ??
47
47
  (scoped
48
- ? `Requires \`${def.permission}\` on the path app (or the superadmin token).`
49
- : "Requires the superadmin token."),
48
+ ? `Requires \`${def.permission}\` on the path app (or an admin key).`
49
+ : "Requires an admin key."),
50
50
  security: [{ bearerAuth: [] }],
51
51
  ...(parameters.length ? { parameters } : {}),
52
52
  ...(def.input
@@ -102,7 +102,7 @@ export function buildOpenApiDocument(input) {
102
102
  bearerAuth: {
103
103
  type: "http",
104
104
  scheme: "bearer",
105
- description: "Superadmin ADMIN_API_TOKEN or a scoped API key (wim_…).",
105
+ description: "An IdP-level admin key or a per-app scoped key (wim_…).",
106
106
  },
107
107
  },
108
108
  },
@@ -51,7 +51,7 @@ export declare const operations: {
51
51
  };
52
52
  readonly "post /api/v1/applications": {
53
53
  readonly summary: "Register an application (client secret returned once)";
54
- readonly description: "Requires the superadmin token. Creating an application is an IdP-level act — there is no app to scope a permission to yet.";
54
+ readonly description: "Requires an admin key. Creating an application is an IdP-level act — there is no app to scope a permission to yet.";
55
55
  readonly input: z.ZodObject<{
56
56
  name: z.ZodString;
57
57
  app: z.ZodString;
@@ -174,7 +174,7 @@ export declare const operations: {
174
174
  };
175
175
  readonly "post /api/v1/apps/{app}/keys": {
176
176
  readonly summary: "Mint a scoped management API key (plaintext returned once)";
177
- readonly description: "Requires `apikey:create` on the path app (or the superadmin token). The requested permissions must be a subset of the caller's own, otherwise 403 `permissions_exceed_caller` — without that rule any key holding `apikey:create` could mint itself a more powerful successor.";
177
+ readonly description: "Requires `apikey:create` on the path app (or an admin key). The requested permissions must be a subset of the caller's own, otherwise 403 `permissions_exceed_caller` — without that rule any key holding `apikey:create` could mint itself a more powerful successor.";
178
178
  readonly permission: "apikey:create";
179
179
  readonly params: {
180
180
  readonly app: "Application key (oauth_client.metadata.app).";
@@ -205,7 +205,7 @@ export declare const operations: {
205
205
  };
206
206
  readonly "get /api/v1/admin-keys": {
207
207
  readonly summary: "List IdP-level admin keys (never the hashes)";
208
- readonly description: "Requires the superadmin token or an admin key. Admin keys are `api_key` rows with no application scope, so they hold every permission on every app.";
208
+ readonly description: "Requires an admin key. Admin keys are `api_key` rows with no application scope, so they hold every permission on every app.";
209
209
  readonly successCode: "200";
210
210
  readonly success: z.ZodObject<{
211
211
  keys: z.ZodArray<z.ZodObject<{
@@ -226,7 +226,7 @@ export declare const operations: {
226
226
  };
227
227
  readonly "post /api/v1/admin-keys": {
228
228
  readonly summary: "Mint an IdP-level admin key (plaintext returned once)";
229
- readonly description: "Requires the superadmin token or an admin key. Mint one per agent: unlike the static ADMIN_API_TOKEN, an admin key has a name, an optional expiry, a revoke switch, and its own `adminkey:<id>` identity in the audit log.";
229
+ readonly description: "Requires an admin key. Mint one per agent: an admin key has a name, an optional expiry, a revoke switch, and its own `adminkey:<id>` identity in the audit log, so every superadmin action is attributable.";
230
230
  readonly input: z.ZodObject<{
231
231
  name: z.ZodString;
232
232
  expiresAt: z.ZodOptional<z.ZodISODateTime>;
@@ -19,7 +19,7 @@ export const operations = {
19
19
  },
20
20
  "post /api/v1/applications": {
21
21
  summary: "Register an application (client secret returned once)",
22
- description: "Requires the superadmin token. Creating an application is an IdP-level act — there is no app to scope a permission to yet.",
22
+ description: "Requires an admin key. Creating an application is an IdP-level act — there is no app to scope a permission to yet.",
23
23
  input: CreateApplicationInput,
24
24
  successCode: "201",
25
25
  success: ApplicationCreatedSchema,
@@ -75,7 +75,7 @@ export const operations = {
75
75
  },
76
76
  "post /api/v1/apps/{app}/keys": {
77
77
  summary: "Mint a scoped management API key (plaintext returned once)",
78
- description: "Requires `apikey:create` on the path app (or the superadmin token). The requested permissions must be a subset of the caller's own, otherwise 403 `permissions_exceed_caller` — without that rule any key holding `apikey:create` could mint itself a more powerful successor.",
78
+ description: "Requires `apikey:create` on the path app (or an admin key). The requested permissions must be a subset of the caller's own, otherwise 403 `permissions_exceed_caller` — without that rule any key holding `apikey:create` could mint itself a more powerful successor.",
79
79
  permission: "apikey:create",
80
80
  params: APP_PARAM,
81
81
  input: CreateApiKeyInput,
@@ -92,13 +92,13 @@ export const operations = {
92
92
  },
93
93
  "get /api/v1/admin-keys": {
94
94
  summary: "List IdP-level admin keys (never the hashes)",
95
- description: "Requires the superadmin token or an admin key. Admin keys are `api_key` rows with no application scope, so they hold every permission on every app.",
95
+ description: "Requires an admin key. Admin keys are `api_key` rows with no application scope, so they hold every permission on every app.",
96
96
  successCode: "200",
97
97
  success: AdminKeyListSchema,
98
98
  },
99
99
  "post /api/v1/admin-keys": {
100
100
  summary: "Mint an IdP-level admin key (plaintext returned once)",
101
- description: "Requires the superadmin token or an admin key. Mint one per agent: unlike the static ADMIN_API_TOKEN, an admin key has a name, an optional expiry, a revoke switch, and its own `adminkey:<id>` identity in the audit log.",
101
+ description: "Requires an admin key. Mint one per agent: an admin key has a name, an optional expiry, a revoke switch, and its own `adminkey:<id>` identity in the audit log, so every superadmin action is attributable.",
102
102
  input: CreateAdminKeyInput,
103
103
  successCode: "201",
104
104
  success: AdminKeyCreatedSchema,
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "willy.im IdP — Management API",
5
5
  "version": "1.0.0",
6
- "description": "Management API for the willy.im identity provider. Authenticate with `Authorization: Bearer <token>`. Two kinds of token: the superadmin `ADMIN_API_TOKEN` (every app) and per-app **scoped API keys** minted in the admin console (one app, a fixed permission set). The cross-app endpoints below require the superadmin token."
6
+ "description": "Management API for the willy.im identity provider. Authenticate with `Authorization: Bearer <token>`. Two kinds of bearer, both `wim_` keys: IdP-level **admin keys** (every permission on every app, minted at `/api/v1/admin-keys`) and per-app **scoped keys** minted in the admin console (one app, a fixed permission set). The cross-app endpoints below require an admin key."
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -15,7 +15,7 @@
15
15
  "bearerAuth": {
16
16
  "type": "http",
17
17
  "scheme": "bearer",
18
- "description": "Superadmin ADMIN_API_TOKEN or a scoped API key (wim_…)."
18
+ "description": "An IdP-level admin key or a per-app scoped key (wim_…)."
19
19
  }
20
20
  }
21
21
  },
@@ -23,7 +23,7 @@
23
23
  "/api/v1/applications": {
24
24
  "get": {
25
25
  "summary": "List registered applications",
26
- "description": "Requires the superadmin token.",
26
+ "description": "Requires an admin key.",
27
27
  "security": [
28
28
  {
29
29
  "bearerAuth": []
@@ -121,7 +121,7 @@
121
121
  },
122
122
  "post": {
123
123
  "summary": "Register an application (client secret returned once)",
124
- "description": "Requires the superadmin token. Creating an application is an IdP-level act — there is no app to scope a permission to yet.",
124
+ "description": "Requires an admin key. Creating an application is an IdP-level act — there is no app to scope a permission to yet.",
125
125
  "security": [
126
126
  {
127
127
  "bearerAuth": []
@@ -222,7 +222,7 @@
222
222
  "/api/v1/applications/{clientId}": {
223
223
  "get": {
224
224
  "summary": "Get one application",
225
- "description": "Requires `app:read` on the path app (or the superadmin token).",
225
+ "description": "Requires `app:read` on the path app (or an admin key).",
226
226
  "security": [
227
227
  {
228
228
  "bearerAuth": []
@@ -325,7 +325,7 @@
325
325
  },
326
326
  "patch": {
327
327
  "summary": "Update an application",
328
- "description": "Requires `app:update` on the path app (or the superadmin token).",
328
+ "description": "Requires `app:update` on the path app (or an admin key).",
329
329
  "security": [
330
330
  {
331
331
  "bearerAuth": []
@@ -465,7 +465,7 @@
465
465
  },
466
466
  "delete": {
467
467
  "summary": "Deregister an application",
468
- "description": "Requires `app:delete` on the path app (or the superadmin token).",
468
+ "description": "Requires `app:delete` on the path app (or an admin key).",
469
469
  "security": [
470
470
  {
471
471
  "bearerAuth": []
@@ -525,7 +525,7 @@
525
525
  "/api/v1/applications/{clientId}/rotate-secret": {
526
526
  "post": {
527
527
  "summary": "Rotate the client secret (returned once; the old one stops working)",
528
- "description": "Requires `app:update` on the path app (or the superadmin token).",
528
+ "description": "Requires `app:update` on the path app (or an admin key).",
529
529
  "security": [
530
530
  {
531
531
  "bearerAuth": []
@@ -585,7 +585,7 @@
585
585
  "/api/v1/apps/{app}/permissions": {
586
586
  "put": {
587
587
  "summary": "Replace the app's product-permission catalog",
588
- "description": "Requires `app:update` on the path app (or the superadmin token).",
588
+ "description": "Requires `app:update` on the path app (or an admin key).",
589
589
  "security": [
590
590
  {
591
591
  "bearerAuth": []
@@ -673,7 +673,7 @@
673
673
  "/api/v1/apps/{app}/keys": {
674
674
  "get": {
675
675
  "summary": "List scoped management API keys (never the hashes)",
676
- "description": "Requires `apikey:read` on the path app (or the superadmin token).",
676
+ "description": "Requires `apikey:read` on the path app (or an admin key).",
677
677
  "security": [
678
678
  {
679
679
  "bearerAuth": []
@@ -796,7 +796,7 @@
796
796
  },
797
797
  "post": {
798
798
  "summary": "Mint a scoped management API key (plaintext returned once)",
799
- "description": "Requires `apikey:create` on the path app (or the superadmin token). The requested permissions must be a subset of the caller's own, otherwise 403 `permissions_exceed_caller` — without that rule any key holding `apikey:create` could mint itself a more powerful successor.",
799
+ "description": "Requires `apikey:create` on the path app (or an admin key). The requested permissions must be a subset of the caller's own, otherwise 403 `permissions_exceed_caller` — without that rule any key holding `apikey:create` could mint itself a more powerful successor.",
800
800
  "security": [
801
801
  {
802
802
  "bearerAuth": []
@@ -899,7 +899,7 @@
899
899
  "/api/v1/apps/{app}/keys/{id}": {
900
900
  "delete": {
901
901
  "summary": "Revoke a scoped management API key (idempotent)",
902
- "description": "Requires `apikey:revoke` on the path app (or the superadmin token).",
902
+ "description": "Requires `apikey:revoke` on the path app (or an admin key).",
903
903
  "security": [
904
904
  {
905
905
  "bearerAuth": []
@@ -967,7 +967,7 @@
967
967
  "/api/v1/admin-keys": {
968
968
  "get": {
969
969
  "summary": "List IdP-level admin keys (never the hashes)",
970
- "description": "Requires the superadmin token or an admin key. Admin keys are `api_key` rows with no application scope, so they hold every permission on every app.",
970
+ "description": "Requires an admin key. Admin keys are `api_key` rows with no application scope, so they hold every permission on every app.",
971
971
  "security": [
972
972
  {
973
973
  "bearerAuth": []
@@ -1068,7 +1068,7 @@
1068
1068
  },
1069
1069
  "post": {
1070
1070
  "summary": "Mint an IdP-level admin key (plaintext returned once)",
1071
- "description": "Requires the superadmin token or an admin key. Mint one per agent: unlike the static ADMIN_API_TOKEN, an admin key has a name, an optional expiry, a revoke switch, and its own `adminkey:<id>` identity in the audit log.",
1071
+ "description": "Requires an admin key. Mint one per agent: an admin key has a name, an optional expiry, a revoke switch, and its own `adminkey:<id>` identity in the audit log, so every superadmin action is attributable.",
1072
1072
  "security": [
1073
1073
  {
1074
1074
  "bearerAuth": []
@@ -1206,7 +1206,7 @@
1206
1206
  "/api/v1/users": {
1207
1207
  "get": {
1208
1208
  "summary": "List users",
1209
- "description": "Requires the superadmin token.",
1209
+ "description": "Requires an admin key.",
1210
1210
  "security": [
1211
1211
  {
1212
1212
  "bearerAuth": []
@@ -1277,7 +1277,7 @@
1277
1277
  "/api/v1/workspaces": {
1278
1278
  "get": {
1279
1279
  "summary": "List workspaces",
1280
- "description": "Requires the superadmin token.",
1280
+ "description": "Requires an admin key.",
1281
1281
  "security": [
1282
1282
  {
1283
1283
  "bearerAuth": []
@@ -1348,7 +1348,7 @@
1348
1348
  "/api/v1/apps/{app}/members": {
1349
1349
  "get": {
1350
1350
  "summary": "List app members",
1351
- "description": "Requires `member:read` on the path app (or the superadmin token).",
1351
+ "description": "Requires `member:read` on the path app (or an admin key).",
1352
1352
  "security": [
1353
1353
  {
1354
1354
  "bearerAuth": []
@@ -1438,7 +1438,7 @@
1438
1438
  },
1439
1439
  "post": {
1440
1440
  "summary": "Add or invite a member",
1441
- "description": "Requires `member:invite` on the path app (or the superadmin token).",
1441
+ "description": "Requires `member:invite` on the path app (or an admin key).",
1442
1442
  "security": [
1443
1443
  {
1444
1444
  "bearerAuth": []
@@ -1537,7 +1537,7 @@
1537
1537
  "/api/v1/apps/{app}/members/{userId}": {
1538
1538
  "patch": {
1539
1539
  "summary": "Update a member's role + permissions",
1540
- "description": "Requires `member:manage` on the path app (or the superadmin token).",
1540
+ "description": "Requires `member:manage` on the path app (or an admin key).",
1541
1541
  "security": [
1542
1542
  {
1543
1543
  "bearerAuth": []
@@ -1633,7 +1633,7 @@
1633
1633
  },
1634
1634
  "delete": {
1635
1635
  "summary": "Remove a member",
1636
- "description": "Requires `member:manage` on the path app (or the superadmin token).",
1636
+ "description": "Requires `member:manage` on the path app (or an admin key).",
1637
1637
  "security": [
1638
1638
  {
1639
1639
  "bearerAuth": []
@@ -1698,7 +1698,7 @@
1698
1698
  "/api/v1/apps/{app}/workspaces": {
1699
1699
  "get": {
1700
1700
  "summary": "List app workspaces",
1701
- "description": "Requires `workspace:read` on the path app (or the superadmin token).",
1701
+ "description": "Requires `workspace:read` on the path app (or an admin key).",
1702
1702
  "security": [
1703
1703
  {
1704
1704
  "bearerAuth": []
@@ -1781,7 +1781,7 @@
1781
1781
  },
1782
1782
  "post": {
1783
1783
  "summary": "Create a workspace",
1784
- "description": "Requires `workspace:create` on the path app (or the superadmin token).",
1784
+ "description": "Requires `workspace:create` on the path app (or an admin key).",
1785
1785
  "security": [
1786
1786
  {
1787
1787
  "bearerAuth": []
@@ -1874,7 +1874,7 @@
1874
1874
  "/api/v1/apps/{app}/user-keys": {
1875
1875
  "get": {
1876
1876
  "summary": "List end-user API keys",
1877
- "description": "Requires `userkey:read` on the path app (or the superadmin token).",
1877
+ "description": "Requires `userkey:read` on the path app (or an admin key).",
1878
1878
  "security": [
1879
1879
  {
1880
1880
  "bearerAuth": []
@@ -2018,7 +2018,7 @@
2018
2018
  },
2019
2019
  "post": {
2020
2020
  "summary": "Mint an end-user API key (plaintext returned once)",
2021
- "description": "Requires `userkey:create` on the path app (or the superadmin token).",
2021
+ "description": "Requires `userkey:create` on the path app (or an admin key).",
2022
2022
  "security": [
2023
2023
  {
2024
2024
  "bearerAuth": []
@@ -2128,7 +2128,7 @@
2128
2128
  "/api/v1/apps/{app}/user-keys/validate": {
2129
2129
  "post": {
2130
2130
  "summary": "Validate a presented end-user key (200 + valid discriminator)",
2131
- "description": "Requires `userkey:validate` on the path app (or the superadmin token).",
2131
+ "description": "Requires `userkey:validate` on the path app (or an admin key).",
2132
2132
  "security": [
2133
2133
  {
2134
2134
  "bearerAuth": []
@@ -2264,7 +2264,7 @@
2264
2264
  "/api/v1/apps/{app}/user-keys/{id}": {
2265
2265
  "delete": {
2266
2266
  "summary": "Revoke an end-user API key (idempotent)",
2267
- "description": "Requires `userkey:revoke` on the path app (or the superadmin token).",
2267
+ "description": "Requires `userkey:revoke` on the path app (or an admin key).",
2268
2268
  "security": [
2269
2269
  {
2270
2270
  "bearerAuth": []
@@ -2329,7 +2329,7 @@
2329
2329
  "/api/v1/apps/{app}/audit": {
2330
2330
  "get": {
2331
2331
  "summary": "List recent audit entries",
2332
- "description": "Requires `audit:read` on the path app (or the superadmin token).",
2332
+ "description": "Requires `audit:read` on the path app (or an admin key).",
2333
2333
  "security": [
2334
2334
  {
2335
2335
  "bearerAuth": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willyim/idp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Login for apps that don't own identity \u2014 OIDC client, server sessions, and react-router guards against the willy.im IdP",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",