GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • RSRegistry StackDocsDevelopment (unreleased)
  • GitHub ↗
  • Four ways to adopt
  • How the products fit together
  • Overview
  • Your first assertion
  • How Evidence works
  • Return a governed value
  • Control who can request evidence
  • Assert a role-bound relationship
  • Request evidence as an SD-JWT VC
  • Request an assertion
  • Request an access token
  • Verify an assertion

This view

  • Original page
  • New address

GeezerVison is showing docs.registrystack.org — Your first assertion

Unreleased documentation. These pages follow the main branch and can change before the next release. For supported guidance, use v0.48.0.

Your first assertion

For the assertion provider

View as Markdown

If other services need a yes-or-no answer from records your institution holds, start by seeing what Registry Evidence gives them. You run it over a synthetic source, ask whether one test person is an adult, and read "value": true from a verified response with no birth date.

Outcome
A verified adult-status assertion, with the source and a Registry Evidence run left running.
Time
About 15 minutes, plus the first image download
Level
Local development with synthetic data
Prerequisites
Python 3, tar, jq, and curlThe tools required by the release verification procedureFree loopback port 8081

For the local commands in this tutorial, declare development in your shell. rstack dev sets this value for the processes it starts.

Terminal window
export REGISTRY_STACK_POSTURE=development

Install Registry Stack

Section titled “Install Registry Stack”

Download one exact rstack-vX.Y.Z-install.sh and the verification material from the same Registry Stack release. Follow the release verification procedure before running the installer. From the verified release directory, install the evidence component:

Terminal window
tag="vX.Y.Z"
bash "rstack-${tag}-install.sh" evidence
rstack evidence --version

The managed installation exposes rstack on your PATH. The evidence component supplies the Registry Evidence runtime and its command-line tools from the same release.

Get the example project

Section titled “Get the example project”

Download the Evidence example projects into a fresh working directory as evidence-examples.tar.gz, then unpack the standalone project into a directory of its own, because the next commands write keys and responses into it:

Terminal window
mkdir first-evidence-assertion
tar -xzf evidence-examples.tar.gz -C first-evidence-assertion standalone
mv first-evidence-assertion/standalone first-evidence-assertion/adult-status
cd first-evidence-assertion/adult-status

The project holds no keys. rstack dev makes disposable signing keys and secrets for each run, in a directory of its own outside your project.

Check and explain the project

Section titled “Check and explain the project”
Terminal window
rstack evidence check . --target local-target.yaml
Evidence project check: complete
Project: .
Target: local-target.yaml
Deployment inputs missing: signer.publicJwkFile; the compiled-target bundle check was skipped. Supply them and rerun check to prove the target.
warning[evidence.posture.local-assurance] local-target.yaml /assuranceProfile
local assurance permits locally held signing keys; production refuses it
next: Build a production or evidence-grade package with a Transit signer.
0 errors, 1 warning in 1 file

check compiled evidence.yaml against local-target.yaml, which holds the source address and the places a deployment keeps its keys. It skips the bundle check because you have made no keys, and a run makes its own. Ask what the project answers:

Terminal window
rstack evidence explain . --target local-target.yaml
Definition adult-status: urn:example:requirement:adult-status:v1
Acquisition: Source person-record
Source person-record: pack synthetic-register@1; route person; connection synthetic-register
Posture: record-transformed
Projection: projections/person-facts.rhai::project_facts; schema schemas/person-facts.json; digest sha256:e203f7570ea7e625e36fa155bf0b4060865b26043b8ba1dce6bcc606fca01696
Inputs: recordId <- selector [email protected]
Facts: birth-date (string), residence-region (string)
Derive: Function derive-adult-status
Outputs: adult

adult-status is an assertion definition: one fixed question, named by its Requirement URI. It reads the source person-record and may return one output, the Boolean adult. The report goes on to three other definitions. The source section names the reviewed Adapter pack and route that fetch the record, the governed projection and schema that reduce it to private facts, and the request selector field bound to its input. The report prints fact names and types, without the underlying source values.

Run the fixture cases offline:

Terminal window
rstack evidence test . --target local-target.yaml
PASS: fixtures/adult-status.yaml (10 cases)

Start the synthetic source

Section titled “Start the synthetic source”

In a second terminal, in the same directory, start the source that stands in for your system:

Terminal window
python3 serve-source.py --port 8081

It serves its synthetic records to any caller on this machine. Leave it running.

Start Registry Evidence

Section titled “Start Registry Evidence”

dev.yaml is the development plan. It lists Evidence as the one product and names one synthetic person, caller, who may request evidence:

Terminal window
cat dev.yaml
# yaml-language-server: $schema=https://id.registrystack.org/schemas/rstack/dev/dev.v1alpha1.schema.json
apiVersion: id.registrystack.org/formats/rstack/dev/v1alpha1
kind: RStackDev
issuer: run
products:
- {product: evidence, project: ., audience: "urn:example:resource:standalone-evidence"}
people:
caller:
subject: "urn:registrystack:evidence:local:client:example-caller"
client: example-caller
grants:
evidence:
profile: standalone-service
scopes: ["evidence:request"]
claims: {evidence_audience: "urn:example:audience:standalone-app"}
scenarioFile: tests/scenarios.yaml

The run is its own token issuer, so it needs no Docker and no database. scenarioFile names one scenario that asks for adult status as caller before the run reports ready. Check the plan, then start the run. Run a project with rstack dev explains the options and how to recover a failed run:

Terminal window
rstack dev check .
rstack --format json dev start . --ttl 2h > run.json
run_id="$(jq -r .run_id run.json)"
evidence_url="$(jq -r .products.evidence run.json)"
runtime_config="$(jq -r .runtimeConfigs.evidence run.json)"
jq -r '.scenarios[] | "\(.id): \(.result)"' run.json
Development plan is valid
0 errors, 0 warnings in 1 file
ask-adult-status: passed

The run packaged a copy of your project, activated its authority, and started Registry Evidence on a free port, named by evidence_url. runtime_config is the runtime configuration of that service. Each call below needs a short-lived token for caller. This function asks for one and prints the header file to pass to the commands:

Terminal window
headers_for() {
rstack dev token "$run_id" --as "$1" | awk '$1 == "evidence" && $2 == "headers" {print $3}'
}

Prepare, send, and verify one request

Section titled “Prepare, send, and verify one request”

request prepare sends nothing to Registry Evidence. It fixes what a valid answer must match before any response exists, using the service’s runtime configuration to pin the signing key.

Terminal window
rstack evidence request prepare adult-status \
--evidence-url "$evidence_url" \
--header @"$(headers_for caller)" \
--runtime-config "$runtime_config" \
--purpose age-check \
--subject subject:record-id=adult \
--name adult-status
Prepared request: .evidence/requests/adult-status/request.json
Prepared verification context: .evidence/requests/adult-status/verification.json
Prepared authorization: .evidence/requests/adult-status/authorization.curl

Send the prepared JSON as caller. The API command uses POST because --input is present, and writes the signed response to the named file. It takes a fresh header file for each call:

Terminal window
rstack evidence api /v1/evidence \
--url "$evidence_url" \
--header @"$(headers_for caller)" \
--input .evidence/requests/adult-status/request.json \
--accept application/jose+json \
--output adult-status.jws.json

Verify the response offline against what request prepare fixed:

Terminal window
rstack evidence verify adult-status.jws.json \
--context .evidence/requests/adult-status/verification.json \
--output adult-status.verified.json
VERIFIED

On failure verify writes nothing and exits non-zero. Read the answer:

Terminal window
jq '{supportsRequirement, supportedValues}' adult-status.verified.json
{
"supportsRequirement": "urn:example:requirement:adult-status:v1",
"supportedValues": [
{
"providesValueFor": "urn:example:concept:adult-status:v1",
"value": true
}
]
}

This assertion answers the Requirement URI with one value for the adult output’s concept. The source holds a birth date for record adult; the assertion carries only true.

Leave it running

Section titled “Leave it running”

The next tutorial continues with this project, with the source and the run still going, so leave both as they are. The run stops by itself after two hours. When you are finished with it, run rstack dev stop "$run_id" and press Ctrl+C in the source’s terminal.

Next

Section titled “Next”

Return a governed value

Last reviewed 2026-11-27Edit this pageReport an issue
Was this helpful?

Cookies on Registry Stack

We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.

Your browser asks sites not to track you, so optional tracking stays off.

We could not use or save that choice. Optional tracking remains off.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.