Repository navigation
feat: renew a membership from the Communities view (vtc/members/renew/0.1) - #398
Merged
Merged
Conversation
…/0.1) After the DTG Credentials v1 migration a member's pre-v1 VMC and role credential are set aside on load, and the notice told them to ask the community to re-issue them. There was no way to do that from the TUI. openvtc-core: new `renewal` module. - request_renewal sends vtc/members/renew/0.1 (no parameters, signed by the persona's authentication key) in the DIDComm binding envelope, the same delivery path as members/vmc, and records the request so only a reply threading on it is taken. - verify_renewal_response holds the reply to the community's signed operational document (authentication key, addressed to the persona, fresh) and checks both credentials: conformant v1 (parse_conformant), issued by the community to that persona, the VMC a MembershipCredential with issuerScope public, the VAC a community role credential in the community's own scope (community_roles); then verifies each as an issued credential (assertionMethod proof, validity, revocation status). Local checks run before anything is resolved. - apply_renewal stores both on the Active membership, replacing the old ones and clearing their retired notices; store_acknowledgement records the fresh member VMC. RenewalRefusal recognises vtc/members/renew:notMember; RenewalOutcome::describe is the member's status line. openvtc: - `R` on an Active community (Action::RenewMembership -> community job Verb::Renew). Status: "Asking..." -> "Renewal requested - waiting..." -> the outcome when the reply lands. - The reply is verified off the loop (VerifyJob::Renewal), stored, and answered with a fresh members/vmc acknowledgement, as the join flow does on admission (the new grant has a new digest). A trust-task-error threading on a renewal is reported as a renewal refusal rather than falling into the join-error handler. - The pre-v1 notice now says to press R. Tests: core verification/storage over a did:key community (success with retired notices cleared, wrong member, non-conformant credentials, a credential the community did not sign, no Active membership), notMember; dispatcher end-to-end for success, an unsolicited reply, and notMember; key gating, hints and the community-job status line. Inbound gate census includes the renew response type. 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.
Adds renew membership to the client using
vtc/members/renew/0.1. After the DTG Credentials v1 migration (#397), OpenVTC sets aside stored pre-v1 credentials and tells the member to have the community re-issue them, but the member had no way to ask from the TUI. This adds that.UX
Ron an Active membership. TheR: renewhint shows only on Active rows.m.How it works
openvtc_core::renewal::request_renewal(newopenvtc-core/src/renewal.rs) is fire-and-forget over DIDComm, like the other member verbs. It uses the same delivery and signing path asmembers::submit_member_vmc. The request is recorded in memory so only a reply threaded on it is taken.verify_renewal_response, run off the loop asVerifyJob::Renewal):didmust be the recipient.dtg::parse_conformant.issuerScope: public, issued by the community, with our member DID as subject.dtg::community_roles: scope is the community, public, no parent, subject is our member DID.verify_issued_credential(proof, validity window, revocation status, failing closed).apply_renewal): on an Active membership only, it replaces the Membership and Role credentials and clears their retired notices. Personhood follows from the new VMC.issue_member_vmc_for, as join does. The new grant's digest changes, so the old acknowledgement no longer binds.trust-task-errorthreaded on a pending renewal is verified as the community's signed reply.vtc/members/renew:notMemberis recognised.Tests
notMemberprocess_inbound_messagenotMemberreported with no state changeRgating, the hint, and the status line. The inbound gate census includes the renew response type.All pass locally:
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-depscargo test --workspaceKnown limits
Ragain is harmless, because the VTC re-mints into the same status-list slot.