AnonymousSpottedToad/securityPatternsRecovery / ground_truth /python /authentication_pwd__tumma72_mlx-manager.json
| { | |
| "role_mappings": [ | |
| { | |
| "patternRole": "Subject", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client code in the working tree sends credentials to POST /api/auth/login (only backend/ and scripts/ exist; the frontend is not present). The caller is outside the repo; tests ignored.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Enforcer", | |
| "entity": "login", | |
| "file": "backend/mlx_manager/routers/auth.py", | |
| "lines": "69", | |
| "notes": "FastAPI route handler POST /api/auth/login (router registered in backend/mlx_manager/main.py:342) receives email/password via OAuth2PasswordRequestForm and raises HTTP 401 at auth.py:83 when verify_password fails, otherwise issues a token.", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Verification manager", | |
| "entity": "verify_password", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "lines": "25", | |
| "notes": "Called by the Enforcer login at backend/mlx_manager/routers/auth.py:82 with the received password and the stored hash (fetched inline in login at auth.py:78). It forwards both to pwdlib PasswordHash.verify and returns the boolean result.", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Password store", | |
| "entity": "User", | |
| "file": "backend/mlx_manager/models/entities.py", | |
| "lines": "30", | |
| "notes": "SQLModel table 'users' with hashed_password column (entities.py:36); login queries it inline via session.execute(select(User).where(User.email == ...)) at backend/mlx_manager/routers/auth.py:78, and the hash is passed to verify_password at auth.py:82. No dedicated repository method exists, so the table class is cited.", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Hasher", | |
| "entity": "verify", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "lines": "27", | |
| "notes": "Reached from verify_password (auth_service.py:25); pwdlib PasswordHash.verify (Argon2, configured via PasswordHash.recommended() at auth_service.py:17) re-hashes the password with the stored salt. The same call also performs the comparison (Comparator).", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Pepper store", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No pepper value is stored or used on the verify_password path (auth_service.py:25-27); searched for pepper/hmac/secret usage in backend/mlx_manager. settings.jwt_secret is only used for JWT signing, not as a pepper.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Encrypter", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The Argon2 hash is not encrypted/peppered with any key on the verification path (auth_service.py:25-27); no encryption call found.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Comparator", | |
| "entity": "verify", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "lines": "27", | |
| "notes": "Reached from verify_password (auth_service.py:25); pwdlib PasswordHash.verify (Argon2 hasher) compares the recomputed hash against the stored hashed_password and returns a boolean. Same call as the Hasher.", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "System", | |
| "entity": "create_access_token", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "lines": "30", | |
| "notes": "After the Enforcer login passes password verification (and status checks), it calls create_access_token at backend/mlx_manager/routers/auth.py:102 to issue the JWT returned to the client (success branch of the login action).", | |
| "status": "present", | |
| "nodeId": null | |
| } | |
| ], | |
| "interaction_order": { | |
| "available": true, | |
| "language": "python", | |
| "repo": "tumma72_mlx-manager", | |
| "reason": "", | |
| "entryRole": "Enforcer", | |
| "entryRule": "behaviour", | |
| "interactions": [ | |
| { | |
| "rank": 1, | |
| "interaction": "Enforcer \u2192 Verification manager", | |
| "from": "Enforcer", | |
| "to": "Verification manager", | |
| "file": "backend/mlx_manager/routers/auth.py", | |
| "line": 82, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "backend/mlx_manager/routers/auth.py:<module>.login", | |
| "file": "backend/mlx_manager/routers/auth.py", | |
| "line": 82, | |
| "code": "verify_password(form_data.password, user.hashed_password)", | |
| "callee": "backend/mlx_manager/services/auth_service.py:<module>.verify_password", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| }, | |
| { | |
| "rank": 2, | |
| "interaction": "Verification manager \u2192 Hasher", | |
| "from": "Verification manager", | |
| "to": "Hasher", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "line": 27, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "backend/mlx_manager/services/auth_service.py:<module>.verify_password", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "line": 27, | |
| "code": "password_hash.verify(plain_password, hashed_password)", | |
| "callee": "pwdlib.py:<module>.PasswordHash.recommended.<returnValue>.verify", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Verification manager" | |
| }, | |
| { | |
| "rank": 3, | |
| "interaction": "Verification manager \u2192 Comparator", | |
| "from": "Verification manager", | |
| "to": "Comparator", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "line": 27, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "backend/mlx_manager/services/auth_service.py:<module>.verify_password", | |
| "file": "backend/mlx_manager/services/auth_service.py", | |
| "line": 27, | |
| "code": "password_hash.verify(plain_password, hashed_password)", | |
| "callee": "pwdlib.py:<module>.PasswordHash.recommended.<returnValue>.verify", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Verification manager" | |
| } | |
| ], | |
| "anchoredRoles": [ | |
| { | |
| "role": "Comparator", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Encrypter", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "kind": "METHOD" | |
| }, | |
| { | |
| "role": "Hasher", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Password store", | |
| "kind": "TYPE_DECL" | |
| }, | |
| { | |
| "role": "Pepper store", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Verification manager", | |
| "kind": "METHOD" | |
| } | |
| ], | |
| "skippedRoles": [ | |
| "Subject", | |
| "System" | |
| ] | |
| } | |
| } |
Xet Storage Details
- Size:
- 7.06 kB
- Xet hash:
- 3fb69040de1997ebff6488b7f7b00cad6c3367583515cb11b38d80ba62a05716
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.