Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /authentication_pwd /gradio-app_gradio.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "present", | |
| "symbol": "_login", | |
| "file": "client/python/gradio_client/client.py", | |
| "lines": "982", | |
| "notes": "Python client Client._login (called from Client.__init__ at client/python/gradio_client/client.py:164 when auth is given) POSTs username/password form data to the app's 'login' route (utils.LOGIN_URL) handled by the Enforcer login in gradio/routes.py:489." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "login", | |
| "file": "gradio/routes.py", | |
| "lines": "489", | |
| "notes": "FastAPI POST /login handler inside App.create_app reached from the Subject's request; reads OAuth2PasswordRequestForm credentials and raises HTTP 400 'Incorrect credentials.' unless verification succeeds. Active only when launch(auth=...) is set (blocks.py:2818-2820). The same method also acts as Verification manager." | |
| }, | |
| { | |
| "role": "Verification manager", | |
| "status": "present", | |
| "symbol": "login", | |
| "file": "gradio/routes.py", | |
| "lines": "489", | |
| "notes": "Verification is inline in the Enforcer's login method (same method for both roles): it looks up app.auth[username] (Password store) and calls compare_passwords_securely at gradio/routes.py:503, or calls a user-supplied auth callable at routes.py:505-509 (alternative, not in-repo)." | |
| }, | |
| { | |
| "role": "Password store", | |
| "status": "present", | |
| "symbol": "configure_app", | |
| "file": "gradio/routes.py", | |
| "lines": "274", | |
| "notes": "Reached from login's lookup app.auth[username] (gradio/routes.py:502-503); App.configure_app builds the in-memory dict self.auth = {username: password} at routes.py:278 from Blocks.launch(auth=...) (gradio/blocks.py:2818). Caveat: passwords are stored in plaintext, no hashes." | |
| }, | |
| { | |
| "role": "Hasher", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No hashing on the verification path: login (gradio/routes.py:503) compares the plaintext submitted password to the plaintext stored one; hashlib is imported in routes.py but used for unrelated purposes." | |
| }, | |
| { | |
| "role": "Pepper store", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No pepper value exists on the login path (gradio/routes.py:489-529) or in App/Blocks configuration." | |
| }, | |
| { | |
| "role": "Encrypter", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No encryption of the password/hash with a pepper key on the login path; the plaintext comparison at gradio/routes.py:503 is the only check." | |
| }, | |
| { | |
| "role": "Comparator", | |
| "status": "present", | |
| "symbol": "compare_passwords_securely", | |
| "file": "gradio/route_utils.py", | |
| "lines": "943", | |
| "notes": "Called by the Verification manager login at gradio/routes.py:503; compares the submitted and stored plaintext passwords in constant time via hmac.compare_digest (route_utils.py:944). Compares plaintext, not hashes." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "login", | |
| "file": "gradio/routes.py", | |
| "lines": "489", | |
| "notes": "Success branch of the login handler (gradio/routes.py:510-527), reached after the Enforcer's check passes: issues a random session token via secrets.token_urlsafe, stores it in app.tokens and sets the access-token cookies, replying JSON success to the Subject." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.56 kB
- Xet hash:
- 02ea9b6322a5b74ccd1e01d40d18be4427b9b53f7c4766aaef88b2709598bff5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.