Buckets:

download
raw
3.47 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client posts credentials to /user/token; the repo is a server library (only tests call it). The caller is outside the repo."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "token",
"file": "executor/http/server/routers/user.py",
"lines": "19",
"notes": "POST /user/token handler (router included in app.py:61 when 'user' is in allowed_routers) receives OAuth2PasswordRequestForm username/password, calls auth_user at user.py:24 and raises 401 on failure. Caveat: only active when ServerSetting.user_mode != 'free' and 'user' router enabled (default is free mode, config.py:32)."
},
{
"role": "Verification manager",
"status": "present",
"symbol": "auth_user",
"file": "executor/http/server/utils/auth.py",
"lines": "78",
"notes": "Called by Enforcer token at routers/user.py:24; fetches user via crud.get_user_by_username (auth.py:82), reads hashed_password and calls utils.verify_password (auth.py:88), returning the user or False."
},
{
"role": "Password store",
"status": "present",
"symbol": "get_user_by_username",
"file": "executor/http/server/user_db/crud.py",
"lines": "45",
"notes": "Called from auth_user at utils/auth.py:82; SQLAlchemy select on the users table (models.User with hashed_password column, models.py:15) storing bcrypt hashes."
},
{
"role": "Hasher",
"status": "external",
"symbol": "verify",
"file": "executor/http/server/user_db/utils.py",
"lines": "12",
"notes": "auth_user (utils/auth.py:88) calls wrapper verify_password (user_db/utils.py:11), which calls passlib CryptContext.verify; one call both hashes the candidate with the stored bcrypt salt and compares. CryptContext(schemes=['bcrypt']) configured at user_db/utils.py:4."
},
{
"role": "Pepper store",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper on the verification path (auth_user -> verify_password -> CryptContext.verify); searched for pepper/hmac/encrypt with no hits. The bcrypt salt is not a pepper; jwt_secret_key (config.py:35) only signs tokens."
},
{
"role": "Encrypter",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The bcrypt hash is never encrypted with a pepper key; verify_password (user_db/utils.py:11) only calls CryptContext.verify. No encryption code in repo."
},
{
"role": "Comparator",
"status": "external",
"symbol": "verify",
"file": "executor/http/server/user_db/utils.py",
"lines": "12",
"notes": "Same passlib CryptContext.verify call as the Hasher (one call covers both roles), reached from auth_user at utils/auth.py:88 via verify_password; returns bool used by auth_user to accept or reject."
},
{
"role": "System",
"status": "present",
"symbol": "create_access_token",
"file": "executor/http/server/utils/auth.py",
"lines": "93",
"notes": "On success the token handler records the login (crud.create_user_login, routers/user.py:32) and calls create_access_token at routers/user.py:33, which issues a JWT via python-jose jwt.encode returned to the Subject."
}
]
}

Xet Storage Details

Size:
3.47 kB
·
Xet hash:
ef3b32081173f6398b2671d175b47f1556d7b4ca415a37b1d0e5afa8698f8b1a

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