docs: add new tutorials on identity and static attributes. - #167
Open
terylt wants to merge 1 commit into
Open
Conversation
Signed-off-by: Teryl Taylor <terylt@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds eight runnable tutorial modules that complete the identity and delegation
story, so every delegation recipe in the Identity & Delegation cookbook
has a hands-on module, plus two supporting identity topics (multi-issuer
federation, static attributes). Each module is a small program you run against
the live IdP and can edit, break, and re-run; each also runs in
--checkmodefor CI.
The tutorial harness, IdP realm, and (for the SVID module) an opt-in SPIRE
overlay grow just enough to support these — modules 0–10 are unchanged in
behavior.
New modules
groups:bundlesubject: uservssubject: this_workloadsubject: clientsubject: user, actor: client— who authorized vs. who actedsubject: caller_workloaddata.*Every delegation module cross-links its cookbook recipe (both directions), and
modules 6/12 were back-linked to Recipes 1/3.
Supporting changes
examples/tutorial/src/):mediate.rs—Callergainsextra_credentials+with_credential(header, token)and
mediateresolves multiple credentials by header, so a dual-principal call(module 15) carries a user and an agent token. Single-token modules keep the
exact prior path.
idp.rs—mint_client_token(client_credentials),mint_token_in_realm(a second issuer), and
mint_svid(mints a JWT-SVID off SPIRE).examples/tutorial/idp/):realm-export.json— acpex-agentconfidential client (module 13).partner-export.json— a second realmcpex-partner= a second issuer (module 17).docker-compose.spire.yml— SPIRE server + OIDC provider, and Keycloak bumpedto 26.6.1 with
spiffe:v1. Additive over the base compose; modules 0–15/17/18don't use it.
spire/{server,oidc}/*.conf+spire/setup-spiffe.sh— the SPIFFE authority anda one-time script that trusts SPIRE and binds the agent's SPIFFE ID to a
federated-jwtclient.Testing
against SPIRE), and passes in
--checkmode (exit 0) for CI.cargo fmt+clippyclean;hugobuilds with no broken refs (all recipe/referencecross-links resolve).
Notes for reviewers
stays a single Keycloak. See
16-workload.mdfor the two commands.restrictis intentionally not covered. It shapes which backends a hostrouter selects, and the tutorial harness has no router — a faithful module would
mean building one. Module 18 teaches the
data.*tree thatrestrictreads from,so the groundwork is there if we add it later.