Buckets:

download
raw
3.31 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client posts credentials to /login; the repo only contains the FastAPI backend (lib/otto_backend) and lib/tooklit, neither of which sends email/password. The caller is outside the repo."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "login",
"file": "lib/otto_backend/routers/auth_router.py",
"lines": "37",
"notes": "POST /login route handler (router included in lib/otto_backend/client.py:78) receives OAuth2PasswordRequestForm username/password, calls authenticate_user at auth_router.py:39 and raises 401 on failure (line 41)."
},
{
"role": "Verification manager",
"status": "present",
"symbol": "authenticate_user",
"file": "lib/otto_backend/db/auth.py",
"lines": "43",
"notes": "Reached from login at auth_router.py:39. Looks up the user by email (auth.py:45) and calls verify_password with the stored hash (auth.py:46), returning the user or None."
},
{
"role": "Password store",
"status": "present",
"symbol": "first",
"file": "lib/otto_backend/db/auth.py",
"lines": "45",
"notes": "authenticate_user runs db.query(Users).filter_by(email=email).first() (SQLAlchemy) against the repo-declared users table (Users model, lib/otto_backend/db/models/users.py:4, password column line 9) holding bcrypt hashes."
},
{
"role": "Hasher",
"status": "external",
"symbol": "verify",
"file": "lib/otto_backend/db/auth.py",
"lines": "21",
"notes": "verify_password (auth.py:19, called from authenticate_user auth.py:46) forwards to passlib CryptContext.verify, configured with bcrypt at auth.py:13; this one call both hashes the candidate with the stored salt and compares (same call as Comparator)."
},
{
"role": "Pepper store",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper/secret is applied on the verification path in authenticate_user/verify_password (lib/otto_backend/db/auth.py); grep for pepper/hmac found nothing. bcrypt salt is not a pepper."
},
{
"role": "Encrypter",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The bcrypt hash is not encrypted with any key before comparison in lib/otto_backend/db/auth.py; no encryption on the login path."
},
{
"role": "Comparator",
"status": "external",
"symbol": "verify",
"file": "lib/otto_backend/db/auth.py",
"lines": "21",
"notes": "Reached from authenticate_user (auth.py:46) via wrapper verify_password; passlib CryptContext(schemes=['bcrypt']).verify (configured auth.py:13) hashes and compares in one call (same call as Hasher)."
},
{
"role": "System",
"status": "present",
"symbol": "create_token",
"file": "lib/otto_backend/db/auth.py",
"lines": "23",
"notes": "On successful verification, login calls create_token at auth_router.py:43, which generates a random token and stores it in Redis with 36h expiry; login returns it as the bearer access_token."
}
]
}

Xet Storage Details

Size:
3.31 kB
·
Xet hash:
ab3557a36417907ebc27d890c35eed0265686119b0dcbbac676401d101e04c38

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