@adonis-agora/authkit-sdk 1.0.0-rc.4 → 1.0.0-rc.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @adonis-agora/authkit-sdk
2
2
 
3
+ ## 1.0.0-rc.5
4
+
5
+ ### Minor Changes
6
+
7
+ - [#502](https://github.com/DavideCarvalho/adonis-agora-authkit/pull/502) [`4c91361`](https://github.com/DavideCarvalho/adonis-agora-authkit/commit/4c91361fe209ee76e1cc4a0a3189568f6d4c0558) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Read-only keystore: `jwks: { source: 'managed', store, readOnly: true }` lets a second authkit-server serve the same identity (same keystore, same `auth_settings`) under another issuer while only the first one writes the keys. A read-only instance never runs the scheduled rotation and picks up the writer's rotations through the reload poll. Rotate, generate, retire and reseal throw `KeystoreReadOnlyError` (`E_KEYSTORE_READ_ONLY`): `authkit:key generate|rotate|retire` and `authkit:crypto:reseal` exit 1 (their `--dry-run` still works), the Admin API and the console answer `409 keystore_read_only`, and the console's Keys page hides those actions (`GET /keys` returns `readOnly: true`). The `key_rotation` setting reads but can't be changed there (`409 keystore_read_only`). At boot it reads the keystore and fails with `KeystoreUnavailableError` (`E_KEYSTORE_UNAVAILABLE`) when it's missing or doesn't open: it never creates a key or a table. `agora:doctor` adds the **Keystore read-only** check. `authkit:settings:unset` now exits 1 when it refuses a locked key (it used to print the refusal and exit 0, and for a key locked by `defineConfig` it reported "not set").
8
+
3
9
  ## 1.0.0-rc.4
4
10
 
5
11
  ### Minor Changes
@@ -334,6 +334,11 @@ export interface KeysStatus {
334
334
  keep: number;
335
335
  };
336
336
  nextRotationInDays: number | null;
337
+ /**
338
+ * `jwks.readOnly` on the server: it reads the keystore another instance writes, so `rotate()`
339
+ * fails with 409 `keystore_read_only`. Absent on older servers.
340
+ */
341
+ readOnly?: boolean;
337
342
  }
338
343
  /** Input for `keys.rotate()`. */
339
344
  export interface KeysRotateInput {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonis-agora/authkit-sdk",
3
- "version": "1.0.0-rc.4",
3
+ "version": "1.0.0-rc.5",
4
4
  "description": "Backend SDK for the AuthKit Admin API with one typed interface and two drivers: remote (HTTP/Bearer) and embedded (in-process when the IdP runs in the same AdonisJS app).",
5
5
  "license": "MIT",
6
6
  "author": "dudousxd",
@@ -51,7 +51,7 @@
51
51
  }
52
52
  },
53
53
  "devDependencies": {
54
- "@adonis-agora/authkit-server": "1.0.0-rc.24",
54
+ "@adonis-agora/authkit-server": "1.0.0-rc.31",
55
55
  "@adonisjs/core": "7.6.0",
56
56
  "@adonisjs/tsconfig": "2.0.0",
57
57
  "@japa/assert": "4.2.0",