In about fifteen minutes you will have a registry running on your machine with one test contact
in it, readable by your own staff and hidden from staff elsewhere. You write no code: you create
the registry, describe two test callers, start it, and read back the contact that start adds.
Outcome
A running local registry holding one test contact that only the callers allowed to read it can see.
Time
About 15 minutes, plus image downloads
Level
Local evaluation only
Prerequisites
Running DockerA shell and an editorThe tools required by the release verification procedure
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 breg component:
Terminal window
tag="vX.Y.Z"
bash"rstack-${tag}-install.sh"breg
rstackbreg--version
The managed installation exposes rstack on your PATH. The breg component supplies the
Base Registry Engine runtime and its command-line tools from the same release.
A project is a directory of YAML files that
describes one registry. registry.yaml holds what the registry stores and who may read and change
it, and tests/journeys.yaml holds the checks the registry must pass before it serves requests. Run
the remaining commands from this directory.
Further down, an access profile says who may read and
change contacts. A caller needs the registry:directory:write scope, may create, read, list and
change contacts, and only reaches contacts whose jurisdiction equals the jurisdiction claim in
its token:
rstack dev runs the project on your machine from a development plan. The plan lists the products
to run and the synthetic people who call them, with the claims each person’s test token carries.
Create dev.yaml. It gives the test caller editor the claim zone-a and foreign-editor the
claim zone-b:
The plan also names a scenario file: requests that rstack dev sends once the registry is running.
It sits in dev/ because the registry reads every file under tests/ as one of its own checks.
This scenario adds one contact in zone-a as editor and reads it back:
rstack dev started a PostgreSQL server in Docker for this run, ran the project’s tests, started
the registry at the breg address, and sent the scenario, which added the test contact. The first
start downloads the PostgreSQL image and takes longer. Each run gets a free port of its own, so your
address differs. The run ends after four hours, or when you stop it, and removes its database, test
keys and files with it.
Keep the run ID and the registry address from the report. token writes a short-lived header file
for a test caller, and rstack breg api sends one request with it. List the contacts as editor:
The Record carries a stable identifier and a revision number beside the fields. Tokens last five
minutes: when a request is refused with status 401, run the token command again. Now list the same
contacts as foreign-editor, whose token says zone-b:
The next tutorial continues with this project, and its first step restarts the run. When you are
finished with the registry, run rstack dev stop "$RUN" to stop it and delete its data. A run you
forget ends by itself after its time to live.
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.