Repository navigation
feat: optional trust registry - #94
Merged
Merged
Conversation
Define in-place enablement so existing full stacks can add a registry without rebuilding. Cover configuration, identity, Vault, recovery, and acceptance requirements. Signed-off-by: vthwang <vthwang.work@gmail.com>
Enable dedicated registries on new and existing stacks while preserving community data. - Persist enablement state and deliver scoped credentials through Vault - Merge VTC configuration and publish signed Registry referrals - Integrate upgrades, resources, teardown, and failed Job cleanup Native hosted DID provisioning remains blocked by the upstream VTA CLI signer issue. Signed-off-by: vthwang <vthwang.work@gmail.com>
Avoid the migration 44 collision introduced by main. - Merge current main fixes and dependency updates. - Renumber Trust Registry migrations to 45. - Verify resource defaults with the full schema and Trust Registry settings. Signed-off-by: vthwang <vthwang.work@gmail.com>
Prepare Registry identities before VTC creation and preserve resumable setup receipts. - replace Vault-delivered bootstrap credentials with the Registry headless setup flow - surface sanitized Job logs and retain recovery receipts - pass the Registry DID through new Full Stack VTC setup Signed-off-by: vthwang <vthwang.work@gmail.com>
The existing-stack enablement appended the TrustRegistry referral to the VTC's DID document with the offline `vta did-mgmt dids edit`, run in a Job on the VTA's PVC. That command holds no mediator session, so the only transport it can initiate toward a DID host is REST, and a Full Stack `dids` daemon, provisioned through the VTA with a mediator, advertises TSP and DIDComm alone. The Job failed with "no transport in common ... it advertises [tsp, didcomm] and this agent can initiate [rest]" after the VTA had already committed the entry locally. The referral is now published through the running VTA, which holds the mediator session and publishes over either transport, and which re-publishes an unconfirmed local head before applying the next update, so a stack left behind by the offline attempt converges too. internal/vta is the farm's first client for a VTA: a did:key minted for one call, the two login tasks (auth/challenge/0.1, auth/authenticate/0.2) over /trust-tasks for a bearer token, then vta/webvh/dids/get/1.0 for the VTA's head of the log and vta/webvh/dids/update/1.0 with the document and expectedVersionId. Refusals come back typed (TaskError, with the reason the VTA gives, "conflict" among them). vta/webvh/servers/domains/0.1, a read-only task the VTA answers only by reaching the host, is the probe that waits out the gap after a restart in which the VTA serves HTTPS but has no mediator session yet; an update in that gap would commit and then fail to publish. publishRegistryReferral (internal/setup/trust_registry_referral.go) replaces the referral Job: it skips everything when the published document already carries the referral; otherwise it grants the key as an admin of the VTC's context for an hour (`vta acl create`) in the same stopped-VTA window pattern as the registry context grant, logs in, waits for the host to be reachable, reads the head, and sends the update. When the VTA's head carries the referral but the host does not, it sends the document unchanged, which makes the VTA reconcile the host and append a version. The verify phase still reads the host. The envelope, proof and reply checks the DID hosting client carried move to internal/trusttaskclient so the two clients share one implementation of eddsa-jcs-2022; didhosting keeps its names as aliases and its tests are unchanged. docs/optional-trust-registry-design.md: step 6 and the paragraph on the offline edit now describe this path, and name the host-side change that would let offline publishes work (a TrustTaskHTTPS entry on the daemon's own DID), which is separate from registry enablement. Verified with gofmt, go vet ./... and go test on internal/vta, internal/trusttaskclient, internal/didhosting and internal/setup, all in a golang:1.26 container. EnableTrustRegistry itself still has no end-to-end test; the new step is behind the newVtaClient seam for one. Signed-off-by: Geoff Turk <geoff@ic3.dev>
Reduce the exposure window for the ephemeral VTA administrator grant while preserving enough time for the bounded registry workflow. - Change the referral ACL expiry from one hour to fifteen minutes - Keep the design documentation aligned with the implementation Signed-off-by: vthwang <vthwang.work@gmail.com>
Cancel Registry workers before acquiring the teardown lease and clear abandoned Registry maintenance leases under the advisory lock. Apply the protocol to owner, admin, pool, and load-test cleanup paths. Signed-off-by: vthwang <vthwang.work@gmail.com>
Prevent an opted-in new stack from being reported as running after Registry setup fails. Persist the Registry failure as the session error, pin it to the Registry phase, and document and test the behavior. Signed-off-by: vthwang <vthwang.work@gmail.com>
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.
Replaces #93 with the same final tree and corrected signed commit history.
Summary
Verification
make test