Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /verifiable_token_based_authentication /freqtrade_freqtrade.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends a JWT to the traced Enforcer: ft_client/freqtrade_client/ft_rest_client.py:44 uses HTTP Basic (session.auth = (username, password)), and FreqUI is downloaded, not in the repo. The JWT caller is outside the repo." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "http_basic_or_jwt_token", | |
| "file": "freqtrade/rpc/api_server/api_auth.py", | |
| "lines": "108", | |
| "notes": "FastAPI dependency installed on the private api_v1 router via dependencies=[Depends(http_basic_or_jwt_token)] at freqtrade/rpc/api_server/webserver.py:224 (and other private routers). It takes the Bearer token from OAuth2PasswordBearer, forwards it to get_user_from_token (api_auth.py:114), and otherwise falls back to HTTP Basic or raises 401." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "get_user_from_token", | |
| "file": "freqtrade/rpc/api_server/api_auth.py", | |
| "lines": "34", | |
| "notes": "Called by the Enforcer at api_auth.py:114. It decodes and verifies the JWT (signature and exp via PyJWT), checks the token type ('access') and extracts identity.u as the principal, raising 401 otherwise." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "get_api_config", | |
| "file": "freqtrade/rpc/api_server/deps.py", | |
| "lines": "43", | |
| "notes": "The Enforcer receives api_config via Depends(get_api_config) (api_auth.py:111) and passes api_config['jwt_secret_key'] to the Verifier at api_auth.py:114. get_api_config returns the api_server config section holding the static HS256 secret; webserver.py:314 warns when the default secret is used." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "decode", | |
| "file": "freqtrade/rpc/api_server/api_auth.py", | |
| "lines": "41", | |
| "notes": "The Verifier get_user_from_token calls PyJWT jwt.decode(token, secret_key, algorithms=['HS256']) at api_auth.py:41, which verifies the HMAC-SHA256 signature and expiry. The same library's jwt.encode at api_auth.py:104 (create_token) generates the MAC at issuance." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "show_config", | |
| "file": "freqtrade/rpc/api_server/api_v1.py", | |
| "lines": "102", | |
| "notes": "Handler on the private api_v1 router (GET /api/v1/show_config), which is reached only after the Enforcer dependency registered at webserver.py:224 passes. It returns the bot configuration and state. All other handlers on that router are protected the same way." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.74 kB
- Xet hash:
- 6c71b07e72e6bec60fb67338454b2f4bc6b94a3b57b647e024c8f546335aca82
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.