plugin authn/authz rfc#19
Open
PatrickKoss wants to merge 2 commits into
Open
Conversation
Signed-off-by: Patrick Koss <pati.koss@gmx.de>
|
Hi! I've updated #10 to renumber the RFCs 5 and 6 that were in there to RFCs 8 and 9 to avoid conflicts with the now merged RFC 5, this PR, and #13 which proposes an RFC 7. In the future, I'd recommend the following to avoid more numbering conflicts:
Of course that only works if everybody does it, but I think it's worth trying. In my opinion, a better solution would be to stop numbering the RFC's, but presumably that's a broader community discussion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 0006: Pluggable Authentication and Authorization
Tracking issue: mlflow/mlflow#21240
Summary
Adds a new RFC proposing two small plugin contracts —
AuthenticationProviderand
AuthorizationBackend— to replace MLflow's singleauthorization_functionhook. The split separates who you are from what you may do, and keeps the
load-bearing
route → requirementmapping in core so plugins never need totrack MLflow's routing surface.
This is the extension point that RFC 0005 ("Role-Based Access Control for
MLflow OSS") flagged as future work. It builds on 0005's role model and
resolver surface, and the default plugins reproduce today's behavior
byte-for-byte — operators who upgrade and change nothing see no difference.
What's in this PR
rfcs/0006-pluggable-auth/0006-pluggable-auth.md(823 lines, onecommit on top of
main).No code changes, no implementation — this is the design document. Reference
adapters described in the RFC (OIDC, Kubernetes
TokenReview/SubjectAccessReview, OPA, upstream proxy headers) are sketched in enoughdetail to validate the interface shape but are not built here.
Why now
The existing surface has three structural problems:
authorization_functionreturns awerkzeug.datastructures.Authorizationcarrying only a username — too thinfor bearer tokens, OIDC claims, group membership, or JIT provisioning.
non-default function (
mlflow/server/auth/__init__.py:4141), so the hookis effectively Flask-only.
dispatch structures. Any external authorization system (Kubernetes SAR,
OPA, a corporate policy engine) has to rediscover and re-sync that mapping
every time MLflow adds a route.
Design rule worth calling out
Core retains sole ownership of the
route → requirementmapping via a singleauthoritative
OPERATION_REGISTRY. Plugins only ever see the normalized tuple(resource_type, resource_id, action, workspace)— never a route, a protobufclass, or a GraphQL field. A CI guard fails the build if any route ships
without a declared requirement.
Out of scope (intentionally)
READ / USE / EDIT / MANAGE.Reviewer guide
Suggested reading order if you're short on time:
rest of the design hangs off this.
of truth as routes evolve.
like pushback.
Open questions I'd like input on
These are spelled out at the bottom of the RFC; flagging them here so they
don't get lost:
authn_providersshould be an ordered chain or a single providerwith explicit fallback rules.
workspaceshould be for the Kubernetes SAR adapter(namespace? label selector? both?).
Checklist
0000-template.mdstructurestart_dateset,mlflow_issuelinked,rfc_prleft empty pertemplate instructions
mlflow/server/auth/