Buckets:

download
raw
2.69 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "Library repo with no in-repo client that sends the Bearer token to the auth decorator; callers are outside the repo. Outbound requests in check_entitlement (src/auth_gateway_serverkit/middleware/auth.py:135) go to Keycloak, not to the Enforcer."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "wrapper",
"file": "src/auth_gateway_serverkit/middleware/auth.py",
"lines": "150",
"notes": "Inner function of the auth(get_user_by_uid) decorator (auth.py:147) wrapping FastAPI route handlers: reads the Authorization header, rejects with 401 if missing, strips 'Bearer ', and calls get_user_info(token) at auth.py:158 (which calls get_payload at auth.py:92). Then checks Keycloak entitlement and only calls the wrapped handler (auth.py:177) on success."
},
{
"role": "Verifier",
"status": "present",
"symbol": "get_payload",
"file": "src/auth_gateway_serverkit/middleware/auth.py",
"lines": "38",
"notes": "Reached from Enforcer wrapper via get_user_info (auth.py:158 -> auth.py:92). get_payload fetches the IdP key, calls jwt.decode with RS256, audience and issuer checks, and returns the claims or raises 401 on expired/invalid tokens; get_user_info (auth.py:84) then maps sub/realm roles into a UserPayload principal."
},
{
"role": "Key manager",
"status": "present",
"symbol": "get_idp_public_key",
"file": "src/auth_gateway_serverkit/middleware/auth.py",
"lines": "29",
"notes": "Called by Verifier get_payload at auth.py:46. Builds a PEM public key from KeycloakOpenID.public_key() (python-keycloak), which fetches the realm's public key from the Keycloak server configured via get_keycloak_openid (auth.py:19); no caching."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "decode",
"file": "src/auth_gateway_serverkit/middleware/auth.py",
"lines": "49",
"notes": "PyJWT jwt.decode (imported at auth.py:11) called by Verifier get_payload at auth.py:49 with the Keycloak RSA public key and algorithms=['RS256'], performing the RS256 signature verification plus exp/aud/iss checks."
},
{
"role": "System",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "Library/starter repo: the protected handler is the user-supplied func invoked by wrapper at auth.py:177; no in-repo route is decorated with auth (searched src/ for auth( usages; main.py only has hello())."
}
]
}

Xet Storage Details

Size:
2.69 kB
·
Xet hash:
f6d8141a144276a5379d374b4b2a3fc83fb3efc885fa8d5e8d3bc03004119fa7

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