Buckets:

download
raw
3.64 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The caller of POST /login/access-token is outside the checked-out repo. git index lists frontend/src/api.ts and frontend/src/views/Login.vue, but the frontend/ directory is absent from the working tree, so no in-repo client could be verified; tests are excluded."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "login_access_token",
"file": "backend/app/app/api/api_v1/endpoints/login.py",
"lines": "23",
"notes": "FastAPI route POST /login/access-token (router included at backend/app/app/api/api_v1/api.py:26) receives username/password via OAuth2PasswordRequestForm, calls crud.user.authenticate at login.py:30 and raises HTTP 400 'Incorrect email or password' on failure (login.py:34)."
},
{
"role": "Verification manager",
"status": "present",
"symbol": "authenticate",
"file": "backend/app/app/crud/crud_user.py",
"lines": "30",
"notes": "Reached from the Enforcer at login.py:30. CRUDUser.authenticate fetches the user via get_by_email (crud_user.py:31) and calls verify_password (crud_user.py:34), returning the User or None."
},
{
"role": "Password store",
"status": "present",
"symbol": "get_by_email",
"file": "backend/app/app/crud/crud_user.py",
"lines": "15",
"notes": "Called by authenticate at crud_user.py:31; SQLAlchemy query on the User table whose hashed_password column (backend/app/app/models/user.py:11) holds the bcrypt hash (with embedded salt)."
},
{
"role": "Hasher",
"status": "external",
"symbol": "verify",
"file": "backend/app/app/core/security.py",
"lines": "30",
"notes": "authenticate (crud_user.py:34) calls the thin wrapper verify_password, which calls passlib CryptContext.verify at security.py:30; CryptContext(schemes=['bcrypt']) is configured at security.py:9. The single verify call both rehashes the password with the stored salt and compares (also cited as Comparator)."
},
{
"role": "Pepper store",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper on the verification path (crud_user.authenticate / security.verify_password); grep for pepper/hmac found nothing. bcrypt salt is not a pepper. settings.SECRET_KEY is only used for JWT signing."
},
{
"role": "Encrypter",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The bcrypt hash is not encrypted with a key anywhere on the path security.py:29-30 / crud_user.py:30-36; jose jwt.encode in create_access_token is token issuing, not password encryption."
},
{
"role": "Comparator",
"status": "external",
"symbol": "verify",
"file": "backend/app/app/core/security.py",
"lines": "30",
"notes": "Same passlib CryptContext.verify call as the Hasher (security.py:30, bcrypt configured at security.py:9), reached from authenticate at crud_user.py:34 via verify_password; it compares the computed hash to the stored one and returns bool."
},
{
"role": "System",
"status": "present",
"symbol": "create_access_token",
"file": "backend/app/app/core/security.py",
"lines": "15",
"notes": "On successful authentication (and active-user check) login_access_token calls security.create_access_token at login.py:39, which issues the HS256 JWT bearer token returned to the client."
}
]
}

Xet Storage Details

Size:
3.64 kB
·
Xet hash:
4bcedc4bb2032b32acf00d083f550a249cff644e369f5e486b93d998ac752cf3

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