Proposal: This page presents the draft API and profile model. Send feedback on GitHub.
Root admission and child minting
Root policy and terms
The readable policy below corresponds to rootPolicy in the vector file. policyRef = H("policy", rootPolicy) is placed in the root terms.
{
"v": "http6-guide-01",
"kind": "policy",
"id": "policy-root",
"tenant": "lab",
"purpose": "month-close",
"rules": [{
"action": "report-read",
"resource": "monthly-total",
"audience": "reports-db",
"releaseTo": "reader-1",
"args": {"period": "2026-10", "project": "p7"}
}],
"unit": "credits",
"pool": "pool-p7",
"limit": 10,
"per": 6,
"maxDepth": 1,
"survive": false
}
Before signing, the human presenter must render the actual policy and terms, including destination, action, recipient, input scope, limits, expiry and delegation right. This is a requirement on a real admission implementation, not something the fixture performs.
async function admitRoot(proposal, trustedDisplay, admissionIssuer) {
assertValidPolicy(proposal.policy);
const terms = freeze(proposal.terms.withPolicyRef(H("policy", proposal.policy)));
const approvalChallenge = await verifier.issueChallenge({
purpose: "root-approval", contextRef: H("terms", terms),
actorKeyId: proposal.humanKeyId, recipient: "admission"
});
const approval = await trustedDisplay.showAndApprove({terms, policy: proposal.policy,
challenge: approvalChallenge});
const joinChallenge = await verifier.issueChallenge({
purpose: "join", contextRef: H("terms", terms),
actorKeyId: terms.keyId, recipient: "admission"
});
const join = await candidate.proveKeyPossession(joinChallenge, terms);
const appraisal = await appraiser.assess(candidate, terms.service);
return admissionIssuer.transaction(async state => {
verifyApprovalAndJoin(approval, join, approvalChallenge, joinChallenge, terms);
verifyAppraisal(appraisal, terms, configuredTrust);
state.consumeChallengesExactlyOnce([approvalChallenge, joinChallenge]);
const root = signAsIssuer(grantForRoot(terms, approval, join, appraisal));
state.registerGrantAndEvidence(root, proposal.policy, approval, join, appraisal);
return root;
});
}
Challenge creation, validation and consumption need a coordinated authoritative store. If the verifier and issuer are separate services, use a durable transactional protocol with explicit ownership and crash recovery, not two independent consume flags that can disagree.
Child birth
The child independently signs a join over H("terms", childTerms). The parent signs the parent request over the same child terms and the signed child join reference. The child policy's rules are a subset of the parent policy, with limit: 6, per: 6, maxDepth: 0 and survive: false in the vectors.
async function mintChild(parent, childTerms, childPolicy, birthId) {
const current = await registry.currentLineage(parent);
verifyLineage(current, {now: trustedClock.interval()});
require(attenuates(childPolicy, current.effectivePolicy));
require(childTerms.parentGrantRef === ref(parent));
require(childTerms.policyRef === H("policy", childPolicy));
require(childTerms.depth < parent.terms.depth);
const join = await child.signJoin(await joinChallenge(childTerms), childTerms);
const parentRequest = await parent.signBirth({childTermsRef: H("terms", childTerms),
joinRef: ref(join)});
return state.transaction(tx => {
tx.requireCurrentParent(parent);
tx.requireUnusedOrMatchingBirth(parent, birthId, H("terms", childTerms));
verifyJoinAndParentRequest(join, parentRequest, childTerms, parent);
const childGrant = signAsDelegationIssuer(grantForChild(childTerms, join,
parentRequest, currentChildAppraisal()));
tx.registerBirthAndEvidence(birthId, childGrant, childPolicy, join, parentRequest);
return childGrant;
});
}
A birth identifier and birth registry are proposed service state, not fields in the guide profile's grant schema. A real minting service must specify its authenticated admission API and atomic idempotency record. A duplicate birth with identical authorized terms can return its original outcome; changed terms conflict. A process restart requires an authorized new generation and appraisal rather than silently reusing a retired key.