feat(health): print the DID this install authenticates to the VTA as - #283
Merged
Conversation
The VTA keys its ACL entry on a `did:key` minted during setup, so that DID is what an operator has to name in `pnm acl get` / `pnm acl update`. It was reachable from nowhere but the TUI's VTA panel, truncated to fit the pane — while the identity pane's own refusal hint told the reader that `openvtc health` prints it. It did not. A new *VTA access* section now does: the agent, the context, the transport that would be opened (the same mediator-vs-REST rule `build_runtime_vta_client` branches on, rather than a guess from the URL being non-empty), its mediator or REST endpoint, and the authenticating DID in full. Both `pnm acl` commands are printed ready to run, with a line on why `--capabilities persona-holder` grants rather than narrows — it reads as a narrowing everywhere else the flag appears. All of it comes from the loaded config, so it answers on the run where the network leg is the broken thing. `--json` carries it as `vta_access`, and as null for a BIP32 profile so a script need not branch on the backend. The identity pane's hint is fixed alongside it: it named a `--did` flag `pnm acl update` does not have (the DID is positional) and left the DID as a placeholder. It now carries the real one, from the config the pane is already rendering from — the placeholder survives only for a BIP32 account, which has no agent credential to name and will not have produced the refusal in the first place. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
🛡️ AI Agentic Security Code Review🔎 A manual security review is recommended before merging. Please contact the Security team for specifics and remediation guidance.
|
stormer78
added a commit
that referenced
this pull request
Sep 8, 2026
…284) The wipe-profile screen ends by saying the VTA-side context, persona DID and keys survive, and to run `pnm contexts delete` if you want those gone too. It named no context — on the one screen that is about to remove the config file and the keyring entry that hold the id, which is why the advice says "first". Sending the operator away to look it up was sending them somewhere that stops existing a keypress later. The id is now carried on `SettingsState` from `account.top_context_id`, set in the same `sync_from_config` pass as the rest of the pane, and the command is printed complete on its own row — the treatment every other command this TUI hands over already gets, because it is meant to be retyped in another terminal. Positional, as `pnm-cli`'s `ContextCommands` defines it; the `--did` flag that had to come off the identity pane's `pnm acl update` hint in #283 is the same mistake one repo boundary away, so the shape is asserted rather than assumed. A nested context keeps its whole `<parent>/<id>` path, since `pnm` addresses a sub-context that way and the leaf alone names a different context or none. An unloaded account keeps a placeholder: no id is better than a wrong one in a command that deletes a context and everything under it. 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.
The VTA keys its ACL entry on a
did:keyminted during setup, so that DID iswhat an operator has to name in
pnm acl get/pnm acl update. It wasreachable from nowhere but the TUI's VTA panel, truncated to fit the pane —
while the identity pane's own refusal hint told the reader that
openvtc healthprints it. It did not.
openvtc health— a VTA access sectionPrinted after Local configuration, before the network map. Live against
glenn-vta:Three choices worth naming:
truncated
did:keynames nobody, and this line exists to be copied intoanother terminal.
mediator_did.is_some()rule
build_runtime_vta_clientbranches on, so it names the leg actually inuse rather than inferring REST from a non-empty URL (which stays populated on
the DIDComm path as the fallback). Sending an operator to debug the leg that
is not being used is the failure this avoids (R6.4).
exactly the run where the network leg is the broken thing.
--jsoncarries it as top-levelvta_access, and asnullfor a BIP32 profileso a script need not branch on the backend first.
The identity pane's grant hint, fixed alongside
It named a
--didflag thatpnm acl updatedoes not have — the DID ispositional (
pnm-cli/src/cli.rs,AclCommands::Update) — so pasting it wouldhave failed. And it left the DID as
<this install's DID>, pointing atopenvtc health, which did not print it either.It now carries the real DID, from the config the pane is already rendering from
(
IdentityState::agent_credential_did, set in the samesync_from_configarmthat fills
VtaState::credential_did). The placeholder survives only for aBIP32 account, which has no agent credential to name and will not have produced
that refusal in the first place.
Testing
Six new unit tests: the JSON shape (the ACL subject arrives whole, absent
profiles serialise as null), the transport rule across all four
mediator/URL combinations, and the completed command (real DID present,
placeholder gone, no
--didflag).cargo fmt --all --check,cargo clippy --all-targets --all-features -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurescargo test --all-features --workspace— green--jsonformsverified.
Pre-merge checklist