@serve.zone/interfaces 32.92.0 → 32.94.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/changelog.md +12 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/gatewayarearows.d.ts +369 -0
- package/dist_ts/data/gatewayarearows.js +335 -0
- package/dist_ts/data/gatewayareas.d.ts +41 -0
- package/dist_ts/data/gatewayareas.js +61 -1
- package/dist_ts/data/gatewayareas.validation.d.ts +5 -3
- package/dist_ts/data/gatewayareas.validation.js +35 -59
- package/dist_ts/data/gatewayconnector.d.ts +62 -4
- package/dist_ts/data/gatewayconnector.js +75 -4
- package/dist_ts/data/gatewayintent.d.ts +6 -5
- package/dist_ts/data/gatewayintent.js +18 -5
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/requests/gatewayconnector.d.ts +70 -0
- package/package.json +1 -1
- package/readme.md +62 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/gatewayarearows.ts +680 -0
- package/ts/data/gatewayareas.ts +80 -0
- package/ts/data/gatewayareas.validation.ts +38 -63
- package/ts/data/gatewayconnector.ts +146 -4
- package/ts/data/gatewayintent.ts +17 -4
- package/ts/data/index.ts +1 -0
- package/ts/requests/gatewayconnector.ts +83 -0
package/readme.md
CHANGED
|
@@ -4465,11 +4465,29 @@ guard that names roles excludes it by type.
|
|
|
4465
4465
|
`data.gatewayConfigAreaApplyOrder` (`security`, `dns`, `routes`, `mail`, `edges`) and stops at the
|
|
4466
4466
|
first failure; `data.IGatewayApplyReport.appliedRevision` advances only when the whole document
|
|
4467
4467
|
applied. Per-area refusals are `data.gatewayApplyRefusals` (`invalid-table`, `unsupported-area`,
|
|
4468
|
-
`area-owner-mismatch`, `local-changed-since-export`, `apply-failed`)
|
|
4468
|
+
`area-owner-mismatch`, `local-changed-since-export`, `apply-failed`), each with a `detail` text of
|
|
4469
|
+
at most 1024 characters (`data.IGatewayAreaApplyRefusal`).
|
|
4469
4470
|
The controller waits `data.gatewayConnectorContract.applyDesiredStateTimeoutMs` (10 s) for an
|
|
4470
4471
|
answer, the one number both sides read: it is Cloudly's push timeout, and a gateway's takeover wait
|
|
4471
4472
|
ends at half of it, so the controller still receives the gateway's refusal. No deadline travels in
|
|
4472
4473
|
the request.
|
|
4474
|
+
- Refused rows (Linus rulings 212 and 216): an area refusal may name the rows of the area's table it
|
|
4475
|
+
refuses as data, the optional `rows`: 1 to `data.gatewayConnectorContract.maximumRefusalRows` (256)
|
|
4476
|
+
entries `{ member, id, reason }` (`data.IGatewayAreaApplyRefusedRow`), each once, in no particular
|
|
4477
|
+
order. `member` is a list member of the refused area, `id` the row's id (`data.isGatewayAreaRowId`,
|
|
4478
|
+
and no unpaired UTF-16 surrogate), `reason` the gateway's word for the row (`no-managed-domain`):
|
|
4479
|
+
lowercase letter words joined by single hyphens, at most 64 characters, judged by form only, so a
|
|
4480
|
+
reader shows a reason it does not know as text. No value of the row travels; the reason form
|
|
4481
|
+
excludes dots, digits and addresses, and a gateway never writes a hostname there. A gateway names a
|
|
4482
|
+
row only when it judged that row; a gateway that could not judge names none. When the gateway names
|
|
4483
|
+
no row the key is omitted (`rows: undefined` and `rows: []` are refused); `rows` adds to `detail`,
|
|
4484
|
+
which keeps stating the findings as text, and it is no promise that the table applies without the
|
|
4485
|
+
named rows. The bound counts entries, so a row with two reasons takes two; a gateway that refuses
|
|
4486
|
+
more entries names the first 256 in a fixed order (member order of `data.gatewayAreaMembers`, then
|
|
4487
|
+
row order of the pushed table, then reason) and starts the detail with the total count, and the
|
|
4488
|
+
controller, holding what is named, pushes again for the rest. A reader built before the member
|
|
4489
|
+
refuses the whole report that carries it, and a gateway learns no version of its controller, so
|
|
4490
|
+
the controller reads `rows` before any gateway writes it.
|
|
4473
4491
|
- Owners: every area the controller owns on a gateway must be carried in each document.
|
|
4474
4492
|
`area-owner-mismatch` is the per-area refusal of a document that disagrees with an area's owner on
|
|
4475
4493
|
the gateway; the entry's `owner` says which side owns it, and nothing of the document applies. A
|
|
@@ -4545,8 +4563,8 @@ guard that names roles excludes it by type.
|
|
|
4545
4563
|
them. Both read only and carry
|
|
4546
4564
|
row ids, digests, names and states, never a table value, a password or a verifier, and neither has
|
|
4547
4565
|
a validator: a reader shows a refusal name it does not know as text and never refuses the answer.
|
|
4548
|
-
`data.gatewayIntentRefusals` is the controller's whole vocabulary
|
|
4549
|
-
|
|
4566
|
+
`data.gatewayIntentRefusals` is the controller's whole vocabulary; the requests declared here
|
|
4567
|
+
cover it between them (dry run, takeover, operator row read and write).
|
|
4550
4568
|
- Takeover (`ts/data/gatewayintent.ts`, `requests.gatewayconnector.IReq_Admin_Cloudly_TakeOverGateway`):
|
|
4551
4569
|
`takeOverGateway` takes `{ identity, gatewayId, exportDigests }`, where `exportDigests` lists one
|
|
4552
4570
|
`data.IGatewayTakeoverExportDigest` `{ area, digest }` per configuration area, each the
|
|
@@ -4583,7 +4601,47 @@ guard that names roles excludes it by type.
|
|
|
4583
4601
|
`data.validateAdoptGatewayResponse`, `data.validateRegisterGatewaySessionRequest`,
|
|
4584
4602
|
`data.validateGatewayDesiredState` (envelope only), `data.validateGatewayApplyReport`,
|
|
4585
4603
|
`data.validateGatewayStatusDocument`, `data.validateGatewayAreaExport`,
|
|
4586
|
-
`data.validateGatewayRouteDnsResultsRequest
|
|
4604
|
+
`data.validateGatewayRouteDnsResultsRequest`, `data.validateGatewayRouteDnsResultsResponse` and
|
|
4605
|
+
`data.validateGatewayAreaRowWrite`.
|
|
4606
|
+
- Operator rows (`ts/data/gatewayarearows.ts`, `requests.gatewayconnector`; Linus rulings 117 §4
|
|
4607
|
+
criterion 4, 121 §6 item 7, 166 points 2 and 4, 171): once a gateway is taken over, an
|
|
4608
|
+
administrator changes its tables one row at a time through the controller. A row is addressed
|
|
4609
|
+
`{ area, member, id }` (`id: null` for a singleton of `data.gatewayAreaSingletonMembers`).
|
|
4610
|
+
`getGatewayAreaRows` (`IReq_Admin_Cloudly_GetGatewayAreaRows`, `{ identity, gatewayId, area,
|
|
4611
|
+
member }`) answers a `data.TGatewayAreaRowsReport`: the table's revision and digest and, per row,
|
|
4612
|
+
its compare token `digest`, its `owner` (`compile` for a row the controller's records compile,
|
|
4613
|
+
which no operator write changes) and its write form (`data.IGatewayAreaRowWrites`), in which every
|
|
4614
|
+
secret of `data.gatewayAreaSecretPaths` is `{ kind: 'keep', version }` (sealed) or
|
|
4615
|
+
`{ kind: 'keep' }` (verifier), never a value; or `{ ok: false, code }` with one of
|
|
4616
|
+
`data.gatewayAreaRowsRefusals`. `writeGatewayAreaRow` (`IReq_Admin_Cloudly_WriteGatewayAreaRow`,
|
|
4617
|
+
`{ identity, gatewayId, write }`) puts one row or one singleton's value, or deletes one list row
|
|
4618
|
+
(`data.TGatewayAreaRowWrite`), based on the digest the administrator read (`expectedDigest`,
|
|
4619
|
+
`null` for a row that must be absent); a new secret is `{ kind: 'set', value }` and the controller
|
|
4620
|
+
mints its version, a new verifier `{ kind: 'set', verifier }`. It answers a
|
|
4621
|
+
`data.TGatewayAreaRowWriteReport`: the revision, the row's and the table's digest and the minted
|
|
4622
|
+
versions, or `{ ok: false, code, problems }` with one of `data.gatewayAreaRowWriteRefusals` and
|
|
4623
|
+
validator lines that never carry a value. `intent-row-stale` means the row moved since the read
|
|
4624
|
+
(read it again); `kept-secret-unknown` means the written row keeps a secret the row does not hold,
|
|
4625
|
+
because a moved row answers `intent-row-stale` first (fix the row, do not re-read). A put equal to
|
|
4626
|
+
the stored row and a delete of an absent row write nothing (`revision: null`). The write never
|
|
4627
|
+
waits for the gateway: `getGateways` tells when it applied the revision.
|
|
4628
|
+
- Caller, both requests: a human administrator who signed in within the last five minutes, with
|
|
4629
|
+
neither a delegated admin temp token nor a machine identity. The controller refuses anyone else
|
|
4630
|
+
with an error naming the requirement before it reads anything, and judges the write's caller
|
|
4631
|
+
again inside its transaction. No delegated admin scope names either request. The read takes
|
|
4632
|
+
the write's caller because it answers the whole table but the sealed values and the table
|
|
4633
|
+
digest, which hashes those values: only a caller entitled to the plaintext may hold both.
|
|
4634
|
+
- Compare token: `data.computeGatewayAreaRowDigest` of the stored row
|
|
4635
|
+
(`data.createGatewayAreaRowDigestInput`), which takes every sealed member by its version only and
|
|
4636
|
+
a verifier as stored. A version names one value, so the token moves with every change, and a
|
|
4637
|
+
reader who holds every other input cannot test a guess at a sealed value against it. A reader
|
|
4638
|
+
compares it for equality only.
|
|
4639
|
+
- One check, one list: `data.validateGatewayAreaRowWrite` judges a write's envelope and secret
|
|
4640
|
+
forms (the controller before it reads, a client before it signs in; the controller answers a
|
|
4641
|
+
problem as the connector refusal `request-invalid`), and `data.gatewayAreaSecretPaths` is the one
|
|
4642
|
+
list of where a table holds a secret, from which `data.listGatewayAreaSecrets` is computed and
|
|
4643
|
+
which `data.projectGatewayAreaRow` and `data.resolveGatewayAreaRowWrite` walk. The controller
|
|
4644
|
+
mints versions with `data.createGatewaySealedVersion`.
|
|
4587
4645
|
|
|
4588
4646
|
```typescript
|
|
4589
4647
|
import { data, requests } from '@serve.zone/interfaces';
|