Buckets:

download
raw
2.66 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "present",
"symbol": "get_me",
"file": "frontend/streamlit/services/api_client.py",
"lines": "28",
"notes": "Streamlit frontend client get_me sends 'Authorization: Bearer <token>' (api_client.py:32) to GET /auth/me, which is guarded by the Enforcer verify_token (backend/src/lakeflow/api/auth.py:24). Called from frontend/streamlit/pages/admin.py:14."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "verify_token",
"file": "backend/src/lakeflow/core/auth.py",
"lines": "15",
"notes": "FastAPI dependency verify_token extracts the bearer token via OAuth2PasswordBearer (core/auth.py:10) and raises HTTP 401 on failure; wired via Depends(verify_token) on routes such as me (api/auth.py:24), admin, search and qdrant routes. Decision logic is inline, so the same function is also the Verifier."
},
{
"role": "Verifier",
"status": "present",
"symbol": "verify_token",
"file": "backend/src/lakeflow/core/auth.py",
"lines": "15",
"notes": "Same function as the Enforcer (no separate helper): it calls jose jwt.decode (core/auth.py:24) which checks signature and exp, then requires a 'sub' claim and returns the payload as principal, otherwise raises 401."
},
{
"role": "Key manager",
"status": "present",
"symbol": "JWT_SECRET_KEY",
"file": "backend/src/lakeflow/core/config.py",
"lines": "26",
"notes": "Verifier verify_token passes JWT_SECRET_KEY (imported core/auth.py:7) directly to jwt.decode at core/auth.py:26; no retrieval method exists, the HS256 secret is a module constant loaded from env var JWT_SECRET_KEY with an insecure dev default 'DEV_ONLY_CHANGE_ME_IMMEDIATELY'."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "decode",
"file": "backend/src/lakeflow/core/auth.py",
"lines": "24",
"notes": "Verifier verify_token calls python-jose jwt.decode (import core/auth.py:5) with algorithms=[JWT_ALGORITHM] (default HS256), which verifies the HMAC signature and expiry. Token generation uses jwt.encode in core/security.py:48 (issuing sub-flow)."
},
{
"role": "System",
"status": "present",
"symbol": "me",
"file": "backend/src/lakeflow/api/auth.py",
"lines": "24",
"notes": "Route handler GET /auth/me runs only after Depends(verify_token) (api/auth.py:24) succeeds and returns the username from the verified payload's 'sub'. Other guarded handlers: qa (api/search.py:188), admin routes (api/admin.py:22)."
}
]
}

Xet Storage Details

Size:
2.66 kB
·
Xet hash:
a0b469199e0d4e8bb18cba6216376aa3230331aa2e0c41b4f05f2a7b2010ad4f

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