Repository navigation
Conversation
added 2 commits
October 20, 2026 22:18
Replace the network_methods gate with a fixed allow-list: did:key, did:pkh and did:jwk. Refuse every other method, did:pkh outside the eip155 namespace, and did:key outside Ed25519, before any resolver lookup at each UCAN verification and DID resolution site. Remove the network_methods configuration logic. DidResolutionConfig stays as an empty section so existing configuration files still parse; the /info field is a constant false. Tests: a table test over the resolution sites with a counting resolver proves refusal with zero lookups; an app-startup test checks that the retired environment variable does not enable any method.
Changelog, README, tinycloud.toml and the delegation-flow gate now describe the fixed allow-list and the retired network_methods setting.
Contributor
Author
|
CHANGES REQUESTED: see TC-1500 (head 33a39cd) |
added 7 commits
October 21, 2026 01:42
# Conflicts: # CHANGELOG.md
Contributor
Author
|
APPROVE: see TC-1500 (reviewed exact head 87de5f1) |
Contributor
Author
|
Guard check from TC-1452 (
Keep both The other 11 tests in |
added 9 commits
October 23, 2026 22:42
…; neutral wording; changelog details
This was referenced Oct 24, 2026
Contributor
Author
|
APPROVE: see TC-1500 (reviewed exact head ce7f533) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
did:key,did:pkhanddid:jwk.did:keymust be an Ed25519 key with the exact Ed25519 identifier length.did:pkhmust use theeip155namespace, with an identifier of at most 70 characters.did:jwkmust be an Ed25519 OKP JWK.did:pkh:eip155before signature recovery.Compatibility
did:web,did:tz,did:ethr,did:ionand unknown methods are refused on the UCAN path regardless of configuration, includingnetwork_methods = true.did:jwkis admitted only as an Ed25519 OKP key. Otherdid:jwkkey types are refused, matching thedid:keyrule.did:keyidentifiers of any length other than the Ed25519 length, anddid:pkhidentifiers longer than 70 characters, are refused.did:key:z6Mk%,did:pkh:eip155:%ordid:jwk:%are affected. Query before deploying.[global.did_resolution] network_methodsandTINYCLOUD_DID_RESOLUTION__NETWORK_METHODShave no effect. Configuration files that set them parse, and a startup warning is logged when the key is present.GET /inforeportsdid_resolution.network_methodsas a constantfalse.did_method_disablederror code andmethod_disabledreason. Identity-string parsing intinycloud-authis outside this change.Tests
tinycloud-core/tests/did_resolution_policy.rs: a table test over the resolution sites with a counting resolver. Refused DIDs produce zero lookups at every site; allowed DIDs reach the lookup exactly once.tinycloud-node-server/tests/did_resolution_single_entry.rs: a source guard. It pins signature primitives to a reviewed list of call sites and fails on any new site outside that list. It does not cover generic.verify(calls.tinycloud-node-server/tests/did_resolution_app_startup.rs: a real app started with the ignored environment key set does not enable any method outside the allow-list.config.rs: the ignored key is detected for any value and is never written back (retired_did_resolution_network_methods_is_detected_for_any_value_and_never_written_back).runtime.rs: the ignored key set throughTINYCLOUD_DID_RESOLUTION__NETWORK_METHODSis detected in the configuration the node builds from its environment.Verification
At this head, on SQLite:
cargo fmt --all -- --check;cargo clippy --workspace --all-targetsandcargo clippy -p tinycloud-core --features duckdb --all-targets, both withRUSTFLAGS=-Dwarnings;node scripts/gen-capabilities.mjs --check; and every test binary oftinycloud-core,tinycloud-nodeandtinycloud-authpass, except the threestartup_identitycases (the host has a dstack socket, so the node binary refuses to create an identity) and the threeaccount_alias_tests, which time out when other jobs share the host and pass when thetinycloud-nodelib tests run alone.did_resolution_policy(9) anddid_resolution_single_entry(12) pass. PostgreSQL-backed tests run in CI.Details: TC-1500