Skip to content

feat: optional trust registry - #94

Merged
vthwang merged 8 commits into
mainfrom
fix/pr-93-dco
Oct 24, 2026
Merged

vthwang merged 8 commits into
mainfrom
fix/pr-93-dco

Conversation

@vthwang

@vthwang vthwang commented Oct 24, 2026

Copy link
Copy Markdown
Member

Replaces #93 with the same final tree and corrected signed commit history.

Summary

  • Add optional Trust Registry provisioning for new and existing Full Stack deployments
  • Publish Registry referrals through the running VTA
  • Make Registry setup failure and teardown behavior resumable and explicit
  • Preserve the original Verified commits from feat: publish the registry referral through the running VTA #92 instead of its GitHub-generated squash commit

Verification

vthwang and others added 8 commits October 20, 2026 18:15
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>
@vthwang
vthwang merged commit 142ba1b into main Oct 24, 2026
1 check passed
@vthwang
vthwang deleted the fix/pr-93-dco branch October 24, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants