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 — Return a governed value

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

Return a governed value

For the assertion provider

View as Markdown

In about ten minutes you will ask the project from Your first assertion which region a synthetic person lives in, and read north from a verified response. Then you will see why no other answer could have come back: the project lists every value the answer may take.

Outcome
A verified residence-region assertion carrying one declared value.
Time
About 10 minutes
Level
Local development with synthetic data
Prerequisites
The project, source, and run left going by Your first assertion

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

Request the region

Section titled “Request the region”

Work in first-evidence-assertion/adult-status, where the source and the run from Your first assertion are still going, in the terminal that holds its run_id, evidence_url, runtime_config and headers_for. Prepare a request for the residence-region assertion definition:

In a new terminal, read the run back from run.json and redefine the helper that fetches a token header file:

Terminal window
run_id="$(jq -r .run_id run.json)"
evidence_url="$(jq -r .products.evidence run.json)"
runtime_config="$(jq -r .runtimeConfigs.evidence run.json)"
headers_for() {
rstack dev token "$run_id" --as "$1" | awk '$1 == "evidence" && $2 == "headers" {print $3}'
}
Terminal window
rstack evidence request prepare residence-region \
--evidence-url "$evidence_url" \
--header @"$(headers_for caller)" \
--runtime-config "$runtime_config" \
--purpose residence-check \
--subject subject:record-id=adult \
--name residence-region
Prepared request: .evidence/requests/residence-region/request.json
Prepared verification context: .evidence/requests/residence-region/verification.json
Prepared authorization: .evidence/requests/residence-region/authorization.curl

Send the request, then verify the response before reading it:

Terminal window
rstack evidence api /v1/evidence \
--url "$evidence_url" \
--header @"$(headers_for caller)" \
--input .evidence/requests/residence-region/request.json \
--accept application/jose+json \
--output residence-region.jws.json
rstack evidence verify residence-region.jws.json \
--context .evidence/requests/residence-region/verification.json \
--output residence-region.verified.json
VERIFIED
Terminal window
jq '.supportedValues' residence-region.verified.json
[
{
"providesValueFor": "urn:example:concept:residence-region:v1",
"value": "north"
}
]

The source holds a birth date and a private address beside the region; the assertion carries only north.

See which values the answer may take

Section titled “See which values the answer may take”

In evidence.yaml, the residence-region definition’s region output is a controlled-category: values lists every value it may carry.

evidence.yaml
outputs:
region:
concept: urn:example:concept:residence-region:v1
type: controlled-category
values:
- north
- south

A Function that computed any other value would not get it past Registry Evidence. One fixture case proves that by returning a value outside the list; run the region fixtures with their trace:

Terminal window
rstack evidence test . --target local-target.yaml --fixture fixtures/residence-region.yaml --explain
"id": "negative-outside-controlled-values",
"observedResult": {
"class": "service-unavailable"
},
"reasonCode": "output-refused",

Registry Evidence refused the output, so the caller would have received a refusal, not the value.

See who may ask

Section titled “See who may ask”

The same definition sets a grantCeiling, the grant ceiling: the widest authority any grant may give for it:

evidence.yaml
purpose: residence-check
grantCeiling:
authorities:
- organizational
actorKinds:
- service
valueOrigins:
- request
audiences:
- urn:example:audience:standalone-app

dev-authority.yaml grants one exact request shape within it, to the standalone-service access profile, for a deployment. The run reads this file through local-target.yaml, and caller’s token carries the profile’s tag, standalone-service:

dev-authority.yaml
- definition: residence-region
purpose: residence-check
audienceFrom: authenticated-requester
representations:
- signed-jws
subjectBinding: audience-scoped
subjects:
- role: subject
selectorProfile: record-by-id
valueOrigin: request

Leave the source and the run going; the next tutorial continues with them.

Next

Section titled “Next”

Control who can request evidence

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.