RoleID
A role identifier; often non-secret but still scoped operational data.
Chapter 7 of 16 · Application/workload user · orders-api
Prefer identity-native authentication and use AppRole only for constrained machines without a stronger runtime identity.
Chapter 6 complete and bootstrap-generated AppRole inputs present under .runtime.
orders-api can exchange separately delivered AppRole factors for a short-lived, scoped token.
| 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. |
A role identifier; often non-secret but still scoped operational data.
The secret factor, ideally short-lived and response-wrapped.
A single-purpose token transfers sensitive response data.
A signed runtime identity such as IAM, Kubernetes, or CI OIDC.
source learn-vault/.runtime/learner.env
cd learn-vault/labs/approle-app
./login.sh
jq '{policies:.auth.policies,lease_duration:.auth.lease_duration}' ../../.runtime/approle-login.json
./whoami.sh| Symptom | AppRole login reports invalid role or secret ID. |
|---|---|
| Likely causes | Wrong mount, expired or exhausted SecretID, wrong-environment RoleID, or bind mismatch. |
| Inspect safely | Check file presence, modes, timestamps, role, mount, and SecretID accessor metadata. |
| Do not print | SecretID, wrapping token, unwrap response, or Vault token. |
Break it: Swap RoleID and SecretID or use an expired SecretID.
Fix it: Restore separately delivered factors or mint a new bounded SecretID through bootstrap.
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.
Use bootstrap-generated RoleID and SecretID files to log in; scripts retain the response only under ignored runtime storage.
cd learn-vault/labs/approle-app
./login.sh
test -s ../../.runtime/approle-login.json
jq -e '.auth.policies|index("lockbox-orders-api")' ../../.runtime/approle-login.json
test "$(stat -f '%Lp' ../../.runtime/approle-login.json)" = 600
./cleanup.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 the lab cleanup. Bootstrap can mint a fresh SecretID for another session.
AppRole is the portable local identity; production prefers AWS IAM on EC2 and Kubernetes auth on EKS.
Machines or legacy schedulers without a verifiable platform identity.
One delivery-channel compromise should not complete the login.
Sensitive response delivery through an intermediary.
A narrowly bound Kubernetes service-account identity.
Workload auth should derive trust from the runtime; AppRole is a controlled fallback, not the universal default.