Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0c17677
test(TC-1423): cover recording the owner authority of policy registra…
samgbafa Oct 18, 2026
0ccb45e
feat(TC-1423): record the owner authority of policy registrations
samgbafa Oct 18, 2026
3df0584
test(TC-1423): cover the policy root lifetime cap and authority mode
samgbafa Oct 18, 2026
c7003c1
refactor(TC-1423): drop an unused test failpoint from owner-authority…
samgbafa Oct 18, 2026
e2f33f1
feat(TC-1423): cap policy root lifetime and add the authority mode
samgbafa Oct 18, 2026
dea62a4
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n1-owner-authori…
samgbafa Oct 18, 2026
65df9d5
fix(TC-1423): classify owner authority off the request path
samgbafa Oct 18, 2026
256f777
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n1-owner-authori…
samgbafa Oct 18, 2026
b9d2177
test(TC-1423): cover checking the owner authority on policy use
samgbafa Oct 18, 2026
b4eef99
test(TC-1423): policy source network must belong to the content owner…
samgbafa Oct 18, 2026
81560c6
test(TC-1423): source network owner and state cases at registration (…
samgbafa Oct 18, 2026
09d7e33
fix(TC-1423): bound background classifications and tighten their tests
samgbafa Oct 18, 2026
066546d
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n1-owner-authori…
samgbafa Oct 18, 2026
65b5db6
fix(TC-1423): pin the lifetime cap and flip-signal edges
samgbafa Oct 18, 2026
2972b5e
feat(TC-1423): check owner authority on policy share use
samgbafa Oct 18, 2026
3cee657
fix(TC-1423): check the owner and existence of policy source networks…
samgbafa Oct 18, 2026
46d04ae
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n2-root-lifetime…
samgbafa Oct 18, 2026
1bfa6cf
refactor(TC-1423): split the pure network owner predicate from the ex…
samgbafa Oct 18, 2026
b0c4900
docs(TC-1423): drop the unreachable none bucket from the flip-signal …
samgbafa Oct 18, 2026
002642e
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n2-root-lifetime…
samgbafa Oct 18, 2026
4a8b42f
test(TC-1423): kv ceiling entries outside the content owner (RED)
samgbafa Oct 18, 2026
85fee4a
fix(TC-1423): every kv ceiling entry must name a space of the content…
samgbafa Oct 18, 2026
058eee0
test(TC-1423): pick the loop-back fixture's target with high_id
samgbafa Oct 18, 2026
79a2be5
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n1-owner-authori…
samgbafa Oct 18, 2026
c7d587e
test(TC-1423): import re-shared children once they are valid
samgbafa Oct 18, 2026
80ef3af
Merge remote-tracking branch 'origin/skgbafa/tc-1423-n2-root-lifetime…
samgbafa Oct 18, 2026
9c65a0e
fix(TC-1423): close review gaps in owner-authority checks
samgbafa Oct 18, 2026
9364237
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 19, 2026
c0d0331
Merge commit '93642371f8d84f527d249bdc4c07c58cb49ffac7' into nstack/n2
Oct 19, 2026
5ae33ce
Merge commit 'c0d033136b45bfaa198a64f869b2eadd3ee08ae2' into nstack/n3
Oct 19, 2026
f89ebc3
Check issuer set at policy registration
Oct 21, 2026
bb9969c
Refuse unconfigured issuers at policy registration
Oct 21, 2026
7ef2642
Cover row-pair registration and owner-first refusal order
Oct 21, 2026
1534fc6
Merge remote-tracking branch 'origin/main' into tmp-n1-merge
Oct 21, 2026
73e0ad4
Ungate load_closure_edges for policy owner authority closure
Oct 21, 2026
abe7d5c
Merge origin/main into tc-1423/n1b-source-network-owner
Oct 23, 2026
2956262
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 23, 2026
33f3639
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 23, 2026
5e0f671
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 23, 2026
5576fce
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 23, 2026
93ece4e
Merge remote-tracking branch 'origin/main' into skgbafa/tc-1423-n1-ow…
Oct 23, 2026
d8d3df0
Create the content owner's network in the Policy/v3 test harness
Oct 23, 2026
6934749
Allow the extra argument on register_policy_writes
Oct 23, 2026
4cb8a9b
Merge branch 'pol358' into pol360
Oct 23, 2026
f9235c0
Merge branch 'pol360' into pol362
Oct 23, 2026
cbaa55a
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 23, 2026
bb6f835
Merge branch 'pol358' into pol360
Oct 23, 2026
ed49a5e
Merge branch 'pol360' into pol362
Oct 23, 2026
c8fd00a
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 23, 2026
566eb78
Merge origin/main into tc-1423/n1b-source-network-owner
Oct 23, 2026
d83e747
Merge origin/skgbafa/tc-1423-n1-owner-authority-record into skgbafa/t…
Oct 23, 2026
e7c6ae0
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 23, 2026
ad03e71
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 23, 2026
da8572b
Order the owner-authority migration last; load a config without sql_s…
Oct 23, 2026
e52fdcf
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 23, 2026
b46d89c
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 23, 2026
c742ef2
Test that every optional Config section loads when omitted
Oct 23, 2026
05ea2b1
Test that every optional Config section loads when omitted (fix)
Oct 23, 2026
1440bcb
Test that every optional Config section loads when omitted (fix)
Oct 23, 2026
c689034
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 23, 2026
11895ec
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 23, 2026
e2828a2
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 24, 2026
c6f1a58
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
bb32c4c
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
97e6068
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 24, 2026
facff5e
Advertise the owner-authority features before the setting-gated ones;…
Oct 24, 2026
c260bac
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
7ecacdc
Merge origin/main into tc-1423/n1b-source-network-owner
Oct 24, 2026
cbe9354
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 24, 2026
beb70fe
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 24, 2026
163ecc6
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
e8cd8bb
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
42d1506
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 24, 2026
ec572f6
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 24, 2026
2b8be4a
Merge origin/main into tc-1423/n1b-source-network-owner
Oct 24, 2026
47b86a6
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
1a86b92
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
02f9419
Merge origin/main into tc-1423/n1b-source-network-owner
Oct 24, 2026
b11ee88
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 24, 2026
81c5f4a
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
155bcfc
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
63f3d41
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 24, 2026
41d2ad4
Merge origin/main into tc-1423/n1b-source-network-owner
Oct 24, 2026
f22cc91
Merge origin/main into skgbafa/tc-1423-n1-owner-authority-record
Oct 24, 2026
610c60d
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
d845a30
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
25c9303
Merge origin/main into skgbafa/tc-1530-issuer-registration
Oct 24, 2026
c88e837
Neutral wording for the source-network comments and changelog entry
Oct 24, 2026
c568d2c
Merge tc-1423/n1b-source-network-owner into skgbafa/tc-1423-n1-owner-…
Oct 24, 2026
d16cf6d
Classify stored registrations over foreign networks as unknown; creat…
Oct 24, 2026
86dee6a
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
2068e65
Drop finding labels from test comments
Oct 24, 2026
23b5f31
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
b3ffc9b
Restore unit coverage for classification limits and back-off, the min…
Oct 24, 2026
93ae216
Changelog wording and details
Oct 24, 2026
2065fbd
Merge skgbafa/tc-1423-n3-owner-authority-liveness into skgbafa/tc-153…
Oct 24, 2026
86fc01b
Remove finding labels from source-network comments
Oct 24, 2026
63fb500
Merge tc-1423/n1b-source-network-owner into skgbafa/tc-1423-n1-owner-…
Oct 24, 2026
4df9331
Neutral wording in comments, docs and test names text
Oct 24, 2026
40dbcbb
Merge skgbafa/tc-1423-n1-owner-authority-record into skgbafa/tc-1423-…
Oct 24, 2026
0684d2f
Neutral wording in comments and docs
Oct 24, 2026
732bf19
Merge skgbafa/tc-1423-n2-root-lifetime-cap into skgbafa/tc-1423-n3-ow…
Oct 24, 2026
3adcabd
Neutral wording in comments
Oct 24, 2026
44a866f
Merge skgbafa/tc-1423-n3-owner-authority-liveness into skgbafa/tc-153…
Oct 24, 2026
ca24f6d
Neutral wording in a comment
Oct 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
- SQL local durability and reservation before commit (`docs/sql-local-durability.md`). Postgres stays the master copy. File-backed SQL databases run `PRAGMA synchronous = FULL` (`[global.storage.sql] synchronous = "full"|"normal"`, env `TINYCLOUD_STORAGE__SQL__SYNCHRONOUS`; `normal` selects the earlier fsync behaviour), and the directories and renames that make a database file or a hydrated cache visible are fsynced. A write is checked before COMMIT and rolled back whole if it would pass the owner's remaining storage budget (`402`), and, when configured, the per-database cap (`max_database_bytes`, `507 sql_database_size_limit`) or the disk headroom (`min_free_bytes`, bounded by the WAL and checkpoint growth the transaction can cause and shared by all databases on the node, `507 sql_disk_headroom`). `max_database_bytes` and `min_free_bytes` default to `0` (off) and are set by config. A COMMIT that fails on disk answers `500 sql_commit_failed` and the node re-hydrates the database from Postgres. A write that fails because the disk is full answers `507 sql_disk_headroom`, whatever `min_free_bytes` is, not the owner's quota or the size limit. Every write request runs in one transaction (a single statement, a batch, a nested write (`WITH … INSERT`) and a request that carries a `PRAGMA` included), so such a request counts two more native SQL calls in request telemetry, and all of them get the same owner budget, size cap and disk gate. A request that wrote nothing is not gated and reserves nothing. The growth of the main file that the next checkpoint will cause stays held in the disk reservation from the commit until a checkpoint runs or the database's connection closes. No migration. Details: TC-1491.
- `MemorySink` caps its size hint at 64 MiB and treats a failed reservation as no hint. Details: TC-1491.
- A local SQL commit failure (answered 500) records the same diagnostic failure note as other SQL 500 responses. Details: TC-1491.
- Policy/v3 registration checks the owner and existence of the policy's encryption networks. Every network the policy names (`contentSource.encryptionNetwork` and each `encryption` ceiling entry) must be owned by the owner of the content source's space, compared as principals (a `did:pkh` matches regardless of EIP-55 letter case; the chain id must match), and must exist on this node in state `active`. Every `kv` ceiling entry must name a space of that same owner. Otherwise registration returns `403 content-source-network-invalid` and writes nothing. A new registration whose `kvResource` or any `kv` ceiling entry uses the legacy `tinycloud://` form gets the same refusal; no client emits it. Share and CLI registrations carry one `kv` entry, equal to the source, and name the space owner's `:default` network, which the SDK creates or finds at sign-in, so they are unaffected. Stored registrations are not refused; they are classified with the same ownership rule (see the next entry). Refusals are counted as `tinycloud_policy_source_network_refused_total{reason}`, with reasons `unparsable`, `legacy_resource`, `foreign_owner`, `foreign_space`, `missing` and `inactive`. Details: TC-1423.
- Policy/v3 registration records which of the owner's delegations granted what the policy roots carry, with their ancestor closure, in two new tables (migration `m20261019_000000_policy_v3_owner_authority`; its `down` drops both). Delegations from the owner of the capability's space or encryption network are tried before the general window of recent delegations to the owner that touch that space or network; a delegation whose ancestry includes one issued by the policy owner is never recorded; a grant that outlives the root is preferred. Policies registered before the migration are classified in the background on first use (steady-state reads add no query), or by an opt-in sweep (`policy_v3.owner_binding_backfill.enabled`, off by default). A stored policy that names an encryption network or a `kv` space that does not belong to the owner of its content source is classified `unknown` with reason `foreign_network`. The legacy cutover defaults to the migration's applied-at time, is logged at boot, and `policy_v3.legacy_cutover` overrides it after a rollback and re-upgrade. New `POST /policy/v3/authorized` lists the policies whose recorded authority includes a delegation, authorized like `/delegation/status`. See `docs/policy-owner-authority.md`. Details: TC-1423.
- Policy/v3 registration refuses a root that expires later than registration + 31 days (+5 minutes) (`403 policy-root-lifetime-exceeded`), in both modes; released SDK roots pass. New `policy_v3.owner_authority_expiry`: `record` (default) accepts a root that outlives the owner authority and counts it, `enforce` refuses it (`403 policy-root-outlives-owner-authority`). Registrations made before the legacy cutover are not capped; roots over 31 days among them are counted. `GET /info` lists `policy-owner-authority-v1` and one of `policy-owner-authority-record` / `policy-owner-authority-enforce`. New counters `tinycloud_policy_owner_authority_expiry_exceeded_total{authority_ttl_bucket}`, `tinycloud_policy_root_lifetime_refused_total`, `tinycloud_policy_legacy_root_lifetime_exceeded_total`, `tinycloud_policy_owner_binding_backfill_total{outcome}`; counting queries in `docs/policy-owner-authority.md`. Details: TC-1423.
- Policy/v3 uses check the recorded owner authority: once a recorded delegation or any ancestor is revoked (also under an alias CID), admitted sessions stop reading and decrypting, and re-share admission, signed-KV and hook-ticket mints, challenge, mint and S0 admission are refused (`403 policy-owner-authority-revoked`), and so is delivery (`403 delivery-authorization-invalid`); a non-legacy `bound` authority past its expiry gives `policy-owner-authority-expired`; a policy without authority gives `policy-owner-authority-unknown`, unless it is legacy and `policy_v3.legacy_unknown_allow` (default off, logged) serves it with root-only checks. The mint's registration-time rescan runs only for such escaped policies. An expired root returns `root-expired`; other roots that are not live return `root-not-live`. Hook tickets carry a policy session's authority closure (at most 16 IDs, else `403 hook-ticket-authority-too-large`), and open hook streams re-check their authority before delivering (at most every `hooks.authority_recheck_seconds`, 5) and while idle (`hooks.idle_authority_recheck_seconds`, 30), closing on a revocation or three consecutive failed checks spaced an interval apart (events are withheld meanwhile); concurrent first uses of an unclassified policy share one classification; `delegation_chains_unrevoked` takes two queries at any depth. New counters `tinycloud_policy_owner_authority_denied_total{reason}` and `tinycloud_policy_owner_authority_unknown_allowed_total{reason}`. Details: TC-1423.
- Policy registration refuses a requirement whose issuer, pinned `issuerKid`, credential type or profile is not admitted by the configured issuer set, with `403 credential-issuer-untrusted`. The check runs after the owner's authority is proven and before any stored policy is read; it is inert when no issuer set is configured. At load, a configured issuer entry whose `issuerDid` does not match the held row named in its `profiles` makes the whole issuer set invalid, and the node refuses to load it. Details: TC-1530.

## [1.22.0] - 2026-10-23

Expand Down
Loading
Loading