Buckets:

AnonymousSpottedToad/human_verified_bucket / human_annotated /mappings /python /authentication_pwd__olaflaitinen_Promethium.json
download
raw
4.04 kB
{
"role_mappings": [
{
"role": "Subject",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client sends credentials to POST /auth/login; the frontend/ directory is absent from the working tree and src/ has no client code calling the login endpoint. The caller is outside the repo (OAuth2PasswordBearer in src/promethium/api/deps/auth.py:17 only points token clients at the URL).",
"status": "missing",
"nodeId": null
},
{
"role": "Enforcer",
"symbol": "login_access_token",
"file": "src/promethium/api/routers/auth.py",
"lines": "22",
"notes": "FastAPI POST /auth/login handler (router included in src/promethium/api/main.py:43) receives username/password via OAuth2PasswordRequestForm, calls AuthService.authenticate_user at auth.py:29 and raises HTTP 401 at auth.py:34 when it returns None.",
"status": "present",
"nodeId": null
},
{
"role": "Verification manager",
"symbol": "authenticate_user",
"file": "src/promethium/api/services/auth_service.py",
"lines": "18",
"notes": "Called by login_access_token (auth.py:29). AuthService.authenticate_user loads the User by email (line 24), then calls verify_password(password, user.hashed_password) at line 30 and returns the user or None.",
"status": "present",
"nodeId": null
},
{
"role": "Password store",
"symbol": "User",
"file": "src/promethium/api/models/user.py",
"lines": "12",
"notes": "Reached from authenticate_user via the inline SQLAlchemy query select(User).where(User.email == email) at auth_service.py:24. SQLAlchemy model User (table 'users') holds the bcrypt hash in column hashed_password (user.py:30); no separate repository method exists, so the model class is cited.",
"status": "present",
"nodeId": null
},
{
"role": "Hasher",
"symbol": "verify",
"file": "src/promethium/core/security.py",
"lines": "6",
"notes": "authenticate_user (auth_service.py:30) calls the thin wrapper verify_password (security.py:5), which calls passlib CryptContext.verify at security.py:6; the context is configured with bcrypt at security.py:3. One library call both hashes (with the stored salt) and compares, so it covers Hasher and Comparator.",
"status": "external",
"nodeId": null
},
{
"role": "Pepper store",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper is used: verify_password/get_password_hash in src/promethium/core/security.py pass only the password to bcrypt; grep for pepper finds nothing. The bcrypt salt is not a pepper. SECRET_KEY in auth_service.py:50 is the JWT signing key, not a pepper.",
"status": "missing",
"nodeId": null
},
{
"role": "Encrypter",
"symbol": "",
"file": "",
"lines": "",
"notes": "The bcrypt hash is not encrypted with any key on the verification path (security.py:6 is a plain passlib bcrypt verify); jwt.encode in create_access_token concerns token issuance, not password encryption.",
"status": "missing",
"nodeId": null
},
{
"role": "Comparator",
"symbol": "verify",
"file": "src/promethium/core/security.py",
"lines": "6",
"notes": "Same call as the Hasher: passlib CryptContext(schemes=['bcrypt']).verify at security.py:6 (via wrapper verify_password, called from auth_service.py:30) recomputes the bcrypt hash and compares it with the stored hashed_password; one call covers both roles.",
"status": "external",
"nodeId": null
},
{
"role": "System",
"symbol": "create_access_token",
"file": "src/promethium/api/services/auth_service.py",
"lines": "36",
"notes": "On successful verification login_access_token calls AuthService.create_access_token at auth.py:44, which issues the HS256 JWT returned to the client (auth.py:48).",
"status": "present",
"nodeId": null
}
]
}

Xet Storage Details

Size:
4.04 kB
·
Xet hash:
91a559c2e66ab62420f8df3433ae271519492a816acebc000a56f17a51dcf702

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