Buckets:

download
raw
2.67 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client sends the bearer token to the API: sdk-python (lexy_py) has no Authorization/Bearer handling and there is no web UI; callers are outside the repo. Tests excluded."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "get_current_user",
"file": "lexy/api/deps.py",
"lines": "20",
"notes": "FastAPI dependency that takes the bearer token via Depends(oauth2_scheme) (OAuth2PasswordBearer, lexy/core/security.py:11) and raises 401 on failure; reached from routes such as get_user_me via Depends(get_current_active_user) (lexy/api/endpoints/users.py:34 -> deps.py:44). Verification is inline, so the same method is also the Verifier."
},
{
"role": "Verifier",
"status": "present",
"symbol": "get_current_user",
"file": "lexy/api/deps.py",
"lines": "20",
"notes": "Same method as the Enforcer: decision logic is inline in get_current_user, which calls jwt.decode (deps.py:29), checks the 'sub' claim, resolves the user via get_user_by_email (deps.py:38) and returns the User or raises 401. No smaller helper performs the decision."
},
{
"role": "Key manager",
"status": "present",
"symbol": "SECRET_KEY",
"file": "lexy/core/config.py",
"lines": "71",
"notes": "Verifier reads settings.SECRET_KEY.get_secret_value() at lexy/api/deps.py:30; the HS256 key is a pydantic settings field loaded from env SECRET_KEY (default 'changethis', rejected in production by check_secret_key at config.py:251). No retrieving method exists, so the config field is cited."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "decode",
"file": "lexy/api/deps.py",
"lines": "29",
"notes": "Verifier get_current_user (deps.py:20) calls python-jose jwt.decode with the secret and algorithms=[HS256], which verifies the HMAC signature and exp. Tokens are generated with jwt.encode in create_access_token (lexy/core/security.py:33)."
},
{
"role": "System",
"status": "present",
"symbol": "get_user_me",
"file": "lexy/api/endpoints/users.py",
"lines": "33",
"notes": "GET /users/me handler, reached after Enforcer passes via Depends(get_current_active_user) at users.py:34; returns the authenticated principal. Other user routes (get_users, create_user, ...) are guarded via get_current_active_superuser on the same chain; router wired in lexy/api/router.py:25 and lexy/main.py:48."
}
]
}

Xet Storage Details

Size:
2.67 kB
·
Xet hash:
e33003923f8cc53ba462b7cdb7fb85fb4e56b75cd8dbe738387cc3fae0b3d4eb

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