Dev server
An in-memory teaching server; it is never a production topology.
Chapter 2 of 16 · Human user · Priya
Operate a disposable Vault lab without committing bootstrap tokens, generated credentials, certificates, or runtime configuration.
Docker with Compose, Vault CLI, jq, curl, OpenSSL, and Python 3.
Priya can use a constrained local identity and reset the lab without exposing bootstrap material.
| Owner | Consumer-facing responsibility |
|---|---|
| You own | Defines consumption, validation, reload, and stop-using behavior. |
| Platform team owns | Provides trusted runtime identity, protected delivery, network, and telemetry. |
| Vault owns | Operates auth mounts, policies, engines, audit, and recovery. |
An in-memory teaching server; it is never a production topology.
In a shared environment, Priya proves identity in the browser and Vault maps approved claims to policies. The platform owns OIDC configuration.
A finite teaching identity with only the learner policy; it stands in for OIDC without adding an identity provider.
Repeated setup converges instead of multiplying resources.
cd learn-vault/labs/bootstrap
./setup.sh
source ../../.runtime/learner.env
vault token lookup -format=json | jq '{policies:.data.policies,ttl:.data.ttl}'
vault token capabilities lockbox-kv/data/orders-api
export VAULT_ADDR=https://vault.example.internal:8200
export VAULT_CACERT=/approved/path/vault-ca.crt
vault login -method=oidc -path=oidc -no-print role=developer
vault token lookup -format=json | jq '{policies:.data.policies,ttl:.data.ttl}'
-no-print stores the token through the configured token helper without displaying it. Do not use -no-store here because that option must print the token to make it usable.
| Symptom | vault status cannot connect. |
|---|---|
| Likely causes | Docker stopped, port 8200 occupied, or VAULT_ADDR points elsewhere. |
| Inspect safely | Run docker compose ps, inspect port ownership, and print only VAULT_ADDR. |
| Do not print | bootstrap.env, learner.env, token files, or container environment. |
Break it: Point VAULT_ADDR at an unused local port.
Fix it: Restore the loopback lab address, confirm Compose health, then repeat metadata-only login checks.
Escalate with time, endpoint, auth path, role, mount, namespace when relevant, status code, request ID, and sanitized error class. Never attach a credential or response body.
labs/bootstrap owns the disposable server, auth mounts, policies, roles, and engines; learner actions begin after setup.
$0; local containers only
Run labs/bootstrap/setup.sh and source .runtime/learner.env unless the chapter lab says AppRole alone is sufficient.
Run setup twice to prove idempotence, then use the separate human-user lab to inspect identity and prove an expected authorization denial.
cd learn-vault/labs/bootstrap
./setup.sh
./setup.sh
cd ../human-user
./inspect-identity.sh
./expected-denial.sh
Complete every item in the Verify section using metadata-only evidence; no secret value appears in terminal output or tracked files.
Use the Failure drill and Break it / fix it evidence fields. Stop before broadening policy, weakening identity or TLS checks, or copying secret-bearing diagnostics.
Run ./cleanup.sh when finishing a session. Re-running setup reconstructs all disposable state.
Tracked examples are separated from generated credentials and renders under ignored learn-vault/.runtime.
History, process inspection, copy-paste, and screenshots make it easy to leak.
It verifies repeatable recovery for another learning session.
It is loopback-only and carries disposable lab data.
Run cleanup, then setup again.
A safe tutorial treats its bootstrap credentials as secrets and makes reset cheaper than manual repair.