Buckets:

download
raw
3.9 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The repo contains only the FastAPI backend (backend/, scripts/, examples/); no in-repo web UI/CLI posts credentials to /api/auth/token (only reference is the OAuth2PasswordBearer tokenUrl at backend/security.py:35). The login caller is outside the repo."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "login_for_access_token",
"file": "backend/routers/auth.py",
"lines": "129",
"notes": "POST /api/auth/token handler in auth_router (registered via app.include_router(auth_router) at main.py:610) receives username/password via OAuth2PasswordRequestForm and raises 401 'Incorrect username or password' at auth.py:198 when verification fails. It also performs the verification orchestration inline (same method as Verification manager)."
},
{
"role": "Verification manager",
"status": "present",
"symbol": "login_for_access_token",
"file": "backend/routers/auth.py",
"lines": "129",
"notes": "Same method as the Enforcer: it fetches the user record by username/email (auth.py:137) and calls verify_password(form_data.password, user.hashed_password) at auth.py:168 (thin wrapper at backend/security.py:282), setting is_password_correct. Caveat: it also has a legacy argon2 branch (ph.verify at auth.py:152) and a plaintext fallback comparing against INITIAL_ADMIN_USER_CONFIG password (auth.py:174)."
},
{
"role": "Password store",
"status": "present",
"symbol": "User",
"file": "backend/db/models/user.py",
"lines": "20",
"notes": "Reached from login_for_access_token via db.query(DBUser).filter(...).first() at backend/routers/auth.py:137; SQLAlchemy model User (table 'users') holds the bcrypt hash in column hashed_password (user.py:25). The query is inline, so the repo-declared model/table is cited."
},
{
"role": "Hasher",
"status": "external",
"symbol": "verify",
"file": "backend/security.py",
"lines": "284",
"notes": "verify_password (security.py:282, called from auth.py:168) forwards to passlib CryptContext.verify, which re-hashes the password with the stored bcrypt salt and compares; one call covers both Hasher and Comparator. The CryptContext(schemes=['bcrypt']) is configured at security.py:32."
},
{
"role": "Pepper store",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper is used on the login path; grep for pepper/hmac in backend/ found nothing. SECRET_KEY (backend/config.py) is the JWT signing key, not a password pepper; the bcrypt salt is not a pepper."
},
{
"role": "Encrypter",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The bcrypt hash produced by passlib (security.py:284) is compared directly; no encryption/HMAC of the hash with a pepper exists on the verification path."
},
{
"role": "Comparator",
"status": "external",
"symbol": "verify",
"file": "backend/security.py",
"lines": "284",
"notes": "Reached from login_for_access_token via verify_password at backend/routers/auth.py:168; passlib CryptContext.verify (bcrypt) both hashes and compares against user.hashed_password, returning True/False (same call as Hasher)."
},
{
"role": "System",
"status": "present",
"symbol": "create_access_token",
"file": "backend/security.py",
"lines": "315",
"notes": "After successful verification (and status / optional email-OTP checks), login_for_access_token issues the JWT via create_access_token at backend/routers/auth.py:270, initializes user_sessions and returns the token to the client."
}
]
}

Xet Storage Details

Size:
3.9 kB
·
Xet hash:
e4ef31b23ee773d37633b9a514752bba7b63dac98c2448a2fddce2136d9300da

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