Buckets:

download
raw
3.25 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "present",
"symbol": "__init__",
"file": "src/api/core/warren/xi/client.py",
"lines": "267",
"notes": "ExperienceIndex.__init__ (in-repo XI client used by the CLI and the moodle indicators) forges an LTI JWT via forge_lti_token (client.py:271) and sets 'Authorization: Bearer <token>' on its AsyncClient (client.py:282), targeting settings.XI_BASE_URL = <server>/api/v1 (conf.py:107), i.e. the routers guarded by the traced Enforcer get_lti_token; e.g. CRUDExperience.create posts to /experiences (client.py:98)."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "get_lti_token",
"file": "src/api/core/warren/utils.py",
"lines": "39",
"notes": "FastAPI dependency get_lti_token reads the bearer token via OAuth2PasswordBearer (utils.py:21) and raises HTTP 401 on JWTError (utils.py:52); it is wired with Depends(get_lti_token) on every XI and plugin route, e.g. create_experience (xi/routers/experiences.py:85). The same method also performs the verification, so it is cited for both Enforcer and Verifier."
},
{
"role": "Verifier",
"status": "present",
"symbol": "get_lti_token",
"file": "src/api/core/warren/utils.py",
"lines": "39",
"notes": "Reached from the Enforcer (same method, decision logic inline): get_lti_token calls jose jwt.decode with the signing key and allowed algorithm (utils.py:43), which checks signature and exp, then parses claims into the LTIToken principal (utils.py:42) or rejects with 401/500. No smaller helper exists."
},
{
"role": "Key manager",
"status": "present",
"symbol": "APP_SIGNING_KEY",
"file": "src/api/core/warren/conf.py",
"lines": "69",
"notes": "The Verifier get_lti_token passes settings.APP_SIGNING_KEY directly to jwt.decode (utils.py:45); the key is a pydantic Settings field loaded from the environment (conf.py:69, algorithm APP_SIGNING_ALGORITHM at conf.py:68). No retrieving method exists, so the config field is cited; the same key is used by forge_lti_token (utils.py:119) and shared with the Django app's SIMPLE_JWT SIGNING_KEY."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "decode",
"file": "src/api/core/warren/utils.py",
"lines": "43",
"notes": "Called by the Verifier get_lti_token at utils.py:43: python-jose jwt.decode (imported at utils.py:11) verifies the HMAC signature (HS256 by default) and expiry; token generation uses jose jwt.encode (utils.py:117) and, in the Django app, rest_framework_simplejwt."
},
{
"role": "System",
"status": "present",
"symbol": "create_experience",
"file": "src/api/core/warren/xi/routers/experiences.py",
"lines": "83",
"notes": "Route POST /api/v1/experiences/ (router included at api/v1/__init__.py:20) runs only after Depends(get_lti_token) at experiences.py:85 succeeds; it inserts the Experience into the DB. It is the endpoint the Subject ExperienceIndex hits via CRUDExperience.create (client.py:98); other guarded handlers include plugin indicators like video views (warren_video/api.py:30)."
}
]
}

Xet Storage Details

Size:
3.25 kB
·
Xet hash:
a928967e7dfffe2f7bed1dd95677455d0832f8763ca74aaf5cc0ad6285310af5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.