@vercel/board 0.37.0 → 0.38.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/dist/{access-BsP0hvcC.mjs → access-CVkjSfxj.mjs} +12 -12
- package/dist/access.d.mts +3 -3
- package/dist/access.mjs +6 -5
- package/dist/{actors-uoD62kiN.mjs → actors-kfMejhaw.mjs} +5 -4
- package/dist/{auth-CrjXLgOb.mjs → auth-B3bBYOqf.mjs} +2 -2
- package/dist/{auth-BHXgi696.d.mts → auth-BXLCkeB0.d.mts} +3 -3
- package/dist/{backend-BIvl2z1z.d.mts → backend-BkQlF1LQ.d.mts} +3 -3
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-C0WUS3-G.mjs → chat-provider-1WKsLEnM.mjs} +2 -2
- package/dist/{chat-provider-DFYEReZL.d.mts → chat-provider-DyNy5xdC.d.mts} +2 -2
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +3 -3
- package/dist/cli.mjs +5 -5
- package/dist/{commands-DGID-4Z2.d.mts → commands-B5d-lmNN.d.mts} +1 -1
- package/dist/{commands-D2pFCMSh.mjs → commands-BLS7erNu.mjs} +1 -1
- package/dist/{conformance-rCrc_mwi.mjs → conformance-qJF96jZI.mjs} +162 -20
- package/dist/conformance.d.mts +10 -2
- package/dist/conformance.mjs +1 -1
- package/dist/digest-DAxy9Ula.mjs +4 -0
- package/dist/{engine-COa73McY.mjs → engine-eUgO5jTM.mjs} +4 -4
- package/dist/{events-v8f7pF9f.mjs → events-C6HwB046.mjs} +2 -2
- package/dist/exports-BJ3wmEMY.d.mts +4 -0
- package/dist/{exports-DTezg4xR.mjs → exports-BsfcChdp.mjs} +80 -25
- package/dist/{external-BA2aCC_3.mjs → external-CHDxWIVf.mjs} +1 -1
- package/dist/{index-B1TZrMMu.d.mts → index-DpVyZa9b.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +3 -3
- package/dist/index.node.d.mts +5 -5
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +21 -21
- package/dist/inspect-5mkjJYMS.mjs +2 -0
- package/dist/{inspect-CoFk2Xj7.mjs → inspect-DtCbBtOW.mjs} +4 -4
- package/dist/{local-Cm7a7_Q0.mjs → local-Bo3XzEKB.mjs} +22 -22
- package/dist/{main-DoZ8IFPb.mjs → main-0nvLgajF.mjs} +42 -36
- package/dist/{memory-DqwXlyK4.mjs → memory-DkoqhxIH.mjs} +2 -2
- package/dist/{middleware-k_XKQ6f7.mjs → middleware-CPqAuRtp.mjs} +1 -1
- package/dist/page-R0RoE_gM.mjs +2 -0
- package/dist/{page-LysMGAl3.mjs → page-UsfvSIWc.mjs} +2 -2
- package/dist/{provider-7pOnK8Jw.d.mts → provider-D5yVFisj.d.mts} +1 -1
- package/dist/{routes-BtsZzal-.d.mts → routes-BffuaoTX.d.mts} +11 -1
- package/dist/{schemas-BG205xds.mjs → schemas-AZkxk06N.mjs} +3 -3
- package/dist/{serve-2U_JPJtS.mjs → serve-D7I3KisQ.mjs} +3 -3
- package/dist/{server-Drul_uwj.mjs → server-Cc3nYq3H.mjs} +9 -7
- package/dist/{serving-6_bhBNAW.mjs → serving-DJMcG0dT.mjs} +1 -1
- package/dist/{sql-aetuEBZC.mjs → sql-l3ysn4O5.mjs} +2 -2
- package/dist/{sqlite-DvsB8ENQ.mjs → sqlite-CAwNHbQD.mjs} +2 -2
- package/dist/{sqlite-db-BPwRoDI7.mjs → sqlite-db-cm5yhrD-.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-github.mjs +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +4 -4
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{targets-B0D4tJDY.mjs → targets-B4Uikw0J.mjs} +6 -6
- package/dist/{tokens-Dn4cPZIr.mjs → tokens-DA9ipsZ-.mjs} +1 -1
- package/docs/01-board/01-mounting.md +1 -1
- package/docs/01-board/09-access.md +10 -5
- package/docs/03-guides/03-ci.md +10 -4
- package/docs/04-reference/01-cli.md +23 -9
- package/docs/04-reference/02-board.md +2 -1
- package/docs/04-reference/03-http.md +3 -3
- package/docs/04-reference/05-conformance.md +9 -2
- package/package.json +1 -1
- package/dist/digest-CLGw7653.mjs +0 -4
- package/dist/exports-Bb0m03fT.d.mts +0 -4
- package/dist/inspect-B8c0Wh5Z.mjs +0 -2
- package/dist/page-BAQpb-s-.mjs +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { m as DIRECT_UPLOAD_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, t as HttpError } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { a as Link, i as ExternalTarget, l as isThreadTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-
|
|
4
|
-
import { i as afterRetry } from "./middleware-
|
|
5
|
-
import { o as options } from "./commands-
|
|
2
|
+
import { d as Labels, f as MESSAGE_TEXT_MAX, l as LabelKey, m as MessageText, o as ChannelPath, r as AttachmentId, s as Emoji, u as LabelValue, v as platformAvatar, y as storable } from "./schemas-AZkxk06N.mjs";
|
|
3
|
+
import { a as Link, i as ExternalTarget, l as isThreadTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-CHDxWIVf.mjs";
|
|
4
|
+
import { i as afterRetry } from "./middleware-CPqAuRtp.mjs";
|
|
5
|
+
import { o as options } from "./commands-BLS7erNu.mjs";
|
|
6
6
|
import { n as replaceMentions, t as extractMentions } from "./mentions-CB6ShY4R.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/api/routes.ts
|
|
@@ -221,7 +221,7 @@ const TokenBody = z.object({
|
|
|
221
221
|
profile: z.string().regex(/^[A-Za-z][A-Za-z0-9-]{0,31}$/, "a profile is up to 32 letters, numbers, and hyphens").optional(),
|
|
222
222
|
avatar: z.string().url().max(2048).optional(),
|
|
223
223
|
session: z.string().regex(/^[A-Za-z0-9_.:-]{1,128}$/, "a session is up to 128 letters, numbers, and _.:-").optional(),
|
|
224
|
-
/** How long it lives: `30d` by default, at most `90d`. */
|
|
224
|
+
/** How long it lives: `30d` by default, at most `90d`, and on Vercel's board `1d` by default, at most `7d`. */
|
|
225
225
|
expires: Duration.optional()
|
|
226
226
|
});
|
|
227
227
|
const SyncBody = z.object({ target: z.string().min(3).max(300) });
|
|
@@ -762,7 +762,7 @@ const routes = {
|
|
|
762
762
|
};
|
|
763
763
|
//#endregion
|
|
764
764
|
//#region src/version.ts
|
|
765
|
-
const VERSION = "0.
|
|
765
|
+
const VERSION = "0.38.0";
|
|
766
766
|
//#endregion
|
|
767
767
|
//#region src/server/backend.ts
|
|
768
768
|
/** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as unauthorized } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { _ as privateHost, a as VERCEL_ISSUER, b as trustedIssuers, g as markVerified, i as TOKENS, m as issuerName } from "./auth-
|
|
2
|
+
import { _ as privateHost, a as VERCEL_ISSUER, b as trustedIssuers, g as markVerified, i as TOKENS, m as issuerName } from "./auth-B3bBYOqf.mjs";
|
|
3
3
|
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
4
4
|
//#region src/server/identity.ts
|
|
5
5
|
let fromDisk;
|
|
@@ -404,7 +404,7 @@ write.
|
|
|
404
404
|
(`vercel:user:<id>`, `vercel:project:<id>:<env>`, …), `kind`, `handle`, and
|
|
405
405
|
optionally `expiresAt`. Its handle stands: the one the CLI sends doesn't
|
|
406
406
|
replace it, so a verifier that wants it returns `request.claims.handle`
|
|
407
|
-
itself. The name, profile, and `x-board-
|
|
407
|
+
itself. The name, profile, and `x-board-can` the caller sends still apply
|
|
408
408
|
on top of it.
|
|
409
409
|
- **`kind: 'person'` is a person on the team:** it gets what grants give
|
|
410
410
|
people, as the board's own people do (g1 gives everything), and a channel
|
|
@@ -247,7 +247,9 @@ await team.revokeToken(token.id)
|
|
|
247
247
|
characters. The board keeps its SHA-256. It goes where any token does,
|
|
248
248
|
`Authorization: Bearer`, and `BOARD_TOKEN` for `vb` and the handle.
|
|
249
249
|
- **It's its minter, narrowed.** Any caller mints one: a person, a deployment,
|
|
250
|
-
a workflow.
|
|
250
|
+
a workflow. On Vercel's board, only a deployment does, with its own OIDC
|
|
251
|
+
token, or a board token from itself: anyone else gets 403
|
|
252
|
+
`unsupported_principal`. Its access is worked out on every request, under the grants as
|
|
251
253
|
they are then, and narrowed to its `can`, so it never does more
|
|
252
254
|
than its minter could at that moment. A person's token writes under their
|
|
253
255
|
handle; a workflow's token loses what its grant gave once the grant goes.
|
|
@@ -266,7 +268,8 @@ await team.revokeToken(token.id)
|
|
|
266
268
|
pins a profile edits, deletes, and cancels only what was written as that
|
|
267
269
|
profile, not your own posts. Another token that pins it is the same author.
|
|
268
270
|
- **It expires** 30 days after it's minted, or after `expires`, 90 days at
|
|
269
|
-
most.
|
|
271
|
+
most. On Vercel's board, where only a deployment mints and can mint again,
|
|
272
|
+
it's a day, or `expires`, 7 days at most. A token minted with a token is its child: it keeps its parent's pins,
|
|
270
273
|
is narrowed to its parent's `can`, lives no longer, and stops when its parent
|
|
271
274
|
does.
|
|
272
275
|
- **Revoking it holds from the next request,** for it and every token minted
|
|
@@ -318,6 +321,8 @@ through the binding's `handle(caller)`, so the middleware sees it.
|
|
|
318
321
|
| `compileAccess(can)`, `union(accesses)`, `FULL_ACCESS` | What a `can` allows on its own, as an `Access`: `can(permission, channel)`, `readable(channel)`, `everywhere(permission)`, `summary()` for `me`, and `narrow(scope)` to keep only what both allow. `union` adds up what several allow, as tied grants do: accesses from `compileAccess`, `union`, or `narrow`, and anything else counts as nothing. Each is frozen. A bad pattern or permission throws `InvalidCan`. For a backend that checks a caller against a `can` of its own |
|
|
319
322
|
| `grantAccess(facts)` | What a caller may do by a board's grants, from plain data: `caller`, all of it, and `own`, without `everyone`'s grants, or null when nothing lets it in. `facts` is the `caller` (`{ kind: 'user', userId }`, a project in an environment, a run, an issuer's token, or `{ kind: 'app', clientId }`), the `grants`, whether the caller is on the team (`member`, `teamProject`, `teamApp`, booleans), a `cap`, the most the caller may do (`['read', 'react']` for a viewer), and a token's `can` |
|
|
320
323
|
| `checkGrantChange({ caller, own, owner, after, changed, revoked })` | Whether a caller may change grants so, as a board checks it: null, or `{ reason, pattern, permission }`, `reach` at a spot it can't manage and `admission` at one where `everyone` gets what it doesn't have. `caller` is its access as `GET /me` says and `own` the same without `everyone`'s grants, `after` every grant as the change leaves them, `changed` a grant made or widened, and `revoked` one revoked, removed from, or updated, as it was. It does no I/O, so a backend that keeps grants runs the same rule |
|
|
324
|
+
| `parseCan(header, name?)` | An `x-board-can` header as the `can` it says, as the board reads it: `dev/=read,post;ci/=read` is `{ 'dev/': ['read', 'post'], 'ci/': ['read'] }`, `all` every permission, and nothing after `=` none. One that doesn't parse, or is longer than `CAN_MAX`, throws `InvalidCan`, whose message names `name` (`x-board-can` unless you say); the board answers that 400 `invalid_scope` with the message. For a backend that reads the header itself: `compileAccess(parseCan(header))`, then `narrow` the caller's access with it |
|
|
325
|
+
| `CAN_MAX` | The longest `x-board-can` the board reads: 4000 characters |
|
|
321
326
|
| `InvalidCan` | What a `can`, a pattern, or a permission that doesn't parse throws, with `code` `invalid_can`, for a backend to answer 400 |
|
|
322
327
|
| `DEFAULT_CAN` | The `can` a grant or a token gets when it names none: `{ '*': ['read', 'post', 'react', 'label'] }` |
|
|
323
328
|
|
|
@@ -424,10 +429,10 @@ Reads show only what the caller can read, everywhere:
|
|
|
424
429
|
## Narrowing a token
|
|
425
430
|
|
|
426
431
|
```text
|
|
427
|
-
x-board-
|
|
432
|
+
x-board-can: dev/=read,post,react,label;ci/=read
|
|
428
433
|
```
|
|
429
434
|
|
|
430
|
-
A proxy that holds the credential sets `x-board-
|
|
435
|
+
A proxy that holds the credential sets `x-board-can`, and the board
|
|
431
436
|
intersects it with what the token has, so it only narrows. A sandbox's
|
|
432
437
|
network policy, for example, can add the token and the header on the way
|
|
433
438
|
out, so the sandbox never sees either. A caller holding its own token gains
|
|
@@ -501,7 +506,7 @@ all of them. They don't say where or what.
|
|
|
501
506
|
### Is there a static token for callers without OIDC?
|
|
502
507
|
|
|
503
508
|
Yes: a [board token](#tokens), which you mint, list, and revoke, and which
|
|
504
|
-
lives 90 days at most. Callers with an OIDC token need none: a
|
|
509
|
+
lives 90 days at most, or 7 on Vercel's board. Callers with an OIDC token need none: a
|
|
505
510
|
[grant](#grants) names them, a project, a repository's runs, or an issuer's
|
|
506
511
|
claims, and each token lives as long as it does. A credential of your own,
|
|
507
512
|
such as a session cookie, takes
|
package/docs/03-guides/03-ci.md
CHANGED
|
@@ -51,10 +51,12 @@ API by itself. A board that keeps [grants](../01-board/09-access.md#grants)
|
|
|
51
51
|
lets it in by its token: one on [`local()`](../01-board/10-local.md) that your
|
|
52
52
|
team serves in a long-running process, or a
|
|
53
53
|
[backend of your own](../01-board/01-mounting.md#a-backend-of-your-own).
|
|
54
|
-
Vercel's board
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
Vercel's board takes no grant for a repository's runs or an OIDC issuer: it
|
|
55
|
+
answers 400 `unsupported_principal`. There a workflow gets in as a Vercel
|
|
56
|
+
App. An OIDC exchange policy issues the run a Vercel App token, and a grant
|
|
57
|
+
names that app, `vb grants create --app <slug> --can …`, or every app with
|
|
58
|
+
`--all-apps`. On a board that keeps them, someone with `manage` in every
|
|
59
|
+
channel grants the repo's runs what they may do, with no deploy:
|
|
58
60
|
|
|
59
61
|
```text
|
|
60
62
|
$ vb grants create --github acme/www --event push --can 'errors-www=post,label;deploys=read,post'
|
|
@@ -206,6 +208,10 @@ the caller sends it as `BOARD_TOKEN`:
|
|
|
206
208
|
vb tokens create deploy-notifier --can deploys=post --profile deploys --expires 90d
|
|
207
209
|
```
|
|
208
210
|
|
|
211
|
+
On Vercel's board, a deployment mints it instead, with its own OIDC token,
|
|
212
|
+
for a day, or `--expires` up to `7d`: a person's mint answers 403
|
|
213
|
+
`unsupported_principal` there, and one for longer 400.
|
|
214
|
+
|
|
209
215
|
It prints the secret once, so store it where the caller reads its secrets.
|
|
210
216
|
It acts as you, narrowed to `deploys=post`, and every post with it is written
|
|
211
217
|
as your `deploys` profile. It lives 90 days at most. `vb tokens` lists it, and
|
|
@@ -485,16 +485,27 @@ vb tokens revoke <token>
|
|
|
485
485
|
`tokens create` mints a token that acts as you, narrowed to `--can`, and
|
|
486
486
|
prints its secret, which shows only here, so it pipes:
|
|
487
487
|
`BOARD_TOKEN=$(vb tokens create widget --can feedback/=post)`. `--can` is
|
|
488
|
-
`x-board-
|
|
488
|
+
`x-board-can`'s syntax (`dev/=read,post;ci/=read`). `--profile` and
|
|
489
489
|
`--session` pin what every request with it writes as. It lives 30 days, or
|
|
490
|
-
`--expires`, 90 days at most
|
|
490
|
+
`--expires`, 90 days at most; on Vercel's board, a day, or `--expires`, 7 days
|
|
491
|
+
at most. See [Tokens](../01-board/09-access.md#tokens).
|
|
492
|
+
On Vercel's board, only a deployment mints one, with its own OIDC token, or a
|
|
493
|
+
board token mints from itself: run as you, it answers with reason
|
|
494
|
+
`unsupported_principal`:
|
|
495
|
+
|
|
496
|
+
```text
|
|
497
|
+
$ vb tokens create widget --can feedback/=post --scope acme
|
|
498
|
+
error: Vercel's board mints board tokens only for a deployment.
|
|
499
|
+
|
|
500
|
+
Mint it from a deployment, with its OIDC token, or from a board token.
|
|
501
|
+
```
|
|
491
502
|
|
|
492
503
|
| Flag | Effect |
|
|
493
504
|
| --- | --- |
|
|
494
505
|
| `--can <scope>` | what it may do at most: `feedback/=post`, `dev/=read,post;ci/=read`, or `*=all`. Without it, read, post, react, and label everywhere |
|
|
495
506
|
| `--profile <name>` | the profile every request with it writes as |
|
|
496
507
|
| `--session <id>` | the session every request with it writes from |
|
|
497
|
-
| `--expires <duration>` | how long it lives: `1h`, `7d`, up to `90d` |
|
|
508
|
+
| `--expires <duration>` | how long it lives: `1h`, `7d`, up to `90d` (`7d` on Vercel's board) |
|
|
498
509
|
|
|
499
510
|
`vb tokens` lists your live tokens, or with `manage` in every channel,
|
|
500
511
|
everyone's: each one's ID, name, what it may do now, and when it expires, never a
|
|
@@ -567,21 +578,24 @@ $ vb grants revoke g4
|
|
|
567
578
|
revoked g4
|
|
568
579
|
```
|
|
569
580
|
|
|
570
|
-
Vercel's board
|
|
571
|
-
|
|
572
|
-
`
|
|
581
|
+
Vercel's board takes no `--github` or `--oidc` principal: a workflow gets in
|
|
582
|
+
as a Vercel App, which an OIDC exchange policy issues its token for, and the
|
|
583
|
+
grant names that app (`--app`, or `--all-apps`). `create` and `update` say so,
|
|
584
|
+
with reason `unsupported_principal`:
|
|
573
585
|
|
|
574
586
|
```text
|
|
575
587
|
$ vb grants create --github acme/web --can 'ci/=post' --scope acme
|
|
576
|
-
|
|
577
|
-
|
|
588
|
+
error: Vercel's board takes no GitHub or OIDC principals in a grant.
|
|
589
|
+
|
|
590
|
+
Grant an app that an OIDC exchange policy issues tokens for: --app <slug>.
|
|
578
591
|
```
|
|
579
592
|
|
|
580
593
|
`explain` says which grant decides a channel: the pattern that won and those
|
|
581
594
|
it won over, the closest grants there, and what they give. It explains you, or
|
|
582
595
|
with `manage` at `*`, the one `--user`, `--project` (in one `--environment`),
|
|
583
596
|
`--github`, `--oidc`, or `--app` it names. A local board has no apps, so
|
|
584
|
-
nothing lets one in there.
|
|
597
|
+
nothing lets one in there. Vercel's board explains no `--github` or `--oidc`
|
|
598
|
+
caller, since no grant there names one (`unsupported_principal`). A caller that can't list grants sees that
|
|
585
599
|
one decides, not which:
|
|
586
600
|
|
|
587
601
|
```text
|
|
@@ -345,7 +345,8 @@ revokeToken(id: string): Promise<{ revoked: boolean }>
|
|
|
345
345
|
(read, post, react, and label everywhere when left out), and
|
|
346
346
|
answers its `secret`, the only time it shows. `profile`, `avatar`, and
|
|
347
347
|
`session` pin what every request with it writes as. It lives 30 days, or
|
|
348
|
-
`expires`, 90 days at most
|
|
348
|
+
`expires`, 90 days at most; on Vercel's board, a day, or `expires`, 7 days at
|
|
349
|
+
most. On `local()`, the handle's own token is the
|
|
349
350
|
board's own code, narrowed. `tokens` lists your live ones, or everyone's with `manage`
|
|
350
351
|
in every channel; a handle holding a token lists that token and those minted
|
|
351
352
|
with it. `revokeToken` stops one and every token minted with it.
|
|
@@ -61,7 +61,7 @@ These routes take no token:
|
|
|
61
61
|
| `x-board-session` | the runtime session, recorded on writes (up to 200 characters) |
|
|
62
62
|
| `x-board-handle` | a person's handle, e.g. their Vercel username. Ignored for machines, and for people a host's verifier names |
|
|
63
63
|
| `x-board-name` | a person's display name, URI-encoded. Ignored for machines |
|
|
64
|
-
| `x-board-
|
|
64
|
+
| `x-board-can` | narrows what the token may do, for a proxy that holds it: `dev/=read,post;ci/=read`, or `all` for an entry's permissions (`dev/=all`). It never widens, and a narrowed caller can't register, pull, or ack watchers, or keep sync's records (403). See [Access](../01-board/09-access.md#narrowing-a-token) |
|
|
65
65
|
| `x-vercel-protection-bypass` | Vercel's own header, to pass Deployment Protection |
|
|
66
66
|
|
|
67
67
|
`board()` checks their shape (a 400 for one that's malformed), and the board
|
|
@@ -550,7 +550,7 @@ When the board knows what fixes it, the error carries a `hint` too, as
|
|
|
550
550
|
| 400 | `invalid_cursor` | an `after` or `before` that isn't a cursor or a message ID on this board |
|
|
551
551
|
| 400 | `invalid_after` | a reply's `after` that isn't a message in its thread |
|
|
552
552
|
| 400 | `token_expires_first` | a schedule made with a board token that would first send after the token expires |
|
|
553
|
-
| 400 | `invalid_scope` | an `x-board-
|
|
553
|
+
| 400 | `invalid_scope` | an `x-board-can` header the board can't parse, or one longer than 4000 characters, or the old `x-board-scope` header; the message says what to write |
|
|
554
554
|
| 400 | `ambiguous_mention` | an `@handle` matches several actors. The message lists the `@[actor-id]` forms to use, for a caller that reads every channel |
|
|
555
555
|
| 400 | `unknown_mention` | an `@[actor-id]` names no actor the board knows. A plain `@handle` that matches no one isn't an error: it stays plain text, listed in the answer's `unknownMentions` for a caller that reads the channel |
|
|
556
556
|
| 400 | `message_deleted` | editing, reacting to, or labeling a deleted message |
|
|
@@ -559,7 +559,7 @@ When the board knows what fixes it, the error carries a `hint` too, as
|
|
|
559
559
|
| 400 | `size_mismatch` | finishing a direct upload whose bytes in the store aren't the size its start said |
|
|
560
560
|
| 400 | `platform_error`, `invalid_target`, `unsupported` | a source read the platform failed, of a target it can't read, or on a platform that reads nothing on demand |
|
|
561
561
|
| 401 | `unauthorized` | a missing, malformed, or expired token, an unknown issuer, or the wrong audience |
|
|
562
|
-
| 403 | `forbidden` | a caller no grant lets in (the `hint` is the grant to create), a write its access doesn't allow where it can read (the message names the permission and channel), an edit or delete by someone else, someone else's schedule without `manage`, or a source read without `manage` in every channel, or the inbox without `sync` in every channel, or a code for anyone but a person, or watchers or sync's records for a caller narrowed with `x-board-
|
|
562
|
+
| 403 | `forbidden` | a caller no grant lets in (the `hint` is the grant to create), a write its access doesn't allow where it can read (the message names the permission and channel), an edit or delete by someone else, someone else's schedule without `manage`, or a source read without `manage` in every channel, or the inbox without `sync` in every channel, or a code for anyone but a person, or watchers or sync's records for a caller narrowed with `x-board-can` |
|
|
563
563
|
| 403 | `private_channel`, `shared_channel`, `not_in_channel` | a source read the board won't do |
|
|
564
564
|
| 403 | `not_a_project` | a `path` in `POST /watchers` from a caller that isn't a Vercel project, on a board that wakes by path: a path is on the caller's own project |
|
|
565
565
|
| 404 | `not_found` | no such route, a request a board with no backend doesn't serve, or a webhook for a sync entry the board doesn't have |
|
|
@@ -51,6 +51,13 @@ that secret as the credential, as `BOARD_TOKEN` sends it. `vb conformance`
|
|
|
51
51
|
passes it. From code, pass your own, which a backend of your own can make with
|
|
52
52
|
`board({ backend })`, or that check is skipped.
|
|
53
53
|
|
|
54
|
+
To check that `x-board-can` narrows a caller, it calls the board through
|
|
55
|
+
`withCan(can)`: a handle on the same board, with the run's own credential and
|
|
56
|
+
an `x-board-can: <can>` header, as a proxy that holds the credential sends it.
|
|
57
|
+
A caller narrowed so must be refused what its `can` leaves out, and its
|
|
58
|
+
principal's watchers and sync's records, with 403 `forbidden`. `vb conformance`
|
|
59
|
+
passes it. From code, pass your own, or those three checks are skipped.
|
|
60
|
+
|
|
54
61
|
Every grant it makes is in `conformance/grants/`, the same subtree and the same
|
|
55
62
|
channels each run, so a run leaves no channel behind and no grant reaches
|
|
56
63
|
outside it. It revokes them all when a check ends, and a revoke that fails
|
|
@@ -113,8 +120,8 @@ Then the rest, a group each in the report:
|
|
|
113
120
|
| Group | Check |
|
|
114
121
|
| --- | --- |
|
|
115
122
|
| `schedules` | schedules a reply a day out, lists it, and cancels it; and keeps a schedule's `noSync`, so its sends stay off every platform |
|
|
116
|
-
| `grants` | grants a project, lists it, and revokes it twice. Makes a second grant for the same principals, adds a repository and the project again (joining its environments) by the grant's ID, removes the project whatever its environments, and refuses to remove one it doesn't name (`not_in_grant`) or the last (`grant_empty`). Keeps `can` as written, a pattern with `[]` included. Through `explain`, in `conformance/grants/`: the most specific pattern decides, then the closest principal there, ties add up, `everyone` lets no one in and loses to `all-projects`, and a viewer reads but neither posts nor manages. Names an app and keeps it by client ID, then every app as a group. A token without `manage` changes no grant, and one with it only under `conformance/grants/inner/` only there. A token kept out of a pattern grants no one past it, even once `everyone` is kept out too, and lets no one in while `everyone` gets more than it has somewhere. Skipped when the token can't change the board's grants, when the board mints no tokens (501, 404, or 403), for a caller no grant could keep in a pattern closed to everyone, without a viewer or an app to check (a local board has no apps), for a name the board can't look up, for a member shut out under a lock (a run couldn't lift the lock after), and across teams, which isn't specified yet |
|
|
117
|
-
| `tokens` | mints a token for an hour that reads the channel, checks its `can` and its expiry, lists it without its secret, and revokes it twice. Then, with another one's secret: `/me` names its minter and only what it may read, it reads the channel and can't post there, and once it's revoked, it's refused with a 401 |
|
|
123
|
+
| `grants` | grants a project, lists it, and revokes it twice. Makes a second grant for the same principals, adds an app (or without one, a repository) and the project again (joining its environments) by the grant's ID, removes the project whatever its environments, and refuses to remove one it doesn't name (`not_in_grant`) or the last (`grant_empty`). Keeps `can` as written, a pattern with `[]` included. Through `explain`, in `conformance/grants/`: the most specific pattern decides, then the closest principal there, ties add up, `everyone` lets no one in and loses to `all-projects`, and a viewer reads but neither posts nor manages. Names an app and keeps it by client ID, then every app as a group. A token without `manage` changes no grant, and one with it only under `conformance/grants/inner/` only there. A token kept out of a pattern grants no one past it, even once `everyone` is kept out too, and lets no one in while `everyone` gets more than it has somewhere. Skipped when the token can't change the board's grants, when the board mints no tokens (501, 404, or 403), for a caller no grant could keep in a pattern closed to everyone, without a viewer or an app to check (a local board has no apps), for a name the board can't look up, for a member shut out under a lock (a run couldn't lift the lock after), and across teams, which isn't specified yet. The checks that grant to someone besides the project name the `app` in `principals`, or without one the repository. On a board that takes no GitHub or OIDC principal in a grant (400 `unsupported_principal`, as Vercel's API answers), they're skipped without an app, and so is the one that explains for a repository's runs, which nothing lets in |
|
|
124
|
+
| `tokens` | mints a token for an hour that reads the channel, checks its `can` and its expiry, lists it without its secret, and revokes it twice. Then, with another one's secret: `/me` names its minter and only what it may read, it reads the channel and can't post there, and once it's revoked, it's refused with a 401. Skipped where the run's caller mints no tokens (403 `unsupported_principal`: on Vercel's board, anyone but a deployment or a board token) |
|
|
118
125
|
| `attachments` | uploads a file, posts it, and downloads it |
|
|
119
126
|
| `watchers` | registers a tail, pulls the match for a post, and acks it. Skipped when the token already has watchers or a sync registered there, since registering replaces them, and on credentials Vercel's API takes no watchers from: anything but a deployment's own, board tokens included (403 `watchers_need_project`) |
|
|
120
127
|
| `sync` | imports a message as a platform user of its own (`conformance:user:<id>`), finds it by its platform IDs, imports it again to the same message, refuses a second root from the same platform thread, records a receipt and reads the copy back, lists where the thread is synced with it, answers 404 for a link no sync there knows, and deletes it. Pushes two events on one platform thread to the sync's inbox, and the first again, then leases them one at a time and in order, each once the one before is acked. Pulls the sync's `@sync` match for a post. Each of these is skipped when the token can't register a sync or `sync` in the channel, or already has watchers or a sync registered. Then, registering nothing: reads a post's and a reply's `noSync` back |
|
package/package.json
CHANGED
package/dist/digest-CLGw7653.mjs
DELETED
package/dist/page-BAQpb-s-.mjs
DELETED