Buckets:

download
raw
3.6 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The repo contains only the backend (src/backend); no frontend, SDK or CLI client posting to /api/v1/login was found. The caller is outside the repo."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "login_to_get_access_token",
"file": "src/backend/base/kozmoai/api/v1/login.py",
"lines": "24",
"notes": "POST /login route handler (router included via login_router in api/router.py) receives OAuth2PasswordRequestForm username/password, calls authenticate_user at login.py:31 and raises 401 'Incorrect username or password' on failure (login.py:73)."
},
{
"role": "Verification manager",
"status": "present",
"symbol": "authenticate_user",
"file": "src/backend/base/kozmoai/services/auth/utils.py",
"lines": "331",
"notes": "Called by Enforcer at login.py:31. Fetches the user via get_user_by_username (utils.py:332), checks is_active, then calls verify_password(password, user.password) (utils.py:342) and returns the user or None."
},
{
"role": "Password store",
"status": "present",
"symbol": "get_user_by_username",
"file": "src/backend/base/kozmoai/services/database/models/user/crud.py",
"lines": "14",
"notes": "Called by authenticate_user at services/auth/utils.py:332. SQLModel query select(User).where(User.username == username) returning the User row whose password field holds the bcrypt hash."
},
{
"role": "Hasher",
"status": "external",
"symbol": "verify",
"file": "src/backend/base/kozmoai/services/auth/utils.py",
"lines": "187",
"notes": "verify_password (utils.py:185, called from authenticate_user utils.py:342) forwards to passlib CryptContext.verify, which hashes the candidate with the stored bcrypt salt; same call also serves as Comparator. CryptContext(schemes=['bcrypt']) is configured at services/settings/auth.py:53."
},
{
"role": "Pepper store",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper is used; passlib bcrypt only uses a per-hash salt. Searched services/auth and services/settings for pepper/secret applied to passwords; SECRET_KEY is only used for JWT signing."
},
{
"role": "Encrypter",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No encryption of the password hash with a pepper on the verification path (verify_password -> CryptContext.verify only). Fernet encryption in auth utils is used for API keys/variables, not passwords."
},
{
"role": "Comparator",
"status": "external",
"symbol": "verify",
"file": "src/backend/base/kozmoai/services/auth/utils.py",
"lines": "187",
"notes": "Reached from authenticate_user (utils.py:342) via verify_password wrapper; passlib CryptContext.verify (bcrypt) both hashes and compares the candidate against user.password in one call, same call as the Hasher."
},
{
"role": "System",
"status": "present",
"symbol": "create_user_tokens",
"file": "src/backend/base/kozmoai/services/auth/utils.py",
"lines": "272",
"notes": "On success login_to_get_access_token calls create_user_tokens at login.py:41 (update_last_login=True) to issue access/refresh JWTs, then sets cookies and initializes user variables/folder before returning tokens."
}
]
}

Xet Storage Details

Size:
3.6 kB
·
Xet hash:
a244ed341d6e4367b7148888fa92eebf5449bc45fa01917f39b5aadae9eb50c6

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