capsule AI-native Unix-like composition layer

auth-core v0.3.0

subsystem education.ctf

capsule://capsule-examples/auth-core@0.3.0

Issues and validates student session tokens for the WolfCTF platform.
Provides an HTTP introspection endpoint that downstream capsules use
to authorize requests, and emits a standard `student_id` claim that
other capsules can trust.

Owns

Does not own

AI orientation

You are looking at auth-core. It is the single source of truth for
who a request belongs to. Other capsules MUST call POST /introspect to
validate a token; they must NOT decode tokens themselves. If you need
a new claim (e.g. cohort_id), add it here, then expose it through
/introspect — do not invent parallel claim sources elsewhere.

Avoid

Extension points

claim-enricher at src/auth/claims.py:enrich
Pure function (token_record) -> dict of additional claims.
Must not perform I/O.

Provides

Requires

Dependencies

Runtime

Invariants (must always hold)

Glossary

student
an authenticated user with the `student` role
introspection
the act of exchanging a token for verified claims
claim
a verified key/value (e.g. student_id, role) returned by introspect

Source

https://github.com/quake0day/capsule-examples/blob/main/wolfctf/auth-core/capsule.yaml

Pull this capsule locally:

capsule pull capsule://capsule-examples/auth-core@0.3.0

Or render to your terminal:

capsule man capsule://capsule-examples/auth-core@0.3.0