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 — Publish and consume a Registry Discovery index

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

Publish and consume a Registry Discovery index

For the operator and consumer or verifier

View as Markdown

You will package an index from one provider’s public description, serve it, and then, as an application, ask it which Registry Evidence service can answer a question.

Outcome
One local Discovery index, one resolved requirement, and one provider to select.
Time
About 15 minutes after the release assets are available
Level
Local development with synthetic data
Prerequisites
GitPython 3curlLocal ports 38080 and 38090The tools required by the release verification procedure

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 discovery component:

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

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

Clone the same release for the example project and synthetic provider description:

Terminal window
git clone --branch "$tag" --depth 1 --quiet https://github.com/registrystack/registry-stack.git
cd registry-stack

Check the project

Section titled “Check the project”

Copy the example project out of the checkout:

Terminal window
cp -R products/discovery/tutorial/project discovery-project

As the operator, you approve each provider by the URL of its public description, in discovery-project/origins.yaml:

apiVersion: id.registrystack.org/formats/discovery/origins/v1alpha1
kind: DiscoveryOrigins
origins:
tutorial-evidence:
catalogUrl: http://127.0.0.1:38090/evidence.jsonld
profile: registry-discovery-v1alpha1

You also say which Evidence types meet a requirement an application may have. discovery-project/mappings/adult-status.yaml maps the adult-status requirement to one type:

apiVersion: id.registrystack.org/formats/discovery/evidence-mapping/v1alpha1
kind: DiscoveryEvidenceMapping
mappingId: urn:example:mapping:adult-status
mappingAuthorityId: urn:example:mapping-authority
requirementId: urn:example:requirement:adult-status
jurisdiction: urn:example:jurisdiction
alternatives:
- evidenceTypeListId: urn:example:evidence-type-list:adult-status
evidenceTypeIds:
- urn:example:evidence-type:adult-status

Check the project in development to accept its loopback catalog URL. Production catalogs use HTTPS URLs on non-loopback hosts.

Terminal window
rstack discovery check --project discovery-project --posture development
valid origins=1 mappings=1
warning[discovery.posture.loopback-catalog-url] discovery-project/origins.yaml:5:17 /origins/tutorial-evidence/catalogUrl
the index advertises an address on the reader's own machine; production refuses it
next: Publish HTTPS URLs on non-loopback hosts.
0 errors, 1 warning in 3 files

The third file is runtime.yaml, which you use to serve the index. The check never contacts the provider URL; a refused file gets one finding per problem, with its line, column, and fix.

Package the index

Section titled “Package the index”

Play the provider: open a second shell at the checkout root and serve its description at the approved URL.

Terminal window
python3 products/discovery/tutorial/publication_server.py \
--descriptions products/discovery/fixtures/descriptions

Back in the first shell, package the index:

Terminal window
rstack discovery package \
--project discovery-project \
--output discovery-project/package \
--posture development
packaged packageDigest=sha256:<package-digest> catalogRevision=sha256:7e0799f2c5fd24957e4d1372f757c40abef694110eb70fc260a0abdc312ca963 mappingRevision=sha256:332004ca3920c498539180946e8f2637e9998ba7e49cd98f31e19d6f818857ac
warning[discovery.posture.loopback-catalog-url] discovery-project/package/discovery-index.json /origins/0/catalogUrl
the index advertises an address on the reader's own machine; production refuses it
next: Publish HTTPS URLs on non-loopback hosts.
warning[discovery.posture.loopback-catalog-url] discovery-project/package/discovery-index.json /services/0/originUrl
the index advertises an address on the reader's own machine; production refuses it
next: Publish HTTPS URLs on non-loopback hosts.

Packaging fetched the description once. The catalogue revision digests what the descriptions mean and the mapping revision digests your mappings, so they match on any machine; the package digest also covers when this run fetched, so yours differs.

Stop the publication server with Ctrl+C. Discovery never contacts a provider while it serves.

Serve the index

Section titled “Serve the index”

discovery-project/runtime.yaml names the listener, the limits, and a package root read from DISCOVERY_PACKAGE_ROOT. Both paths must be absolute. In the first shell, start Discovery:

Terminal window
DISCOVERY_PACKAGE_ROOT="$PWD/discovery-project/package" \
rstack discovery serve --runtime-config "$PWD/discovery-project/runtime.yaml" --posture development

It checks the package against its SHA256SUMS file before it listens. In the second shell:

Terminal window
curl -s http://127.0.0.1:38080/ready
{"developmentSettings":[{"code":"discovery.posture.loopback-catalog-url","pointer":"/origins/0/catalogUrl"},{"code":"discovery.posture.loopback-catalog-url","pointer":"/services/0/originUrl"}],"posture":"development","status":"ready"}

Resolve a requirement

Section titled “Resolve a requirement”

Now play the application. It knows it must establish that a person is an adult, but not which provider can say so. Ask Discovery which Evidence types satisfy that requirement:

Terminal window
rstack discovery api /v1/evidence-types/resolve \
--url http://127.0.0.1:38080 \
--input - <<'JSON'
{"requirementId":"urn:example:requirement:adult-status","jurisdiction":"urn:example:jurisdiction"}
JSON
{
"requirementId": "urn:example:requirement:adult-status",
"jurisdiction": "urn:example:jurisdiction",
"mappingRevision": "sha256:332004ca3920c498539180946e8f2637e9998ba7e49cd98f31e19d6f818857ac",
"alternatives": [
{
"evidenceTypeListId": "urn:example:evidence-type-list:adult-status",
"evidenceTypeIds": ["urn:example:evidence-type:adult-status"],
"mappingId": "urn:example:mapping:adult-status",
"mappingAuthorityId": "urn:example:mapping-authority"
}
]
}

Each alternative lists types that are required together; here there is one alternative with one type.

Find the provider

Section titled “Find the provider”

Search for Registry Evidence services that assert that type:

Terminal window
rstack discovery api \
'/v1/services?serviceKind=evidence&evidenceType=urn%3Aexample%3Aevidence-type%3Aadult-status' \
--url http://127.0.0.1:38080

The response carries the catalogRevision from the package step and one item. Its key fields:

{
"recordId": "urn:registrystack:discovery:record:sha256:676659c10ce5cc9d353f4fd2816673c7947e612151efbbe1cc4d42372d9be9d5",
"bindingId": "urn:registrystack:discovery:binding:sha256:2f9ccc4629c7ea2409d986a9c0ee6e3afe6e63326ca7b1be7d9eb8c69082d96c",
"serviceKind": "evidence",
"endpointUrl": "https://evidence.example.org",
"originUrl": "http://127.0.0.1:38090/evidence.jsonld",
"originContentDigest": "sha256:fc96f3a8cb0d82239425ea5712dceca975a5899e5528616648174da661fae905"
}

originContentDigest is the SHA-256 of the exact bytes the provider published.

The application saves a selection: the recordId and bindingId it chose, and the two revisions it chose under. A selection is public metadata, not a credential. Whether to trust endpointUrl is decided by the application’s own Evidence configuration, and the call to it never passes through Discovery. The Discovery namespace of the Registry Stack client runs these searches and saves selections from Rust, Node.js, or Python.

Troubleshooting

Section titled “Troubleshooting”
SymptomCauseFix
A service stops at startupPort 38090 or 38080 is in useStop the process using the port, then start the service again
rstack discovery package cannot fetch an originThe publication server is not runningStart it, then package again; a failed run writes no package
rstack discovery package refuses the output directorydiscovery-project/package exists from an earlier runRemove it, then package again

Next

Section titled “Next”

Discovery is still running. Package and run a Discovery index continues from here, with HTTPS origins and a pinned package. To stop instead, press Ctrl+C in the first shell and remove discovery-project.

The Registry Discovery overview explains why trust stays with the application.

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.