@interop/was-client 0.15.0 → 0.17.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/Collection.d.ts +17 -26
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +60 -59
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.d.ts +27 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +60 -22
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts +26 -2
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +66 -18
- package/dist/Space.js.map +1 -1
- package/dist/WasClient.d.ts +6 -0
- package/dist/WasClient.d.ts.map +1 -1
- package/dist/WasClient.js +29 -20
- package/dist/WasClient.js.map +1 -1
- package/dist/edv/EdvCodec.d.ts +11 -2
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +79 -67
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/WasTransport.d.ts +23 -44
- package/dist/edv/WasTransport.d.ts.map +1 -1
- package/dist/edv/WasTransport.js +109 -155
- package/dist/edv/WasTransport.js.map +1 -1
- package/dist/edv/constants.d.ts +0 -14
- package/dist/edv/constants.d.ts.map +1 -1
- package/dist/edv/constants.js +4 -8
- package/dist/edv/constants.js.map +1 -1
- package/dist/edv/epochCrypto.d.ts +1 -1
- package/dist/edv/epochCrypto.d.ts.map +1 -1
- package/dist/edv/epochCrypto.js +33 -4
- package/dist/edv/epochCrypto.js.map +1 -1
- package/dist/edv/epochKeys.js +11 -1
- package/dist/edv/epochKeys.js.map +1 -1
- package/dist/edv/recipients.d.ts +5 -1
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +38 -16
- package/dist/edv/recipients.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/codec.d.ts +19 -0
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +26 -8
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/conditional.d.ts +11 -0
- package/dist/internal/conditional.d.ts.map +1 -1
- package/dist/internal/conditional.js +12 -0
- package/dist/internal/conditional.js.map +1 -1
- package/dist/internal/content.d.ts +7 -0
- package/dist/internal/content.d.ts.map +1 -1
- package/dist/internal/content.js +5 -3
- package/dist/internal/content.js.map +1 -1
- package/dist/internal/describe.d.ts +49 -1
- package/dist/internal/describe.d.ts.map +1 -1
- package/dist/internal/describe.js +47 -6
- package/dist/internal/describe.js.map +1 -1
- package/dist/internal/features.d.ts +73 -0
- package/dist/internal/features.d.ts.map +1 -0
- package/dist/internal/features.js +129 -0
- package/dist/internal/features.js.map +1 -0
- package/dist/internal/grant.d.ts.map +1 -1
- package/dist/internal/grant.js +2 -1
- package/dist/internal/grant.js.map +1 -1
- package/dist/internal/pagination.d.ts +58 -14
- package/dist/internal/pagination.d.ts.map +1 -1
- package/dist/internal/pagination.js +49 -6
- package/dist/internal/pagination.js.map +1 -1
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +38 -10
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/policy.d.ts +28 -0
- package/dist/internal/policy.d.ts.map +1 -1
- package/dist/internal/policy.js +31 -0
- package/dist/internal/policy.js.map +1 -1
- package/dist/internal/revoke.d.ts +11 -0
- package/dist/internal/revoke.d.ts.map +1 -1
- package/dist/internal/revoke.js +14 -1
- package/dist/internal/revoke.js.map +1 -1
- package/dist/internal/write.d.ts +10 -1
- package/dist/internal/write.d.ts.map +1 -1
- package/dist/internal/write.js +29 -4
- package/dist/internal/write.js.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/edv/EdvCodec.js
CHANGED
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
* insert (`sequence: 0`) is guarded by `If-None-Match: *`. A stale write
|
|
43
43
|
* surfaces as a `PreconditionFailedError` (412) -- the lost-update guard --
|
|
44
44
|
* rather than the old advisory last-writer-wins. Against a backend that does
|
|
45
|
-
* not advertise `conditional-writes` (no ETag)
|
|
45
|
+
* not advertise `conditional-writes` (no ETag) an update degrades to
|
|
46
|
+
* advisory, and a create-by-put is refused by the write path (the masked-404
|
|
47
|
+
* pre-read could otherwise silently clobber; see `upsertResource`).
|
|
46
48
|
* - **Encrypted metadata.** A Resource's user-writable `custom`
|
|
47
49
|
* (`name`/`tags`, via `setName`/`setTags`/`setMeta`) is
|
|
48
50
|
* encrypted into an EDV Document envelope with the same `documentCipher` used
|
|
@@ -51,20 +53,24 @@
|
|
|
51
53
|
* transparently via `meta()`.
|
|
52
54
|
*/
|
|
53
55
|
import { base64 } from '@scure/base';
|
|
54
|
-
import { EdvClientCore } from '@interop/edv-client';
|
|
56
|
+
import { EdvClientCore, assertDocId } from '@interop/edv-client';
|
|
55
57
|
import { EncryptionError, IntegrityError, KeyUnwrapError, ValidationError } from '../errors.js';
|
|
56
58
|
import { readEtag } from '../internal/conditional.js';
|
|
57
59
|
import { resolveEpochKeys } from './epochKeys.js';
|
|
58
60
|
import { didKeyResolver } from './epochCrypto.js';
|
|
59
|
-
import { isBlob, isTextContentType, readJsonData, resolvePayload } from '../internal/content.js';
|
|
60
|
-
import { DEFAULT_CONTENT_TYPE,
|
|
61
|
+
import { ENCODER, isBlob, isTextContentType, readJsonData, resolvePayload } from '../internal/content.js';
|
|
62
|
+
import { DEFAULT_CONTENT_TYPE, envelopeBytes } from './constants.js';
|
|
61
63
|
/**
|
|
62
64
|
* Default ceiling for a single-document (unchunked) encrypted binary or text
|
|
63
|
-
* write, measured in raw (pre-base64) bytes. Past this a `Blob`/`Uint8Array`
|
|
64
|
-
* rejected
|
|
65
|
-
*
|
|
65
|
+
* write, measured in raw (pre-base64) bytes. Past this a `Blob`/`Uint8Array`
|
|
66
|
+
* is rejected with guidance toward the chunked-stream path. 512 KiB: the
|
|
67
|
+
* envelope is stored as a JSON-family content type routed through the server's
|
|
68
|
+
* in-memory JSON body parser (a ~1 MiB cap), and a binary payload inflates
|
|
69
|
+
* ~33% inside the document (base64) and again ~33% in the JWE ciphertext
|
|
70
|
+
* (base64url) -- ~1.78x total, so 512 KiB raw stays safely under the cap.
|
|
71
|
+
* Raise `maxBlobBytes` against a server with a larger JSON body limit.
|
|
66
72
|
*/
|
|
67
|
-
const DEFAULT_MAX_BLOB_BYTES =
|
|
73
|
+
const DEFAULT_MAX_BLOB_BYTES = 512 * 1024;
|
|
68
74
|
/**
|
|
69
75
|
* A shared strict UTF-8 decoder used to test whether a non-JSON payload is
|
|
70
76
|
* valid UTF-8 (so it can be stored legibly as text rather than base64).
|
|
@@ -75,41 +81,33 @@ const DEFAULT_MAX_BLOB_BYTES = 5 * 1024 * 1024;
|
|
|
75
81
|
* instance is reused.
|
|
76
82
|
*/
|
|
77
83
|
const UTF8_DECODER = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
78
|
-
/**
|
|
79
|
-
* Heuristic for an EDV document id: multibase base58btc (leading `z`) of a
|
|
80
|
-
* 128-bit value. Used to reject human-readable ids on `put()`. Deliberately a
|
|
81
|
-
* loose, dependency-free check (base58 charset, leading `z`, minimum length) --
|
|
82
|
-
* it rejects ids with human separators (`.`/`-`/`_`/spaces) and is not a full
|
|
83
|
-
* decode-and-length verification.
|
|
84
|
-
*/
|
|
85
|
-
const EDV_DOC_ID = /^z[1-9A-HJ-NP-Za-km-z]{21,}$/;
|
|
86
|
-
/**
|
|
87
|
-
* The exact messages `@interop/minimal-cipher` / `@interop/edv-client` throw
|
|
88
|
-
* when a candidate key simply does not open an envelope -- a wrong or rotated
|
|
89
|
-
* key, not a corrupted one. `'Decryption failed.'` is the null-CEK unwrap path
|
|
90
|
-
* (the key could not unwrap the content-encryption key); `'No matching
|
|
91
|
-
* recipient found ...'` is the earlier kid-mismatch. These are the only two
|
|
92
|
-
* decrypt failures the `_decrypt` loop treats as "try the next key". Any OTHER
|
|
93
|
-
* decrypt failure means the key DID select a recipient and unwrap, but the
|
|
94
|
-
* content's AEAD tag did not verify -- a data-integrity failure (WebCrypto's
|
|
95
|
-
* `OperationError` in browsers, Node's "unable to authenticate data") -- which
|
|
96
|
-
* must surface as an {@link IntegrityError}, not be masked as a key miss.
|
|
97
|
-
*/
|
|
98
|
-
const KEY_MISS_MESSAGES = new Set([
|
|
99
|
-
'Decryption failed.',
|
|
100
|
-
'No matching recipient found for key agreement key.'
|
|
101
|
-
]);
|
|
102
84
|
/**
|
|
103
85
|
* Whether a decrypt error means "this candidate key does not open the envelope"
|
|
104
86
|
* (so the loop should try the next key) rather than an integrity failure. True
|
|
105
|
-
*
|
|
106
|
-
*
|
|
87
|
+
* for the upstream typed key-miss error -- `@interop/minimal-cipher` /
|
|
88
|
+
* `@interop/edv-client` raise a `KeyMissError` (the null-CEK unwrap path and the
|
|
89
|
+
* kid-mismatch path) when a candidate key is simply the wrong or a rotated key,
|
|
90
|
+
* not a corrupted envelope. It is matched by `err.name === 'KeyMissError'`
|
|
91
|
+
* rather than `instanceof`: name-dispatch survives pnpm installing two copies of
|
|
92
|
+
* the cipher package (a second copy's `KeyMissError` is a distinct class but
|
|
93
|
+
* carries the same `name`), so was-client need not import the class at all.
|
|
94
|
+
*
|
|
95
|
+
* Also true for a {@link KeyUnwrapError} raised by a candidate itself -- a lazy
|
|
96
|
+
* epoch key whose recipient entry turned out corrupt when its first decrypt
|
|
97
|
+
* forced the unwrap (see `lazyEpochKey`): that says nothing about the stored
|
|
98
|
+
* envelope, so the loop must move on to the next candidate rather than report
|
|
99
|
+
* tampering. Every other error means the key DID select a recipient and unwrap,
|
|
100
|
+
* but the content's AEAD tag did not verify -- a data-integrity failure
|
|
101
|
+
* (WebCrypto's `OperationError` in browsers, Node's "unable to authenticate
|
|
102
|
+
* data") -- which must surface as an {@link IntegrityError}, not be masked as a
|
|
103
|
+
* key miss.
|
|
107
104
|
*
|
|
108
105
|
* @param err {unknown}
|
|
109
106
|
* @returns {boolean}
|
|
110
107
|
*/
|
|
111
108
|
function isKeyMiss(err) {
|
|
112
|
-
return err instanceof
|
|
109
|
+
return (err instanceof KeyUnwrapError ||
|
|
110
|
+
(err instanceof Error && err.name === 'KeyMissError'));
|
|
113
111
|
}
|
|
114
112
|
/**
|
|
115
113
|
* A {@link ResourceCodec} that encrypts on write and decrypts on read using an
|
|
@@ -120,6 +118,13 @@ export class EdvCodec {
|
|
|
120
118
|
conditionalWrites = true;
|
|
121
119
|
_edv;
|
|
122
120
|
_writeKey;
|
|
121
|
+
/**
|
|
122
|
+
* The static JWE recipient descriptor every write encrypts to (the write
|
|
123
|
+
* key's `{ kid, alg }` header; the ephemeral `epk` is minted later inside
|
|
124
|
+
* `encrypt`). Deterministic per codec, so computed once here instead of per
|
|
125
|
+
* write.
|
|
126
|
+
*/
|
|
127
|
+
_recipients;
|
|
123
128
|
_readKeys;
|
|
124
129
|
_writeEpoch;
|
|
125
130
|
_contentType;
|
|
@@ -149,6 +154,8 @@ export class EdvCodec {
|
|
|
149
154
|
constructor({ edv, keyAgreementKey, readKeys, writeEpoch, contentType, maxBlobBytes, idDerivation }) {
|
|
150
155
|
this._edv = edv;
|
|
151
156
|
this._writeKey = keyAgreementKey;
|
|
157
|
+
this._recipients =
|
|
158
|
+
edv.documentCipher.createDefaultRecipients(keyAgreementKey);
|
|
152
159
|
this._readKeys = readKeys ?? [keyAgreementKey];
|
|
153
160
|
this._writeEpoch = writeEpoch;
|
|
154
161
|
this._contentType = contentType;
|
|
@@ -159,10 +166,19 @@ export class EdvCodec {
|
|
|
159
166
|
* @inheritdoc
|
|
160
167
|
*/
|
|
161
168
|
async encode({ id, data, contentType, current }) {
|
|
162
|
-
if (id !== undefined
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
if (id !== undefined) {
|
|
170
|
+
try {
|
|
171
|
+
// A full multibase decode + multihash length check (the same assertion
|
|
172
|
+
// the EDV core applies), tighter than a charset heuristic: it rejects a
|
|
173
|
+
// human-readable id, which would otherwise leak onto the URL.
|
|
174
|
+
assertDocId(id);
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
throw new ValidationError(`Cannot write a human-readable id "${id}" to an encrypted ` +
|
|
178
|
+
'collection -- it would leak onto the URL. Use add() to mint an ' +
|
|
179
|
+
'EDV document id, or carry the human-readable label inside the ' +
|
|
180
|
+
'encrypted content.');
|
|
181
|
+
}
|
|
166
182
|
}
|
|
167
183
|
// `add()` (no caller id): mint a random id up front, or -- in `'content'`
|
|
168
184
|
// mode -- leave it unset and stamp the content-derived id after encryption
|
|
@@ -184,7 +200,6 @@ export class EdvCodec {
|
|
|
184
200
|
priorDoc = read;
|
|
185
201
|
}
|
|
186
202
|
const { documentCipher } = this._edv;
|
|
187
|
-
const recipients = documentCipher.createDefaultRecipients(this._writeKey);
|
|
188
203
|
const encrypted = await documentCipher.encrypt({
|
|
189
204
|
doc: {
|
|
190
205
|
...(docId !== undefined && { id: docId }),
|
|
@@ -195,7 +210,7 @@ export class EdvCodec {
|
|
|
195
210
|
meta,
|
|
196
211
|
...(priorDoc && { sequence: priorDoc.sequence })
|
|
197
212
|
},
|
|
198
|
-
recipients,
|
|
213
|
+
recipients: this._recipients,
|
|
199
214
|
keyResolver: this._edv.keyResolver,
|
|
200
215
|
hmac: undefined,
|
|
201
216
|
update: priorDoc !== null
|
|
@@ -220,8 +235,10 @@ export class EdvCodec {
|
|
|
220
235
|
// conditional-writes feature (the ETag is absent). A fresh insert's
|
|
221
236
|
// `If-None-Match: *` needs no server-provided validator and so is emitted
|
|
222
237
|
// unconditionally by design -- it expresses the insert's intent
|
|
223
|
-
// (create-only-if-absent)
|
|
224
|
-
// it,
|
|
238
|
+
// (create-only-if-absent). A backend that does not honor it would ignore
|
|
239
|
+
// it, so the write path refuses the insert-after-null-pre-read up front
|
|
240
|
+
// on such a backend (see `upsertResource`) -- a masked-404 pre-read must
|
|
241
|
+
// not silently overwrite an existing document there.
|
|
225
242
|
...(priorDoc
|
|
226
243
|
? { ifMatch: readEtag(current ?? null) }
|
|
227
244
|
: { ifNoneMatch: true }),
|
|
@@ -312,7 +329,6 @@ export class EdvCodec {
|
|
|
312
329
|
*/
|
|
313
330
|
async encodeMeta({ custom }) {
|
|
314
331
|
const { documentCipher } = this._edv;
|
|
315
|
-
const recipients = documentCipher.createDefaultRecipients(this._writeKey);
|
|
316
332
|
// The document needs an EDV id (the cipher asserts one on decrypt). It is
|
|
317
333
|
// opaque to the server -- carried inside the un-decryptable envelope -- and
|
|
318
334
|
// minted fresh each write, since the metadata envelope is never updated in
|
|
@@ -320,7 +336,7 @@ export class EdvCodec {
|
|
|
320
336
|
const id = (await this._edv.generateId());
|
|
321
337
|
const encrypted = await documentCipher.encrypt({
|
|
322
338
|
doc: { id, content: custom },
|
|
323
|
-
recipients,
|
|
339
|
+
recipients: this._recipients,
|
|
324
340
|
keyResolver: this._edv.keyResolver,
|
|
325
341
|
hmac: undefined
|
|
326
342
|
});
|
|
@@ -532,8 +548,10 @@ const EDV_SCHEME = 'edv';
|
|
|
532
548
|
* defaults to `application/json`. Pass `JOSE_CONTENT_TYPE`
|
|
533
549
|
* (`application/jose+json`) against a server that registers an
|
|
534
550
|
* `application/*+json` parser.
|
|
535
|
-
* @param [options.maxBlobBytes] {number} single-document binary cap
|
|
536
|
-
*
|
|
551
|
+
* @param [options.maxBlobBytes] {number} single-document binary cap in raw
|
|
552
|
+
* bytes (default 512 KiB, sized so the encrypted envelope stays under a
|
|
553
|
+
* server's ~1 MiB JSON body cap; raise it against a server with a larger
|
|
554
|
+
* limit)
|
|
537
555
|
* @param [options.idDerivation] {string} how `add()` mints a document id.
|
|
538
556
|
* `'random'` (default) is the classic mutable-document model: a random
|
|
539
557
|
* `generateId()` id, updated in place via `sequence`. `'content'` derives the
|
|
@@ -557,6 +575,12 @@ export function createEdvEncryption({ resolveKeys, contentType = DEFAULT_CONTENT
|
|
|
557
575
|
if (!resolved) {
|
|
558
576
|
return null;
|
|
559
577
|
}
|
|
578
|
+
// Single-key collection (no epochs on the marker): the wallet's own
|
|
579
|
+
// key-agreement key encrypts and decrypts directly.
|
|
580
|
+
let keyAgreementKey = resolved.keyAgreementKey;
|
|
581
|
+
let keyResolver = resolved.keyResolver;
|
|
582
|
+
let readKeys;
|
|
583
|
+
let writeEpoch;
|
|
560
584
|
// Multi-recipient (key-epoch) collection: resolve the reader's per-epoch
|
|
561
585
|
// keys from the marker -- the `currentEpoch` key pair for writes, every
|
|
562
586
|
// epoch key it can unwrap for reads -- and drive the cipher with those.
|
|
@@ -571,30 +595,18 @@ export function createEdvEncryption({ resolveKeys, contentType = DEFAULT_CONTENT
|
|
|
571
595
|
// Epoch keys are self-describing did:key key-agreement keys, so a
|
|
572
596
|
// resource's recipient (the epoch public key) resolves through the
|
|
573
597
|
// standard did:key resolver, independent of the reader's own keystore.
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
return new EdvCodec({
|
|
579
|
-
edv,
|
|
580
|
-
keyAgreementKey: epochKeys.writeKey,
|
|
581
|
-
readKeys: epochKeys.readKeys,
|
|
582
|
-
writeEpoch: epochKeys.writeEpoch,
|
|
583
|
-
contentType,
|
|
584
|
-
maxBlobBytes,
|
|
585
|
-
idDerivation
|
|
586
|
-
});
|
|
598
|
+
keyAgreementKey = epochKeys.writeKey;
|
|
599
|
+
keyResolver = didKeyResolver;
|
|
600
|
+
readKeys = epochKeys.readKeys;
|
|
601
|
+
writeEpoch = epochKeys.writeEpoch;
|
|
587
602
|
}
|
|
588
603
|
}
|
|
589
|
-
|
|
590
|
-
// key-agreement key encrypts and decrypts directly, unchanged.
|
|
591
|
-
const edv = new EdvClientCore({
|
|
592
|
-
keyAgreementKey: resolved.keyAgreementKey,
|
|
593
|
-
keyResolver: resolved.keyResolver
|
|
594
|
-
});
|
|
604
|
+
const edv = new EdvClientCore({ keyAgreementKey, keyResolver });
|
|
595
605
|
return new EdvCodec({
|
|
596
606
|
edv,
|
|
597
|
-
keyAgreementKey
|
|
607
|
+
keyAgreementKey,
|
|
608
|
+
readKeys,
|
|
609
|
+
writeEpoch,
|
|
598
610
|
contentType,
|
|
599
611
|
maxBlobBytes,
|
|
600
612
|
idDerivation
|
package/dist/edv/EdvCodec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdvCodec.js","sourceRoot":"","sources":["../../src/edv/EdvCodec.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAYnD,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EAChB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACf,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE7E;;;;;GAKG;AACH,MAAM,sBAAsB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;AAE9C;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;AAE/E;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,8BAA8B,CAAA;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,oBAAoB;IACpB,oDAAoD;CACrD,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,SA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Aa,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAA;YAC/D,OAAO,IAAI,QAAQ,CAAC;gBAClB,GAAG;gBACH,eAAe;gBACf,QAAQ;gBACR,UAAU;gBACV,WAAW;gBACX,YAAY;gBACZ,YAAY;aACb,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
* `/{id}/chunks/{n}` sub-segment (the server's `chunked-streams` affordance),
|
|
37
37
|
* storing the chunk object as an opaque JSON body -- so `EdvClientCore.insert({
|
|
38
38
|
* stream })` / `getStream` drive chunked encrypted blobs over a WAS server
|
|
39
|
-
* unchanged.
|
|
39
|
+
* unchanged. Both chunk methods are gated on the backend advertising
|
|
40
|
+
* `chunked-streams` (throwing `NotSupportedError` when it is absent), like
|
|
41
|
+
* `find` is on `blinded-index-query`.
|
|
40
42
|
* `insert` uses an atomic `If-None-Match: *` create when the backend
|
|
41
43
|
* advertises the optional `conditional-writes` feature; otherwise (and for
|
|
42
44
|
* `update`) writes are advisory -- the EDV `sequence` is not enforced
|
|
@@ -57,7 +59,7 @@ export declare class WasTransport extends Transport {
|
|
|
57
59
|
readonly collectionId: string;
|
|
58
60
|
readonly contentType: string;
|
|
59
61
|
private readonly _was;
|
|
60
|
-
private
|
|
62
|
+
private readonly _features;
|
|
61
63
|
/**
|
|
62
64
|
* @param options {object}
|
|
63
65
|
* @param options.was {WasClient} a WAS client holding the signer
|
|
@@ -96,42 +98,6 @@ export declare class WasTransport extends Transport {
|
|
|
96
98
|
* @returns {Promise<HttpResponse>}
|
|
97
99
|
*/
|
|
98
100
|
private _put;
|
|
99
|
-
/**
|
|
100
|
-
* The feature tokens the collection's backend advertises in its "Collection
|
|
101
|
-
* Backend Selected" descriptor (e.g. `conditional-writes`,
|
|
102
|
-
* `blinded-index-query`). Memoized once it produces a definitive answer: a
|
|
103
|
-
* successful read (including one that lists no features) and a definitive
|
|
104
|
-
* "endpoint absent" (`404` / `405` / `501`) both resolve to a cached feature
|
|
105
|
-
* list, so every affordance gate falls closed against a server that has no
|
|
106
|
-
* backend descriptors.
|
|
107
|
-
*
|
|
108
|
-
* A transient/ambiguous failure (network error, timeout, `401`, `429`, other
|
|
109
|
-
* `5xx`) is NOT cached: the memo is cleared so the next call re-probes, and
|
|
110
|
-
* the error is rethrown so the caller fails loud rather than silently
|
|
111
|
-
* degrading atomicity against a server that may well be capable. (A single
|
|
112
|
-
* transient failure must not poison the transport for its lifetime.)
|
|
113
|
-
*
|
|
114
|
-
* @returns {Promise<string[]>}
|
|
115
|
-
*/
|
|
116
|
-
private _backendFeatures;
|
|
117
|
-
/**
|
|
118
|
-
* Reads and parses the backend descriptor once. On a definitive answer
|
|
119
|
-
* (success, or a `404` / `405` / `501` that means the endpoint is legitimately
|
|
120
|
-
* absent) resolves the feature list, which `_backendFeatures` then caches. On
|
|
121
|
-
* a transient failure, clears the memo (so the next call re-probes) and
|
|
122
|
-
* rethrows.
|
|
123
|
-
*
|
|
124
|
-
* @returns {Promise<string[]>}
|
|
125
|
-
*/
|
|
126
|
-
private _probeBackendFeatures;
|
|
127
|
-
/**
|
|
128
|
-
* Whether the collection's backend advertises the optional
|
|
129
|
-
* `conditional-writes` feature, so `insert` can use an atomic
|
|
130
|
-
* `If-None-Match: *` create instead of the advisory existence-check path.
|
|
131
|
-
*
|
|
132
|
-
* @returns {Promise<boolean>}
|
|
133
|
-
*/
|
|
134
|
-
private _conditionalWrites;
|
|
135
101
|
/**
|
|
136
102
|
* @inheritdoc
|
|
137
103
|
*
|
|
@@ -187,6 +153,16 @@ export declare class WasTransport extends Transport {
|
|
|
187
153
|
get({ id }?: {
|
|
188
154
|
id?: string;
|
|
189
155
|
}): Promise<IEncryptedDocument>;
|
|
156
|
+
/**
|
|
157
|
+
* Throws a `NotSupportedError` (the name `EdvClientCore` dispatches on)
|
|
158
|
+
* unless the collection's backend advertises the given affordance token --
|
|
159
|
+
* the shared gate in front of every optional-feature operation.
|
|
160
|
+
*
|
|
161
|
+
* @param feature {string} the affordance token (e.g. `chunked-streams`)
|
|
162
|
+
* @param what {string} the operation name, for the message
|
|
163
|
+
* @returns {Promise<void>}
|
|
164
|
+
*/
|
|
165
|
+
private _requireFeature;
|
|
190
166
|
/**
|
|
191
167
|
* Resolves to `true` if a resource exists at the document's path, via a
|
|
192
168
|
* bodiless `HEAD` (the stored envelope is not needed, only its existence). A
|
|
@@ -249,9 +225,11 @@ export declare class WasTransport extends Transport {
|
|
|
249
225
|
* `PUT` as an opaque binary body ({@link CHUNK_CONTENT_TYPE}) to the chunk's
|
|
250
226
|
* own URL (`.../chunks/{index}`), signed like every other write. The server
|
|
251
227
|
* stores the bytes verbatim -- it never parses the chunk -- so any
|
|
252
|
-
* client-side crypto framing is transparent to it.
|
|
253
|
-
*
|
|
254
|
-
*
|
|
228
|
+
* client-side crypto framing is transparent to it. Requires the backend's
|
|
229
|
+
* `chunked-streams` affordance (throws `NotSupportedError` when it is
|
|
230
|
+
* absent). The parent Resource must already exist
|
|
231
|
+
* (`EdvClientCore.insert`/`update` writes the document envelope before
|
|
232
|
+
* draining the stream), so a 404 here surfaces as a `NotFoundError`.
|
|
255
233
|
*
|
|
256
234
|
* @param options {object}
|
|
257
235
|
* @param options.docId {string} the owning document id (= WAS resource id)
|
|
@@ -267,9 +245,10 @@ export declare class WasTransport extends Transport {
|
|
|
267
245
|
*
|
|
268
246
|
* Reads one encrypted chunk back by index, `GET`ting the chunk's own URL and
|
|
269
247
|
* parsing the opaque body (stored as raw bytes, so parsed client-side) back
|
|
270
|
-
* into the EDV chunk object the decrypt stream consumes.
|
|
271
|
-
*
|
|
272
|
-
*
|
|
248
|
+
* into the EDV chunk object the decrypt stream consumes. Requires the
|
|
249
|
+
* backend's `chunked-streams` affordance (throws `NotSupportedError` when it
|
|
250
|
+
* is absent). A missing chunk (404) surfaces as a `NotFoundError` (the name
|
|
251
|
+
* `EdvClientCore` expects), so a reassembling reader can distinguish it.
|
|
273
252
|
*
|
|
274
253
|
* @param options {object}
|
|
275
254
|
* @param options.docId {string} the owning document id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WasTransport.d.ts","sourceRoot":"","sources":["../../src/edv/WasTransport.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"WasTransport.d.ts","sourceRoot":"","sources":["../../src/edv/WasTransport.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,kBAAkB,EACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAUhD,OAAO,EAGL,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAsB5B;;;GAGG;AACH,KAAK,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAqD9C,qBAAa,YAAa,SAAQ,SAAS;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAE5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAE3C;;;;;;;;;OASG;gBACS,EACV,GAAG,EACH,OAAO,EACP,YAAY,EACZ,WAAkC,EACnC,EAAE;QACD,GAAG,EAAE,YAAY,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB;IAkBD;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;;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