fix(did): stop advertising a TSP service the holder cannot publish - #138
Merged
Conversation
#135 added a `TSPTransport` entry to the holder's `did:peer:2`, to give an executor a capability signal to negotiate a push against. It does nothing, for two independent reasons: 1. **Nothing calls the function it was added to.** Onboarding adopts a VTA-minted holder via `installVtaMintedHolder` (provision-integration, M2C); `ensureHolder`'s self-minting path is the earlier design and is currently unreached. 2. **The adopted holder is a `did:key`**, and that method has no service endpoints at all — its document is derived from the key material alone. So no capability can be published in a holder's DID document while the holder is a did:key, whichever code mints it. The second reason is the one that matters: it rules out the whole approach, not just this call site. Publishing capabilities in the DID document was chosen over announcing them at enrolment on the strength of symmetry — both sides resolving and matching published services — and that symmetry is not available to a did:key holder. Reverted here, with both reasons written down at the site so the next attempt does not rediscover them. `createDidPeer2`'s multi-service support stays: it is the correct shape for a peer DID, it is exercised by tests, and it is what the earlier path would need if a peer-DID holder ever returns. Its doc now says plainly that nothing publishes a second service today, so a reader cannot infer from its existence that holder capabilities are discoverable. The signal a negotiated push needs has to live somewhere a did:key can carry it — announced at enrolment and held against the ACL/device record. Signed-off-by: Glenn Gore <glenn.g@affinidi.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.
#135 doesn't work, for two independent reasons
It added a
TSPTransportentry to the holder'sdid:peer:2, so an executor would have a capability signal to negotiate a push against.installVtaMintedHolder(provision-integration, M2C).ensureHolder's self-minting path is the earlier design and is currently unreached —grepfinds no callers.did:key, and that method has no service endpoints at all. Its document is derived from the key material alone.The second reason is the one that matters, because it rules out the approach, not just this call site. Publishing capabilities in the DID document was chosen over announcing them at enrolment on the strength of symmetry — both sides resolving and matching published services — and that symmetry simply isn't available to a
did:keyholder. No amount of moving the code fixes it.Reverted, with both reasons recorded at the site so the next attempt doesn't rediscover them.
What stays
createDidPeer2's multi-service support. It is the correct shape for a peer DID, it is exercised by tests, and it is what the self-minting path would need if a peer-DID holder ever returns.Its doc now says plainly that nothing publishes a second service today, so a reader cannot infer from its existence that holder capabilities are discoverable. That inference is exactly what I made.
Consequence for the negotiated push
The signal has to live somewhere a
did:keycan carry it — announced at enrolment and held against the ACL/device record, which the VTA reads at push time. That is a contract field to agree with the Rust side rather than a DID-document read, so it wants deciding before the VTA-side push is built rather than during.467 core tests pass; lint and build clean.
How this got merged
Worth recording, since the review didn't catch it either. I verified that
createDidPeer2mints adid:peer:2and that both resolvers decode a second service correctly — all true, and all irrelevant, because I never checked that anything calls it. The evidence was in the first screenshot of the thread: the wallet address readdid:key:z6Mku54v….