Buckets:

download
raw
4.87 kB
{
"role_mappings": [
{
"role": "Subject",
"symbol": "",
"file": "",
"lines": "",
"notes": "Implicit; sends email+password via OAuth2PasswordRequestForm (POST /login/access-token) or user registration (POST /users/open)",
"status": "external",
"nodeId": null
},
{
"role": "Enforcer",
"symbol": "login_access_token",
"file": "backend/app/app/api/api_v1/endpoints/login.py",
"lines": "22–43",
"notes": "login_access_token() receives OAuth2PasswordRequestForm, delegates to crud.user.authenticate(), returns JWT on success; OAuth2PasswordBearer extracts bearer token for protected routes",
"status": "present",
"nodeId": null
},
{
"role": "Verification manager",
"symbol": "authenticate",
"file": "backend/app/app/crud/crud_user.py",
"lines": "30",
"notes": "Fetches user by email, checks password via verify_password(password, user.hashed_password); returns None on failure, User on success",
"status": "present",
"nodeId": null
},
{
"role": "Comparator",
"symbol": "verify",
"file": "backend/app/app/core/security.py",
"lines": "30",
"notes": "passlib CryptContext.verify() performs constant-time bcrypt comparison; returns True/False",
"status": "external",
"nodeId": null
},
{
"role": "Hasher",
"symbol": "verify",
"file": "backend/app/app/core/security.py",
"lines": "30",
"notes": "passlib CryptContext(schemes=['bcrypt'], deprecated='auto') generates salt and hashes in one step; default bcrypt cost factor (12 rounds)",
"status": "external",
"nodeId": null
},
{
"role": "Password store",
"symbol": "get_by_email",
"file": "backend/app/app/crud/crud_user.py",
"lines": "15–16",
"notes": "Persisted in PostgreSQL users table; queried via CRUDUser.get_by_email() and CRUDBase.get()",
"status": "present",
"nodeId": null
},
{
"role": "Pepper store",
"symbol": "",
"file": "",
"lines": "",
"notes": "Not found; no pepper/secret concatenated before hashing. SECRET_KEY is used only for JWT signing, not password hashing",
"status": "missing",
"nodeId": null
},
{
"role": "Encrypter",
"symbol": "",
"file": "",
"lines": "",
"notes": "JWT HS256 for access tokens; also generate_password_reset_token() and verify_password_reset_token() in utils.py for password reset flow (JWT HS256 with email as subject)",
"status": "missing",
"nodeId": null
},
{
"role": "Hash manager",
"symbol": "create",
"file": "backend/app/app/crud/crud_user.py",
"lines": "18",
"notes": "CRUDUser.create() hashes password at user creation; CRUDBase.update() generically detects 'password' in update_data and hashes before persisting to hashed_password",
"status": "missing",
"nodeId": null
},
{
"role": "SRNG",
"symbol": "",
"file": "",
"lines": "",
"notes": "bcrypt internally uses OS CSPRNG for salt generation; secrets.token_urlsafe(32) provides default SECRET_KEY if not overridden by env var. No explicit SRNG invocation in application code",
"status": "missing",
"nodeId": null
},
{
"role": "Password policy",
"symbol": "",
"file": "",
"lines": "",
"notes": "Not found; UserCreate schema accepts password: str with no min_length, max_length, regex, or complexity constraints. No password policy enforcement anywhere in the codebase",
"status": "missing",
"nodeId": null
},
{
"role": "System",
"symbol": "",
"file": "",
"lines": "",
"notes": "FastAPI Depends() chain decodes JWT, looks up user by sub claim, checks is_active and is_superuser before granting access to protected resources (experiments, designs, etc.)",
"status": "missing",
"nodeId": null
},
{
"role": "Registrar",
"symbol": "",
"file": "",
"lines": "",
"notes": "Superuser-gated creation via POST /users/; self-registration via POST /users/open (controlled by USERS_OPEN_REGISTRATION flag, default False); init_db() bootstraps first superuser from FIRST_SUPERUSER env vars",
"status": "missing",
"nodeId": null
},
{
"role": "Resetter",
"symbol": "",
"file": "",
"lines": "",
"notes": "Email-based flow: generate JWT reset token with email as subject (48h expiry), send via email, verify token on POST /reset-password/, hash new password and persist directly. Also PUT /users/me allows self-update of password (no current-password verification required, only valid JWT needed)",
"status": "missing",
"nodeId": null
}
]
}

Xet Storage Details

Size:
4.87 kB
·
Xet hash:
9576d8c0cdbd49f765efde4e8f46d9f1d73fcfbb044cf6c1e51d803023649674

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