Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /session_based_access_control /mlflow-oidc_mlflow-oidc-auth.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The caller is a browser or API client outside the repo; the repo has no in-repo UI/SDK sources (only mlflow_oidc_auth/ and scripts/). hack.py only injects menu/re-auth helpers into MLflow's index.html and does not call the traced permissions endpoint." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "present", | |
| "symbol": "dispatch", | |
| "file": "mlflow_oidc_auth/middleware/auth_middleware.py", | |
| "lines": "620", | |
| "notes": "Reached from the Subject's request; AuthMiddleware.dispatch (registered app.py:236, inside StarletteSessionMiddleware app.py:238) calls _authenticate_user at line 638, which falls through to _authenticate_session (line 523) for cookie requests, and returns 401/redirect via _deny (line 689) on failure. The Starlette cookie only carries an opaque session_id that is resolved against the auth_sessions DB table, so this is a server-side session." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "_authenticate_session", | |
| "file": "mlflow_oidc_auth/middleware/auth_middleware.py", | |
| "lines": "420", | |
| "notes": "Called by dispatch via _authenticate_user (auth_middleware.py:523). Reads session_id from the cookie session, calls store.resolve_auth_session at line 448, clears the session and rejects when unresolved, checks IdP expiry (_is_session_expired, optional silent refresh) and returns (ok, username, error)." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "present", | |
| "symbol": "resolve", | |
| "file": "mlflow_oidc_auth/repository/auth_session.py", | |
| "lines": "97", | |
| "notes": "Reached from _authenticate_session (auth_middleware.py:448) via SqlAlchemyStore.resolve_auth_session (sqlalchemy_store.py:344-346). AuthSessionRepository.resolve joins auth_sessions to users, filtering on session_id, revoked_at IS NULL and expires_at > now, and returns the principal (username, admin, active) or None; sessions are created by create (line 61, secrets.token_urlsafe) and revoked by revoke (line 127)." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "check_experiment_manage_permission", | |
| "file": "mlflow_oidc_auth/dependencies.py", | |
| "lines": "64", | |
| "notes": "After dispatch passes (call_next at auth_middleware.py:685 with request.state.username set), the FastAPI route get_experiment_users injects this dependency via Depends (routers/experiment_permissions.py:38). It raises HTTP 403 unless the user is admin or can_manage_experiment (dependencies.py:92) allows. The Flask MLflow API path uses before_request_hook (hooks/before_request.py:757) with validators analogously, but its handlers are MLflow's, so the in-repo FastAPI flow was chosen." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "present", | |
| "symbol": "can_manage_experiment", | |
| "file": "mlflow_oidc_auth/utils/permissions.py", | |
| "lines": "579", | |
| "notes": "Called by check_experiment_manage_permission at dependencies.py:92. It resolves the effective permission via effective_experiment_permission -> resolve_permission (utils/permissions.py:410), which walks PERMISSION_SOURCE_ORDER in get_permission_from_store_or_default (line 669) with DEFAULT_MLFLOW_PERMISSION fallback, and returns permission.can_manage." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "present", | |
| "symbol": "get_permission", | |
| "file": "mlflow_oidc_auth/repository/_base.py", | |
| "lines": "107", | |
| "notes": "The Decider's 'user' source lambda (utils/permissions.py:164) calls store.get_experiment_permission (sqlalchemy_store.py:439-440), which forwards to ExperimentPermissionRepository.get_permission (inherited from BaseUserPermissionRepository), querying the SqlExperimentPermission table via _get_permission (line 49). Group, regex and group-regex sources in other repositories are consulted in the same chain." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "get_experiment_users", | |
| "file": "mlflow_oidc_auth/routers/experiment_permissions.py", | |
| "lines": "37", | |
| "notes": "Handler for GET {experiment-permissions prefix}/{experiment_id}/users, executed only after AuthMiddleware.dispatch and the check_experiment_manage_permission dependency (line 38) pass; it lists users holding permissions on the experiment." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.53 kB
- Xet hash:
- c2893d15780f33e09d28b282639e15b364bb11f7f17866d9f6e0b7df304542ff
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.