@keycardai/eve 0.2.0 → 0.3.0
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 +90 -21
- package/dist/esm/connections.d.ts +10 -19
- package/dist/esm/connections.d.ts.map +1 -1
- package/dist/esm/connections.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/interactive.d.ts +98 -73
- package/dist/esm/interactive.d.ts.map +1 -1
- package/dist/esm/interactive.js +224 -96
- package/dist/esm/interactive.js.map +1 -1
- package/dist/esm/testing/index.d.ts +1 -0
- package/dist/esm/testing/index.d.ts.map +1 -1
- package/dist/esm/testing/index.js +1 -0
- package/dist/esm/testing/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -154,23 +154,23 @@ export default defineMcpClientConnection({
|
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
**There is no `clientId`, and adding one usually breaks the flow.** eve mints a
|
|
157
|
-
fresh callback URL for every attempt
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
`Unauthorized redirect URI`. Leaving
|
|
163
|
-
attempt instead (RFC 7591), whose
|
|
164
|
-
attempt will
|
|
165
|
-
nothing secret enters eve's durable resume state; if
|
|
166
|
-
confidential client anyway, the attempt is abandoned rather
|
|
167
|
-
secret.
|
|
157
|
+
fresh callback URL for every attempt
|
|
158
|
+
(`/eve/v1/connections/:name/callback/:attemptId/:token`) while
|
|
159
|
+
[RFC 9700][rfc9700] requires the authorization server to match `redirect_uri`
|
|
160
|
+
against the client's registered list by exact string comparison. A client
|
|
161
|
+
registered ahead of time cannot name a URL that is generated later, so the
|
|
162
|
+
request is rejected with something like `Unauthorized redirect URI`. Leaving
|
|
163
|
+
`clientId` unset registers a client per attempt instead (RFC 7591), whose
|
|
164
|
+
single redirect URI is the callback that attempt will return to. Each client is
|
|
165
|
+
public and PKCE-bound, so nothing secret enters eve's durable resume state; if
|
|
166
|
+
the server issues a confidential client anyway, the attempt is abandoned rather
|
|
167
|
+
than journaling a secret.
|
|
168
168
|
|
|
169
169
|
Set `clientId` only when that client's registered redirect URIs already cover
|
|
170
170
|
eve's callback. Note that a Keycard application `identifier` is not a client id:
|
|
171
|
-
zones identify clients by [Client ID Metadata Document][cimd]
|
|
172
|
-
with a path
|
|
173
|
-
|
|
171
|
+
zones identify clients by [Client ID Metadata Document][cimd], an HTTPS URL
|
|
172
|
+
with a path serving the client's metadata, so a value like `urn:app:my-agent`
|
|
173
|
+
fails with `Unsupported client identifier prefix: urn`.
|
|
174
174
|
|
|
175
175
|
Per-attempt clients accumulate in the zone. They hold no secret and their
|
|
176
176
|
callback is single-use, but a server returning `registration_client_uri` and
|
|
@@ -182,17 +182,20 @@ callback is single-use, but a server returning `registration_client_uri` and
|
|
|
182
182
|
The definition implements the same three-method form as eve's
|
|
183
183
|
`defineInteractiveAuthorization`, over `@keycardai/oauth`'s v3 web-app flow:
|
|
184
184
|
|
|
185
|
-
- `getToken`
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
- `getToken` looks up the principal's stored grants and returns the access
|
|
186
|
+
token of one whose resources cover this connection's `resource` and whose
|
|
187
|
+
scopes cover `requestScopes`. Within 60 seconds of expiry, a grant holding a
|
|
188
|
+
refresh token is refreshed first (see below). With no usable grant it throws
|
|
189
|
+
`ConnectionAuthorizationRequiredError`, so eve emits
|
|
190
|
+
`authorization.required`, runs `startAuthorization` in a durable step, and
|
|
191
|
+
parks the turn on a framework-owned callback.
|
|
189
192
|
- `startAuthorization` registers this attempt's client (unless `clientId` is
|
|
190
193
|
set), calls `beginAuthorization` for the connection's resource list against
|
|
191
194
|
eve's minted callback URL, and returns the challenge URL plus the `state`,
|
|
192
195
|
PKCE verifier and client id as JSON resume state.
|
|
193
196
|
- `completeAuthorization` calls `completeAuthorization` with eve's callback
|
|
194
197
|
params and the journaled resume state, redeeming as the client that attempt's
|
|
195
|
-
authorization request ran as, and
|
|
198
|
+
authorization request ran as, and stores the resulting grant.
|
|
196
199
|
|
|
197
200
|
**Resume without authorization cannot yield a credential.** `getToken` is the
|
|
198
201
|
only path that returns a token, and it reads a store only
|
|
@@ -204,6 +207,72 @@ an authorization has settled ends the tool call. User denial is reported as
|
|
|
204
207
|
`ConnectionAuthorizationFailedError` with `reason: "access_denied"` and
|
|
205
208
|
`retryable: false`, so eve stops re-prompting.
|
|
206
209
|
|
|
210
|
+
### Grants: what is stored, and for how long
|
|
211
|
+
|
|
212
|
+
`completeAuthorization` stores a grant, not a bare token: the access token and
|
|
213
|
+
its expiry, the refresh token the zone returned, the client id the grant was
|
|
214
|
+
issued to, and the resources and scopes granted. Grants are keyed by the
|
|
215
|
+
principal, never by `connectionName`, which is display and error text only;
|
|
216
|
+
two `Keycard.interactive()` definitions in one process with the same
|
|
217
|
+
`connectionName` fail at definition time with
|
|
218
|
+
`AuthProviderConfigurationError`. Because a grant is matched on what it covers,
|
|
219
|
+
a connection listing the agent's other resources in `additionalResources`
|
|
220
|
+
yields one sign-in that serves every connection whose resource is in the list.
|
|
221
|
+
|
|
222
|
+
When a grant is within 60 seconds of expiry and holds a refresh token,
|
|
223
|
+
`getToken` posts `grant_type=refresh_token` to the zone as the grant's own
|
|
224
|
+
client (public, no secret; a per-attempt client registers with
|
|
225
|
+
`refresh_token` among its grant types), stores the rotated access and refresh
|
|
226
|
+
token pair, and returns the new access token without parking. A refresh the
|
|
227
|
+
zone refuses with `invalid_grant` deletes the grant and throws `Required`, so
|
|
228
|
+
the turn parks for a fresh sign-in. A transport or 5xx failure keeps the grant
|
|
229
|
+
and fails the tool call with `retryable: true`. A grant without a refresh token
|
|
230
|
+
parks at expiry, as before.
|
|
231
|
+
|
|
232
|
+
`evict` removes every grant of the principal that covers this connection's
|
|
233
|
+
resource, leaving grants for other resources in place.
|
|
234
|
+
|
|
235
|
+
### Plugging a durable grant store
|
|
236
|
+
|
|
237
|
+
The default store is process-local, so a restarted agent parks once more for
|
|
238
|
+
each user. To keep grants across processes, pass `tokens` an object of this
|
|
239
|
+
shape:
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
import type { AuthorizedGrant, GrantStore } from "@keycardai/eve";
|
|
243
|
+
|
|
244
|
+
export function redisGrantStore(redis: {
|
|
245
|
+
hgetall(key: string): Promise<Record<string, string>>;
|
|
246
|
+
hset(key: string, field: string, value: string): Promise<unknown>;
|
|
247
|
+
hdel(key: string, field: string): Promise<unknown>;
|
|
248
|
+
}): GrantStore {
|
|
249
|
+
const key = (principal: string) => `keycard:grants:${principal}`;
|
|
250
|
+
return {
|
|
251
|
+
async list(principal) {
|
|
252
|
+
const rows = await redis.hgetall(key(principal));
|
|
253
|
+
return Object.values(rows).map((row) => JSON.parse(row) as AuthorizedGrant);
|
|
254
|
+
},
|
|
255
|
+
async put(principal, grant) {
|
|
256
|
+
await redis.hset(key(principal), grant.id, JSON.stringify(grant));
|
|
257
|
+
},
|
|
258
|
+
async remove(principal, grantId) {
|
|
259
|
+
await redis.hdel(key(principal), grantId);
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Every method is async, and `put` with an `id` already held replaces that grant
|
|
266
|
+
(a refresh rewrites the rotated pair under the same `id`). The same three
|
|
267
|
+
methods map onto Vercel KV's `hgetall`, `hset` and `hdel`, or any other
|
|
268
|
+
key-value backend.
|
|
269
|
+
|
|
270
|
+
Choosing a durable store puts refresh tokens at rest in that backend. Each one
|
|
271
|
+
is a long-lived credential for the user's resources, so the backend's access
|
|
272
|
+
control and encryption are yours to provide. This package never writes a grant
|
|
273
|
+
into eve's session attributes for that reason: a refresh token must not enter
|
|
274
|
+
eve's durable state.
|
|
275
|
+
|
|
207
276
|
## Parity with `@keycardai/langchain`
|
|
208
277
|
|
|
209
278
|
The two packages implement the same Keycard access model against different
|
|
@@ -247,8 +316,8 @@ const auth = Keycard.onBehalfOf({
|
|
|
247
316
|
`fakeZoneClient()` records every exchange, impersonation, and client
|
|
248
317
|
credentials call, and can fail one resource or every request. `keycardAuth()`
|
|
249
318
|
takes a `verify` seam in place of the JWKS-backed verifier, and
|
|
250
|
-
`Keycard.interactive()` takes a `flow` seam in place of the web-flow calls
|
|
251
|
-
`begin`, `complete`,
|
|
319
|
+
`Keycard.interactive()` takes a `flow` seam in place of the web-flow calls:
|
|
320
|
+
`begin`, `complete`, `register` for per-attempt clients, and `refresh`. A flow
|
|
252
321
|
without `register` is rejected at construction unless a `clientId` is also
|
|
253
322
|
given, so a test cannot accidentally exercise a combination that cannot work in
|
|
254
323
|
production. An injected `client` or `flow` supersedes `zoneUrl`, so a test needs
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
import type { ConnectionPrincipal, NonInteractiveAuthorizationDefinition } from "eve/connections";
|
|
2
2
|
import { type KeycardConnectionOptions } from "./config.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `
|
|
9
|
-
*
|
|
10
|
-
* definition
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* agree, a package whose whole purpose is to be dropped into `auth:` has to
|
|
15
|
-
* keep off the key.
|
|
16
|
-
*
|
|
17
|
-
* Nothing is lost. The only consumer of a definition-level `displayName` is
|
|
18
|
-
* eve's `stampChallengeDisplayName`, which resolves
|
|
19
|
-
* `definition.displayName ?? challenge.displayName` — so a name supplied on the
|
|
20
|
-
* challenge still reaches the sign-in prompt (see {@link interactive}), and a
|
|
21
|
-
* non-interactive definition has no challenge to name in the first place. Tools
|
|
22
|
-
* name a provider through `ToolAuthOptions.displayName` at the call site.
|
|
4
|
+
* None of these definitions carry a `displayName`. eve validates an authored
|
|
5
|
+
* connection's `auth` against a closed key list (`completeAuthorization`,
|
|
6
|
+
* `evict`, `getToken`, `principalType`, `startAuthorization`, `vercelConnect`),
|
|
7
|
+
* and a definition carrying any other key fails the build with
|
|
8
|
+
* `The "auth" field Unknown key "displayName"`. The only consumer of the field
|
|
9
|
+
* is eve's `stampChallengeDisplayName`, which resolves
|
|
10
|
+
* `definition.displayName ?? challenge.displayName`, so an interactive
|
|
11
|
+
* definition names itself on the challenge instead (see {@link interactive}),
|
|
12
|
+
* a non-interactive one has no challenge to name, and tools name a provider
|
|
13
|
+
* through `ToolAuthOptions.displayName` at the call site.
|
|
23
14
|
*/
|
|
24
15
|
/** Options for {@link impersonate}. */
|
|
25
16
|
export interface KeycardImpersonateOptions extends KeycardConnectionOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/connections.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EACnB,qCAAqC,EAEtC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAsC,KAAK,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAKhG
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/connections.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EACnB,qCAAqC,EAEtC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAsC,KAAK,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAKhG;;;;;;;;;;;GAWG;AAEH,uCAAuC;AACvC,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IACzE;;;OAGG;IACH,cAAc,EAAE,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,mBAAmB,KAAK,MAAM,CAAC,CAAC;CACvE;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,wBAAwB,GAChC,qCAAqC,CAkBvC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,wBAAwB,GAChC,qCAAqC,CAkDvC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,yBAAyB,GACjC,qCAAqC,CAsCvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../../src/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,SAAS,GAIV,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAiC,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../../src/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,SAAS,GAIV,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAiC,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwBpE;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CACpB,OAAiC;IAEjC,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE1D,OAAO;QACL,aAAa,EAAE,KAAK;QACpB,KAAK,CAAC,QAAQ;YACZ,MAAM,OAAO,GAA6B;gBACxC,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAChD,GAAG,CAAC,MAAM,MAAM,CAAC,gBA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,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B;YAC5E,MAAM,EAAE,aAAa,CAAC,kBAAkB;YACxC,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,QAAuB;IAC1C,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7C,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,WAAW;QAC3B,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type { KeycardAuthOptions, SubjectTokenRetention } from "./auth.js";
|
|
|
19
19
|
export { asSelf, impersonate, onBehalfOf } from "./connections.js";
|
|
20
20
|
export type { KeycardImpersonateOptions } from "./connections.js";
|
|
21
21
|
export { interactive, memoryAuthorizedTokenStore } from "./interactive.js";
|
|
22
|
-
export type {
|
|
22
|
+
export type { AuthorizedGrant, GrantStore, KeycardInteractiveOptions, KeycardResumeState, RegisterAttemptClientOptions, RegisteredClient, WebAppFlow, } from "./interactive.js";
|
|
23
23
|
export type { KeycardConnectionOptions } from "./config.js";
|
|
24
24
|
export { AuthorizationFailedError, AuthorizationRequiredError, FailureReason, RouteRejectedError, } from "./errors.js";
|
|
25
25
|
export { decodeClaims, subjectTokenExpired } from "./expiry.js";
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE3E,OAAO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,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;EAKlB,CAAC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { type AuthorizationRedirect, type BeginAuthorizationOptions, type CompleteAuthorizationOptions, type TokenResponse } from "@keycardai/oauth";
|
|
1
|
+
import { type AuthorizationRedirect, type BeginAuthorizationOptions, type CompleteAuthorizationOptions, type RefreshAuthorizationOptions, type TokenResponse } from "@keycardai/oauth";
|
|
2
2
|
import type { InteractiveAuthorizationDefinition, JsonValue } from "eve/connections";
|
|
3
3
|
/**
|
|
4
4
|
* The state journaled between eve's begin and callback steps.
|
|
5
5
|
*
|
|
6
6
|
* Every field is JSON, so the value satisfies eve's `JsonValue` bound and
|
|
7
|
-
* survives the durable step boundary the park crosses.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* client, and the code can only be redeemed by the client the authorization
|
|
12
|
-
* request was made with. Nothing secret is journaled — registered clients are
|
|
13
|
-
* public and PKCE-bound; see {@link interactive}.
|
|
7
|
+
* survives the durable step boundary the park crosses. `clientId` is journaled
|
|
8
|
+
* because each attempt may run as its own registered client, and only that
|
|
9
|
+
* client can redeem the code. Nothing secret is journaled: registered clients
|
|
10
|
+
* are public and PKCE-bound (see {@link interactive}).
|
|
14
11
|
*/
|
|
15
12
|
export interface KeycardResumeState {
|
|
16
13
|
readonly state: string;
|
|
@@ -20,25 +17,38 @@ export interface KeycardResumeState {
|
|
|
20
17
|
readonly clientId: string;
|
|
21
18
|
readonly [key: string]: JsonValue;
|
|
22
19
|
}
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
/**
|
|
21
|
+
* A completed authorization for one principal.
|
|
22
|
+
*
|
|
23
|
+
* `resources` and `scopes` are what the zone granted, and decide which
|
|
24
|
+
* connections the grant serves. `clientId` is the client the grant was issued
|
|
25
|
+
* to, and the client a refresh runs as. `id` is stable across refreshes, so a
|
|
26
|
+
* store can replace the rotated pair in place.
|
|
27
|
+
*/
|
|
28
|
+
export interface AuthorizedGrant {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly accessToken: string;
|
|
26
31
|
readonly expiresAt?: number;
|
|
27
|
-
readonly
|
|
32
|
+
readonly refreshToken?: string;
|
|
33
|
+
readonly clientId: string;
|
|
34
|
+
readonly resources: readonly string[];
|
|
35
|
+
readonly scopes: readonly string[];
|
|
28
36
|
}
|
|
29
37
|
/**
|
|
30
|
-
* Where completed
|
|
38
|
+
* Where completed grants live between turns, keyed by principal.
|
|
31
39
|
*
|
|
32
|
-
* eve caches a resolved bearer for the duration of a step
|
|
33
|
-
* `getToken` after that
|
|
34
|
-
*
|
|
35
|
-
* default is process-local, so a
|
|
36
|
-
*
|
|
40
|
+
* eve caches a resolved bearer for the duration of a step and reruns
|
|
41
|
+
* `getToken` after that; this store is what makes a later step reuse the grant
|
|
42
|
+
* a user already completed instead of parking again. `put` with an `id` the
|
|
43
|
+
* store already holds replaces that grant. The default is process-local, so a
|
|
44
|
+
* fresh process re-parks. A durable implementation (Redis, Vercel KV) keeps the
|
|
45
|
+
* grant, refresh token included, at rest in that backend; eve's session
|
|
46
|
+
* attributes are never used, so no credential enters eve's durable state.
|
|
37
47
|
*/
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
export interface GrantStore {
|
|
49
|
+
list(principal: string): Promise<readonly AuthorizedGrant[]>;
|
|
50
|
+
put(principal: string, grant: AuthorizedGrant): Promise<void>;
|
|
51
|
+
remove(principal: string, grantId: string): Promise<void>;
|
|
42
52
|
}
|
|
43
53
|
/** What one authorization attempt needs its own OAuth client for. */
|
|
44
54
|
export interface RegisterAttemptClientOptions {
|
|
@@ -67,6 +77,11 @@ export interface WebAppFlow {
|
|
|
67
77
|
* `clientId` is configured, and unused when one is.
|
|
68
78
|
*/
|
|
69
79
|
register?(options: RegisterAttemptClientOptions): Promise<RegisteredClient>;
|
|
80
|
+
/**
|
|
81
|
+
* Refreshes a grant at the token endpoint. When absent, a grant near expiry
|
|
82
|
+
* parks for a fresh sign-in instead.
|
|
83
|
+
*/
|
|
84
|
+
refresh?(options: RefreshAuthorizationOptions): Promise<TokenResponse>;
|
|
70
85
|
}
|
|
71
86
|
export interface KeycardInteractiveOptions {
|
|
72
87
|
/** The resource URL the authorization is scoped to. */
|
|
@@ -76,18 +91,16 @@ export interface KeycardInteractiveOptions {
|
|
|
76
91
|
/**
|
|
77
92
|
* OAuth client the browser flow runs as.
|
|
78
93
|
*
|
|
79
|
-
*
|
|
80
|
-
* callback. eve mints a fresh callback URL per attempt
|
|
81
|
-
* `/eve/v1/connections/:name/callback/:attemptId/:token`
|
|
94
|
+
* Leave this unset unless the client's registered redirect URIs already
|
|
95
|
+
* cover eve's callback. eve mints a fresh callback URL per attempt
|
|
96
|
+
* (`/eve/v1/connections/:name/callback/:attemptId/:token`) while RFC 9700
|
|
82
97
|
* requires the authorization server to match `redirect_uri` by exact string
|
|
83
|
-
* comparison
|
|
84
|
-
*
|
|
85
|
-
* registers the client per attempt instead, which is the only arrangement
|
|
86
|
-
* that satisfies both.
|
|
98
|
+
* comparison, so a statically registered client cannot name the URL the next
|
|
99
|
+
* attempt will use. Unset, the client is registered per attempt instead.
|
|
87
100
|
*
|
|
88
|
-
* A Keycard application `identifier` is
|
|
89
|
-
* clients by Client ID Metadata Document
|
|
90
|
-
* serves the client's metadata
|
|
101
|
+
* A Keycard application `identifier` is not a client id. Zones identify
|
|
102
|
+
* clients by Client ID Metadata Document, an HTTPS URL with a path that
|
|
103
|
+
* serves the client's metadata, so a value like `urn:app:my-agent` fails
|
|
91
104
|
* with `Unsupported client identifier prefix: urn`.
|
|
92
105
|
*/
|
|
93
106
|
clientId?: string;
|
|
@@ -99,65 +112,77 @@ export interface KeycardInteractiveOptions {
|
|
|
99
112
|
*/
|
|
100
113
|
clientName?: string;
|
|
101
114
|
/**
|
|
102
|
-
* Initial access token (RFC 7591
|
|
115
|
+
* Initial access token (RFC 7591 section 3.1) for a zone whose registration
|
|
103
116
|
* endpoint is authenticated. Unset for an open registration endpoint.
|
|
104
117
|
*/
|
|
105
118
|
initialAccessToken?: string;
|
|
106
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Scopes requested in the authorization request, and the scopes a stored
|
|
121
|
+
* grant must cover to serve this connection.
|
|
122
|
+
*/
|
|
107
123
|
requestScopes?: string | readonly string[];
|
|
108
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Extra resources authorized alongside `resource`. The resulting grant
|
|
126
|
+
* serves every connection whose resource it covers.
|
|
127
|
+
*/
|
|
109
128
|
additionalResources?: readonly string[];
|
|
110
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* Name used in the challenge, error messages and eve's authorization
|
|
131
|
+
* events. Display text only, never a store key; two definitions in one
|
|
132
|
+
* process may not share it.
|
|
133
|
+
*/
|
|
111
134
|
connectionName?: string;
|
|
112
|
-
/** Store for completed
|
|
113
|
-
tokens?:
|
|
135
|
+
/** Store for completed grants. Defaults to a process-local store. */
|
|
136
|
+
tokens?: GrantStore;
|
|
114
137
|
/** Web-flow seam. Replaces the zone calls, so tests take no network. */
|
|
115
138
|
flow?: WebAppFlow;
|
|
116
139
|
}
|
|
140
|
+
/** Forgets every defined connection name. For tests that define many. */
|
|
141
|
+
export declare function resetInteractiveDefinitions(): void;
|
|
117
142
|
/**
|
|
118
143
|
* Interactive connection auth backed by the zone's web authorization flow.
|
|
119
144
|
*
|
|
120
145
|
* The three callbacks eve drives:
|
|
121
146
|
*
|
|
122
|
-
* - `getToken` returns a token
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
147
|
+
* - `getToken` returns a token when the store holds a grant for the principal
|
|
148
|
+
* whose resources cover this connection's resource and whose scopes cover
|
|
149
|
+
* `requestScopes`, refreshing it first when it is near expiry and holds a
|
|
150
|
+
* refresh token. Otherwise it throws `ConnectionAuthorizationRequiredError`,
|
|
151
|
+
* and eve emits `authorization.required`, runs `startAuthorization` in a
|
|
152
|
+
* durable step, and parks the turn on its own callback webhook.
|
|
153
|
+
* - `startAuthorization` registers the attempt's client, begins the
|
|
154
|
+
* authorization-code flow with PKCE for the connection's resources against
|
|
155
|
+
* eve's minted callback URL, and returns the challenge URL plus the state,
|
|
156
|
+
* verifier, resources, callback URL and client id as resume state.
|
|
157
|
+
* - `completeAuthorization` redeems the callback as the journaled client and
|
|
158
|
+
* stores the resulting grant.
|
|
131
159
|
*
|
|
132
|
-
* Resuming without a completed authorization cannot yield a credential
|
|
133
|
-
* `
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* rather than an endless loop: it settles each parked authorization once, and
|
|
138
|
-
* a `Required` thrown after a completed authorization ends the tool call.
|
|
160
|
+
* Resuming without a completed authorization cannot yield a credential: only
|
|
161
|
+
* `completeAuthorization` writes the store, and a denied, mismatched, or failed
|
|
162
|
+
* callback writes nothing, so a resumed turn either finds a real grant or parks
|
|
163
|
+
* again. eve settles each parked authorization once, so that is terminal rather
|
|
164
|
+
* than a loop.
|
|
139
165
|
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* will return to.
|
|
166
|
+
* The client is registered per attempt unless `clientId` is set. eve mints a
|
|
167
|
+
* fresh callback URL for every attempt, while RFC 9700 requires the
|
|
168
|
+
* authorization server to match `redirect_uri` against the client's registered
|
|
169
|
+
* list by exact string comparison, so no fixed registration can name a URL that
|
|
170
|
+
* is generated later. Each attempt therefore gets a public, PKCE-bound client
|
|
171
|
+
* whose one redirect URI is the callback that attempt returns to. Those client
|
|
172
|
+
* records accumulate in the zone; a server that returns
|
|
173
|
+
* `registration_client_uri` and `registration_access_token` allows RFC 7592
|
|
174
|
+
* deletion once a grant settles.
|
|
150
175
|
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
176
|
+
* Grants are keyed by principal, never by `connectionName`, so two connections
|
|
177
|
+
* never share a token through a shared name and `evict` on one cannot clear the
|
|
178
|
+
* other's grant. A grant obtained with `additionalResources` serves every
|
|
179
|
+
* connection whose resource it covers, so listing the agent's resources on one
|
|
180
|
+
* connection yields one sign-in.
|
|
155
181
|
*
|
|
156
|
-
* Discovery is memoized per definition
|
|
157
|
-
*
|
|
158
|
-
* the redirect URI it binds is different every time.
|
|
182
|
+
* Discovery is memoized per definition. Registration is not, because the
|
|
183
|
+
* redirect URI it binds is different every time.
|
|
159
184
|
*/
|
|
160
185
|
export declare function interactive(options: KeycardInteractiveOptions): InteractiveAuthorizationDefinition<KeycardResumeState>;
|
|
161
|
-
/** A process-local store that drops
|
|
162
|
-
export declare function memoryAuthorizedTokenStore():
|
|
186
|
+
/** A process-local store that drops grants once they can no longer mint a token. */
|
|
187
|
+
export declare function memoryAuthorizedTokenStore(): GrantStore;
|
|
163
188
|
//# sourceMappingURL=interactive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../src/interactive.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../src/interactive.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EAEjC,KAAK,2BAA2B,EAChC,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAA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rE,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,wEAAwE;IACxE,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAKD,yEAAyE;AACzE,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,yBAAyB,GACjC,kCAAkC,CAAC,kBAAkB,CAAC,CA0QxD;AAED,oFAAoF;AACpF,wBAAgB,0BAA0B,IAAI,UAAU,CAwBvD"}
|
package/dist/esm/interactive.js
CHANGED
|
@@ -1,49 +1,57 @@
|
|
|
1
|
-
import { AuthProviderConfigurationError, AuthorizationDeniedError, beginAuthorization, completeAuthorization, fetchAuthorizationServerMetadata, registerClient, StateMismatchError, } from "@keycardai/oauth";
|
|
1
|
+
import { AuthProviderConfigurationError, AuthorizationDeniedError, beginAuthorization, completeAuthorization, fetchAuthorizationServerMetadata, refreshAuthorization, RefreshGrantError, registerClient, StateMismatchError, } from "@keycardai/oauth";
|
|
2
2
|
import { expiresAt } from "./config.js";
|
|
3
3
|
import { AuthorizationFailedError, AuthorizationRequiredError, FailureReason, } from "./errors.js";
|
|
4
4
|
import { principalKey } from "./subjectTokens.js";
|
|
5
|
+
/** A grant is refreshed once it is this close to its advisory expiry. */
|
|
6
|
+
const REFRESH_SKEW_MS = 60_000;
|
|
7
|
+
/** Connection names taken by `interactive()` definitions in this process. */
|
|
8
|
+
const definedConnectionNames = new Set();
|
|
9
|
+
/** Forgets every defined connection name. For tests that define many. */
|
|
10
|
+
export function resetInteractiveDefinitions() {
|
|
11
|
+
definedConnectionNames.clear();
|
|
12
|
+
}
|
|
5
13
|
/**
|
|
6
14
|
* Interactive connection auth backed by the zone's web authorization flow.
|
|
7
15
|
*
|
|
8
16
|
* The three callbacks eve drives:
|
|
9
17
|
*
|
|
10
|
-
* - `getToken` returns a token
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
18
|
+
* - `getToken` returns a token when the store holds a grant for the principal
|
|
19
|
+
* whose resources cover this connection's resource and whose scopes cover
|
|
20
|
+
* `requestScopes`, refreshing it first when it is near expiry and holds a
|
|
21
|
+
* refresh token. Otherwise it throws `ConnectionAuthorizationRequiredError`,
|
|
22
|
+
* and eve emits `authorization.required`, runs `startAuthorization` in a
|
|
23
|
+
* durable step, and parks the turn on its own callback webhook.
|
|
24
|
+
* - `startAuthorization` registers the attempt's client, begins the
|
|
25
|
+
* authorization-code flow with PKCE for the connection's resources against
|
|
26
|
+
* eve's minted callback URL, and returns the challenge URL plus the state,
|
|
27
|
+
* verifier, resources, callback URL and client id as resume state.
|
|
28
|
+
* - `completeAuthorization` redeems the callback as the journaled client and
|
|
29
|
+
* stores the resulting grant.
|
|
19
30
|
*
|
|
20
|
-
* Resuming without a completed authorization cannot yield a credential
|
|
21
|
-
* `
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* rather than an endless loop: it settles each parked authorization once, and
|
|
26
|
-
* a `Required` thrown after a completed authorization ends the tool call.
|
|
31
|
+
* Resuming without a completed authorization cannot yield a credential: only
|
|
32
|
+
* `completeAuthorization` writes the store, and a denied, mismatched, or failed
|
|
33
|
+
* callback writes nothing, so a resumed turn either finds a real grant or parks
|
|
34
|
+
* again. eve settles each parked authorization once, so that is terminal rather
|
|
35
|
+
* than a loop.
|
|
27
36
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* will return to.
|
|
37
|
+
* The client is registered per attempt unless `clientId` is set. eve mints a
|
|
38
|
+
* fresh callback URL for every attempt, while RFC 9700 requires the
|
|
39
|
+
* authorization server to match `redirect_uri` against the client's registered
|
|
40
|
+
* list by exact string comparison, so no fixed registration can name a URL that
|
|
41
|
+
* is generated later. Each attempt therefore gets a public, PKCE-bound client
|
|
42
|
+
* whose one redirect URI is the callback that attempt returns to. Those client
|
|
43
|
+
* records accumulate in the zone; a server that returns
|
|
44
|
+
* `registration_client_uri` and `registration_access_token` allows RFC 7592
|
|
45
|
+
* deletion once a grant settles.
|
|
38
46
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
47
|
+
* Grants are keyed by principal, never by `connectionName`, so two connections
|
|
48
|
+
* never share a token through a shared name and `evict` on one cannot clear the
|
|
49
|
+
* other's grant. A grant obtained with `additionalResources` serves every
|
|
50
|
+
* connection whose resource it covers, so listing the agent's resources on one
|
|
51
|
+
* connection yields one sign-in.
|
|
43
52
|
*
|
|
44
|
-
* Discovery is memoized per definition
|
|
45
|
-
*
|
|
46
|
-
* the redirect URI it binds is different every time.
|
|
53
|
+
* Discovery is memoized per definition. Registration is not, because the
|
|
54
|
+
* redirect URI it binds is different every time.
|
|
47
55
|
*/
|
|
48
56
|
export function interactive(options) {
|
|
49
57
|
if (!options.resource || !options.resource.trim()) {
|
|
@@ -53,6 +61,10 @@ export function interactive(options) {
|
|
|
53
61
|
throw new AuthProviderConfigurationError("interactive requires zoneUrl, or an injected flow");
|
|
54
62
|
}
|
|
55
63
|
const connectionName = options.connectionName ?? options.resource;
|
|
64
|
+
if (definedConnectionNames.has(connectionName)) {
|
|
65
|
+
throw new AuthProviderConfigurationError(`interactive connectionName "${connectionName}" is already defined in this process. ` +
|
|
66
|
+
"The name is display text, not a token key, so give each connection its own.");
|
|
67
|
+
}
|
|
56
68
|
const tokens = options.tokens ?? memoryAuthorizedTokenStore();
|
|
57
69
|
const flow = options.flow ??
|
|
58
70
|
zoneWebAppFlow(options.zoneUrl, {
|
|
@@ -68,6 +80,9 @@ export function interactive(options) {
|
|
|
68
80
|
throw new AuthProviderConfigurationError("interactive was given no clientId, so it registers a client per attempt, but the " +
|
|
69
81
|
"injected flow has no register()");
|
|
70
82
|
}
|
|
83
|
+
definedConnectionNames.add(connectionName);
|
|
84
|
+
const covers = (grant) => grant.resources.includes(options.resource) &&
|
|
85
|
+
scopes.every((scope) => grant.scopes.includes(scope));
|
|
71
86
|
/**
|
|
72
87
|
* The client this attempt runs as: the configured one, or a fresh public
|
|
73
88
|
* client whose single redirect URI is this attempt's callback.
|
|
@@ -104,26 +119,94 @@ export function interactive(options) {
|
|
|
104
119
|
}
|
|
105
120
|
return registered.clientId;
|
|
106
121
|
};
|
|
122
|
+
/** A per-attempt client is public; only the static client can hold a secret. */
|
|
123
|
+
const secretFor = (clientId) => staticClientId && clientId === staticClientId && options.clientSecret
|
|
124
|
+
? { clientSecret: options.clientSecret }
|
|
125
|
+
: {};
|
|
126
|
+
/**
|
|
127
|
+
* Refreshes a near-expiry grant as the client it was issued to. A refused
|
|
128
|
+
* refresh drops the grant so the caller parks for a fresh sign-in.
|
|
129
|
+
*/
|
|
130
|
+
const refreshGrant = async (principal, grant) => {
|
|
131
|
+
let response;
|
|
132
|
+
try {
|
|
133
|
+
response = await flow.refresh({
|
|
134
|
+
refreshToken: grant.refreshToken,
|
|
135
|
+
clientId: grant.clientId,
|
|
136
|
+
resources: grant.resources,
|
|
137
|
+
...(grant.scopes.length > 0 ? { scopes: grant.scopes } : {}),
|
|
138
|
+
...secretFor(grant.clientId),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
catch (cause) {
|
|
142
|
+
if (cause instanceof RefreshGrantError &&
|
|
143
|
+
cause.errorCode === "invalid_grant") {
|
|
144
|
+
// A concurrent step may have rotated this grant first, in which case
|
|
145
|
+
// the refresh token we sent is the stale one and the stored grant is
|
|
146
|
+
// the good one.
|
|
147
|
+
const current = (await tokens.list(principal)).find((candidate) => candidate.id === grant.id);
|
|
148
|
+
if (current && current.refreshToken !== grant.refreshToken) {
|
|
149
|
+
return current;
|
|
150
|
+
}
|
|
151
|
+
await tokens.remove(principal, grant.id);
|
|
152
|
+
throw new AuthorizationRequiredError(connectionName, {
|
|
153
|
+
message: `Connection "${connectionName}" requires authorization: the zone refused to ` +
|
|
154
|
+
`refresh the grant (${cause.message}).`,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
throw new AuthorizationFailedError(connectionName, {
|
|
158
|
+
message: cause instanceof Error
|
|
159
|
+
? `Refreshing the grant failed: ${cause.message}`
|
|
160
|
+
: "Refreshing the grant failed",
|
|
161
|
+
reason: FailureReason.ACQUISITION_FAILED,
|
|
162
|
+
retryable: cause instanceof RefreshGrantError ? cause.retryable : true,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
const rotated = grantFromResponse(response, {
|
|
166
|
+
id: grant.id,
|
|
167
|
+
clientId: grant.clientId,
|
|
168
|
+
resources: grant.resources,
|
|
169
|
+
scopes: grant.scopes,
|
|
170
|
+
// A server that rotates nothing leaves the old refresh token valid.
|
|
171
|
+
refreshToken: grant.refreshToken,
|
|
172
|
+
});
|
|
173
|
+
await tokens.put(principal, rotated);
|
|
174
|
+
return rotated;
|
|
175
|
+
};
|
|
107
176
|
return {
|
|
108
177
|
principalType: "user",
|
|
109
178
|
/**
|
|
110
|
-
*
|
|
179
|
+
* No definition-level `displayName`: eve validates an authored connection's
|
|
111
180
|
* `auth` against a closed key list (`completeAuthorization`, `evict`,
|
|
112
181
|
* `getToken`, `principalType`, `startAuthorization`, `vercelConnect`) that
|
|
113
|
-
* omits it
|
|
114
|
-
* `
|
|
115
|
-
* connection. The name still reaches the sign-in prompt: it rides on the
|
|
116
|
-
* challenge below, and eve's `stampChallengeDisplayName` resolves
|
|
117
|
-
* `definition.displayName ?? challenge.displayName`. The definition-level
|
|
118
|
-
* field was only ever a precedence override of a value already carried.
|
|
182
|
+
* omits it. The name rides on the challenge instead, where eve's
|
|
183
|
+
* `stampChallengeDisplayName` falls back to it.
|
|
119
184
|
*/
|
|
120
185
|
async getToken({ principal }) {
|
|
121
|
-
const key = storeKey(principal
|
|
122
|
-
const
|
|
123
|
-
|
|
186
|
+
const key = storeKey(principal);
|
|
187
|
+
const now = Date.now();
|
|
188
|
+
const held = (await tokens.list(key)).filter(covers);
|
|
189
|
+
// A grant is usable while its access token is live or while it holds a
|
|
190
|
+
// refresh token that can mint a new one; an expired grant with no refresh
|
|
191
|
+
// token is dead.
|
|
192
|
+
const usable = held.filter((candidate) => !dead(candidate, now));
|
|
193
|
+
let grant = usable.find((candidate) => !expired(candidate, now)) ?? usable[0];
|
|
194
|
+
if (!grant) {
|
|
195
|
+
await Promise.all(held.map((stale) => tokens.remove(key, stale.id)));
|
|
196
|
+
throw new AuthorizationRequiredError(connectionName);
|
|
197
|
+
}
|
|
198
|
+
if (nearExpiry(grant, now) && grant.refreshToken && flow.refresh) {
|
|
199
|
+
grant = await refreshGrant(key, {
|
|
200
|
+
...grant,
|
|
201
|
+
refreshToken: grant.refreshToken,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
else if (expired(grant, now)) {
|
|
205
|
+
// Expired, and this flow cannot refresh it.
|
|
206
|
+
await tokens.remove(key, grant.id);
|
|
124
207
|
throw new AuthorizationRequiredError(connectionName);
|
|
125
208
|
}
|
|
126
|
-
return toTokenResult(
|
|
209
|
+
return toTokenResult(grant);
|
|
127
210
|
},
|
|
128
211
|
async startAuthorization({ principal, callbackUrl }) {
|
|
129
212
|
requireUser(principal, connectionName);
|
|
@@ -155,21 +238,18 @@ export function interactive(options) {
|
|
|
155
238
|
retryable: false,
|
|
156
239
|
});
|
|
157
240
|
}
|
|
241
|
+
// The attempt's own client, falling back to the configured one for a
|
|
242
|
+
// resume journaled before clientId existed.
|
|
243
|
+
const clientId = resume.clientId || staticClientId;
|
|
158
244
|
let response;
|
|
159
245
|
try {
|
|
160
246
|
response = await flow.complete({
|
|
161
247
|
callbackParams: { ...callback.params },
|
|
162
248
|
state: resume.state,
|
|
163
249
|
codeVerifier: resume.codeVerifier,
|
|
164
|
-
|
|
165
|
-
// resume journaled before this field existed.
|
|
166
|
-
clientId: resume.clientId || staticClientId,
|
|
250
|
+
clientId,
|
|
167
251
|
redirectUri: resume.callbackUrl || callbackUrl,
|
|
168
|
-
|
|
169
|
-
// always public, so there is no secret to send.
|
|
170
|
-
...(staticClientId && options.clientSecret
|
|
171
|
-
? { clientSecret: options.clientSecret }
|
|
172
|
-
: {}),
|
|
252
|
+
...secretFor(clientId),
|
|
173
253
|
});
|
|
174
254
|
}
|
|
175
255
|
catch (cause) {
|
|
@@ -183,42 +263,54 @@ export function interactive(options) {
|
|
|
183
263
|
retryable: false,
|
|
184
264
|
});
|
|
185
265
|
}
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
266
|
+
const grant = grantFromResponse(response, {
|
|
267
|
+
id: crypto.randomUUID(),
|
|
268
|
+
clientId,
|
|
269
|
+
resources: resume.resources.length > 0 ? resume.resources : resources,
|
|
270
|
+
scopes,
|
|
271
|
+
});
|
|
272
|
+
await tokens.put(storeKey(principal), grant);
|
|
273
|
+
return toTokenResult(grant);
|
|
193
274
|
},
|
|
194
275
|
/**
|
|
195
|
-
* eve calls this after a rejected bearer
|
|
196
|
-
*
|
|
276
|
+
* eve calls this after a rejected bearer. Every grant covering this
|
|
277
|
+
* connection's resource goes, so the next `getToken` parks for a fresh one;
|
|
278
|
+
* grants for other resources stay.
|
|
197
279
|
*/
|
|
198
|
-
evict({ principal }) {
|
|
199
|
-
|
|
280
|
+
async evict({ principal }) {
|
|
281
|
+
const key = storeKey(principal);
|
|
282
|
+
const held = await tokens.list(key);
|
|
283
|
+
await Promise.all(held
|
|
284
|
+
.filter((grant) => grant.resources.includes(options.resource))
|
|
285
|
+
.map((grant) => tokens.remove(key, grant.id)));
|
|
200
286
|
},
|
|
201
287
|
};
|
|
202
288
|
}
|
|
203
|
-
/** A process-local store that drops
|
|
289
|
+
/** A process-local store that drops grants once they can no longer mint a token. */
|
|
204
290
|
export function memoryAuthorizedTokenStore() {
|
|
205
|
-
const
|
|
291
|
+
const grants = new Map();
|
|
206
292
|
return {
|
|
207
|
-
|
|
208
|
-
const held =
|
|
293
|
+
async list(principal) {
|
|
294
|
+
const held = grants.get(principal);
|
|
209
295
|
if (!held)
|
|
210
|
-
return
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
296
|
+
return [];
|
|
297
|
+
const now = Date.now();
|
|
298
|
+
for (const [id, grant] of held) {
|
|
299
|
+
if (dead(grant, now))
|
|
300
|
+
held.delete(id);
|
|
214
301
|
}
|
|
215
|
-
return held;
|
|
302
|
+
return [...held.values()];
|
|
216
303
|
},
|
|
217
|
-
|
|
218
|
-
|
|
304
|
+
async put(principal, grant) {
|
|
305
|
+
let held = grants.get(principal);
|
|
306
|
+
if (!held) {
|
|
307
|
+
held = new Map();
|
|
308
|
+
grants.set(principal, held);
|
|
309
|
+
}
|
|
310
|
+
held.set(grant.id, grant);
|
|
219
311
|
},
|
|
220
|
-
|
|
221
|
-
|
|
312
|
+
async remove(principal, grantId) {
|
|
313
|
+
grants.get(principal)?.delete(grantId);
|
|
222
314
|
},
|
|
223
315
|
};
|
|
224
316
|
}
|
|
@@ -232,20 +324,29 @@ function zoneWebAppFlow(issuer, options = {}) {
|
|
|
232
324
|
};
|
|
233
325
|
return {
|
|
234
326
|
async begin(beginOptions) {
|
|
235
|
-
return beginAuthorization(issuer, {
|
|
327
|
+
return beginAuthorization(issuer, {
|
|
328
|
+
...beginOptions,
|
|
329
|
+
metadata: await discover(),
|
|
330
|
+
});
|
|
236
331
|
},
|
|
237
332
|
async complete(completeOptions) {
|
|
238
|
-
return completeAuthorization(issuer, {
|
|
333
|
+
return completeAuthorization(issuer, {
|
|
334
|
+
...completeOptions,
|
|
335
|
+
metadata: await discover(),
|
|
336
|
+
});
|
|
337
|
+
},
|
|
338
|
+
async refresh(refreshOptions) {
|
|
339
|
+
return refreshAuthorization(issuer, {
|
|
340
|
+
...refreshOptions,
|
|
341
|
+
metadata: await discover(),
|
|
342
|
+
});
|
|
239
343
|
},
|
|
240
344
|
/**
|
|
241
345
|
* One public, PKCE-bound client per authorization, holding the single
|
|
242
|
-
* redirect URI that attempt will
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* bound to the PKCE verifier instead. `refresh_token` is requested so a
|
|
247
|
-
* long-lived grant can be renewed without sending the user back through the
|
|
248
|
-
* browser.
|
|
346
|
+
* redirect URI that attempt will come back to. `token_endpoint_auth_method:
|
|
347
|
+
* "none"` keeps the resume state free of credentials, and `refresh_token`
|
|
348
|
+
* is requested so a long-lived grant can be renewed without sending the
|
|
349
|
+
* user back through the browser.
|
|
249
350
|
*/
|
|
250
351
|
async register({ redirectUri, clientName, scopes }) {
|
|
251
352
|
const registered = await registerClient(issuer, {
|
|
@@ -267,18 +368,43 @@ function zoneWebAppFlow(issuer, options = {}) {
|
|
|
267
368
|
},
|
|
268
369
|
};
|
|
269
370
|
}
|
|
270
|
-
|
|
371
|
+
/**
|
|
372
|
+
* The grant a token response settles. The server's `scope` is authoritative
|
|
373
|
+
* when present; otherwise the scopes are the ones requested (RFC 6749 section
|
|
374
|
+
* 5.1 lets the server omit `scope` when it granted exactly those).
|
|
375
|
+
*/
|
|
376
|
+
function grantFromResponse(response, issued) {
|
|
377
|
+
const expiry = expiresAt(response.expiresIn);
|
|
378
|
+
const refreshToken = response.refreshToken ?? issued.refreshToken;
|
|
379
|
+
return {
|
|
380
|
+
id: issued.id,
|
|
381
|
+
accessToken: response.accessToken,
|
|
382
|
+
...(expiry !== undefined ? { expiresAt: expiry } : {}),
|
|
383
|
+
...(refreshToken !== undefined ? { refreshToken } : {}),
|
|
384
|
+
clientId: issued.clientId,
|
|
385
|
+
resources: [...issued.resources],
|
|
386
|
+
scopes: response.scope ? splitScopes(response.scope) : [...issued.scopes],
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
function expired(grant, now) {
|
|
390
|
+
return grant.expiresAt !== undefined && grant.expiresAt <= now;
|
|
391
|
+
}
|
|
392
|
+
/** Expired with no refresh token: nothing can mint a new access token. */
|
|
393
|
+
function dead(grant, now) {
|
|
394
|
+
return expired(grant, now) && !grant.refreshToken;
|
|
395
|
+
}
|
|
396
|
+
function nearExpiry(grant, now) {
|
|
397
|
+
return (grant.expiresAt !== undefined && grant.expiresAt - REFRESH_SKEW_MS <= now);
|
|
398
|
+
}
|
|
399
|
+
function storeKey(principal) {
|
|
271
400
|
if (principal.type !== "user")
|
|
272
|
-
return
|
|
273
|
-
return
|
|
401
|
+
return "app";
|
|
402
|
+
return principalKey(principal);
|
|
274
403
|
}
|
|
275
|
-
function toTokenResult(
|
|
404
|
+
function toTokenResult(grant) {
|
|
276
405
|
return {
|
|
277
|
-
token:
|
|
278
|
-
...(
|
|
279
|
-
...(token.providerSubject !== undefined
|
|
280
|
-
? { providerSubject: token.providerSubject }
|
|
281
|
-
: {}),
|
|
406
|
+
token: grant.accessToken,
|
|
407
|
+
...(grant.expiresAt !== undefined ? { expiresAt: grant.expiresAt } : {}),
|
|
282
408
|
};
|
|
283
409
|
}
|
|
284
410
|
function requireUser(principal, connectionName) {
|
|
@@ -294,6 +420,8 @@ function requireUser(principal, connectionName) {
|
|
|
294
420
|
function splitScopes(scopes) {
|
|
295
421
|
if (scopes === undefined)
|
|
296
422
|
return [];
|
|
297
|
-
return Array.isArray(scopes)
|
|
423
|
+
return Array.isArray(scopes)
|
|
424
|
+
? [...scopes]
|
|
425
|
+
: scopes.split(" ").filter(Boolean);
|
|
298
426
|
}
|
|
299
427
|
//# sourceMappingURL=interactive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.js","sourceRoot":"","sources":["../../src/interactive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,gCAAgC,EAChC,cAAc,EACd,kBAAkB,GAMnB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAA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,CAAE,MAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { appPrincipal, bearerRequest, connectionContext, expiredJwt, fakeVerifier, fakeZoneClient, sessionAuthContext, unsignedJwt, userPrincipal, validJwt, } from "./testUtils.js";
|
|
9
9
|
export type { FakeZoneClient, FakeZoneClientOptions, ZoneCalls } from "./testUtils.js";
|
|
10
|
+
export { resetInteractiveDefinitions } from "../interactive.js";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -6,4 +6,5 @@
|
|
|
6
6
|
* `@keycardai/eve/testing`.
|
|
7
7
|
*/
|
|
8
8
|
export { appPrincipal, bearerRequest, connectionContext, expiredJwt, fakeVerifier, fakeZoneClient, sessionAuthContext, unsignedJwt, userPrincipal, validJwt, } from "./testUtils.js";
|
|
9
|
+
export { resetInteractiveDefinitions } from "../interactive.js";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycardai/eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "[Preview] Keycard auth adapters for eve agents: a zone token verifier for the channel auth walk, Keycard-backed connection auth, and interactive authorization over the zone's web flow",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@keycardai/oauth": "0.
|
|
33
|
+
"@keycardai/oauth": "0.25.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"eve": ">=0.54.3 <0.55.0"
|