Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /authentication_pwd /georgekhananaev_fastapi-docshield.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The caller is an outside browser/HTTP client sending HTTP Basic credentials to the protected /docs route; no in-repo client sends credentials (examples/dark_theme_example.py only fetches a stylesheet; tests excluded)." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "get_docs", | |
| "file": "fastapi_docshield/docshield.py", | |
| "lines": "182", | |
| "notes": "Route handler get_docs registered in DocShield._setup_routes (docshield.py:181) with Depends(self.security) (HTTPBasic, docshield.py:64) extracting the credentials; it calls _verify_credentials at docshield.py:183, which raises 401 on failure so the docs are never served. get_openapi (docshield.py:170) and get_redoc (docshield.py:225) enforce identically." | |
| }, | |
| { | |
| "role": "Verification manager", | |
| "status": "present", | |
| "symbol": "_verify_credentials", | |
| "file": "fastapi_docshield/docshield.py", | |
| "lines": "130", | |
| "notes": "Called by the Enforcer get_docs at docshield.py:183; collects username/password from HTTPBasicCredentials, looks up the stored password in self.credentials (docshield.py:147,150) and invokes the comparison (docshield.py:148), returning the username or raising HTTPException 401." | |
| }, | |
| { | |
| "role": "Password store", | |
| "status": "present", | |
| "symbol": "credentials", | |
| "file": "fastapi_docshield/docshield.py", | |
| "lines": "66", | |
| "notes": "Read by _verify_credentials at docshield.py:147/150 (self.credentials[username]); the in-memory dict of username:password passed to DocShield.__init__ and assigned at docshield.py:66. Caveat: passwords are stored in plaintext, not as hashes." | |
| }, | |
| { | |
| "role": "Hasher", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "_verify_credentials (docshield.py:130) compares the received plaintext password directly to the stored plaintext password; no hashing anywhere in fastapi_docshield/." | |
| }, | |
| { | |
| "role": "Pepper store", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No pepper or server-side secret is used in _verify_credentials (docshield.py:130) or elsewhere in fastapi_docshield/." | |
| }, | |
| { | |
| "role": "Encrypter", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No encryption/HMAC of a password hash on the verification path in docshield.py; only a plaintext constant-time comparison is done." | |
| }, | |
| { | |
| "role": "Comparator", | |
| "status": "external", | |
| "symbol": "compare_digest", | |
| "file": "fastapi_docshield/docshield.py", | |
| "lines": "148", | |
| "notes": "Called by the Verification manager _verify_credentials at docshield.py:148; Python stdlib secrets.compare_digest (imported docshield.py:16) does a constant-time comparison of the received plaintext password against the stored plaintext password (not hashes)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "_get_swagger_with_fallback", | |
| "file": "fastapi_docshield/docshield.py", | |
| "lines": "261", | |
| "notes": "After _verify_credentials succeeds, get_docs (docshield.py:182) with default settings (use_cdn_fallback=True, prefer_local=False) returns self._get_swagger_with_fallback() at docshield.py:207, rendering the protected Swagger UI page. With custom URLs or prefer_local it instead returns get_swagger_ui_html (docshield.py:220)." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.65 kB
- Xet hash:
- de4f025b513f1760b40a1a278324dd2e9fead5cd6213adb011bb72e95e5c9bc5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.