Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /authentication_pwd /vnpy_vnpy_webtrader.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client posts credentials to /token: web.py:138 serves static/index.html, which is not present in the repo (static/ holds only __init__.py). ui/widget.py:75 start only saves username/password into the server config, it does not log in." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "login", | |
| "file": "vnpy_webtrader/web.py", | |
| "lines": "146", | |
| "notes": "FastAPI route POST /token (decorator web.py:145) receives OAuth2PasswordRequestForm id/pwd, calls authenticate_user at web.py:148 and raises HTTP 401 on failure (web.py:149-154). Token-protected routes (get_access, web.py:109) belong to the JWT pattern, not this one." | |
| }, | |
| { | |
| "role": "Verification manager", | |
| "status": "present", | |
| "symbol": "authenticate_user", | |
| "file": "vnpy_webtrader/web.py", | |
| "lines": "82", | |
| "notes": "Called by Enforcer login at web.py:148. Reads the configured PASSWORD, hashes it with pwd_context.hash (web.py:84), checks the username with secrets.compare_digest (web.py:86) and the password with pwd_context.verify (web.py:89), returning the username or False." | |
| }, | |
| { | |
| "role": "Password store", | |
| "status": "present", | |
| "symbol": "PASSWORD", | |
| "file": "vnpy_webtrader/web.py", | |
| "lines": "43", | |
| "notes": "Read by authenticate_user at web.py:84. Module-level PASSWORD loaded from web_trader_setting.json via vnpy load_json (web.py:41); no retrieving method of its own, so the variable is cited. Caveat: single plaintext password (written by ui/widget.py:93 save_json), hashed on each login, not stored as a hash." | |
| }, | |
| { | |
| "role": "Hasher", | |
| "status": "external", | |
| "symbol": "verify", | |
| "file": "vnpy_webtrader/web.py", | |
| "lines": "89", | |
| "notes": "authenticate_user calls passlib CryptContext.verify at web.py:89, which hashes the received password with sha256_crypt (CryptContext configured web.py:54) using the salt of the stored hash; one call covers Hasher and Comparator. The stored side is produced by pwd_context.hash at web.py:84." | |
| }, | |
| { | |
| "role": "Pepper store", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No pepper on the authenticate_user path (web.py:82-92). SECRET_KEY (web.py:48) is the JWT signing key, not a pepper; the sha256_crypt salt is not a pepper." | |
| }, | |
| { | |
| "role": "Encrypter", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The password hash is not encrypted/keyed with a pepper anywhere in authenticate_user (web.py:82-92); jwt.encode in create_access_token (web.py:105) is token signing, unrelated." | |
| }, | |
| { | |
| "role": "Comparator", | |
| "status": "external", | |
| "symbol": "verify", | |
| "file": "vnpy_webtrader/web.py", | |
| "lines": "89", | |
| "notes": "authenticate_user (web.py:82) calls passlib CryptContext.verify at web.py:89, which compares the recomputed sha256_crypt hash with the hash from web.py:84; same call as Hasher. Username comparison uses secrets.compare_digest at web.py:86." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "create_access_token", | |
| "file": "vnpy_webtrader/web.py", | |
| "lines": "95", | |
| "notes": "On successful verification the Enforcer login calls create_access_token at web.py:156, which issues a JWT (jose jwt.encode, web.py:105) returned to the client at web.py:159." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.63 kB
- Xet hash:
- bf6b56c8a50f0f04807abe8f7c53695081191937c9cc2ec8b0aa5073a84500d5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.