Skip to content

Add RFC: Condition-based access control for RBAC grants - #35

Open
rrrkharse wants to merge 1 commit into
mlflow:mainfrom
rrrkharse:rfc/condition-based-access-control
Open

Add RFC: Condition-based access control for RBAC grants#35
rrrkharse wants to merge 1 commit into
mlflow:mainfrom
rrrkharse:rfc/condition-based-access-control

Conversation

@rrrkharse

Copy link
Copy Markdown

Summary

Proposes condition-based access control for MLflow RBAC. Grants gain an optional condition parameter (a single AND-ed filter string using MLflow's existing search filter syntax) that must be satisfied for the grant to take effect.

Problem: MLflow RBAC grants access by resource type + identity, but not by resource state. Once a user has EDIT on experiments in a workspace, they can modify any experiment regardless of its lifecycle stage. There is no way to express "this user can edit dev experiments but not production ones" without moving resources between workspaces (which breaks lineage).

Two condition types:

  • Resource conditions (tags.stage = 'dev', aliases.champion EXISTS) — control which resources a grant applies to, evaluated against the resource's current attributes.
  • Request conditions (request.tag_key != 'stage') — control what values a user can set, evaluated against the request payload. Prevents e.g. a data scientist from setting a stage=production tag or a @champion alias.

Key use cases:

  1. Dev/prod boundary within a team — DS edits dev resources, loses access once promoted to production, without moving the resource
  2. Alias/promotion protection — only designated users can set operationally significant aliases
  3. Restricting mutation inputs — EDIT the resource but not set specific protected tag keys/aliases

Design highlights:

  • Reuses MLflow's search filter_string syntax — familiar to users
  • Preserves the allow-only model — conditions narrow a grant, never override another (max-wins unchanged); positive matching aligns with K8s RBAC
  • Two-phase evaluation — request conditions evaluated before resource load (early exit), resource conditions after
  • No extra DB queries for resource attributes — tags/aliases already eager-loaded; conditions loaded via a single LEFT JOIN
  • Additive schema (role_permission_conditions table) — no migration, existing grants remain unconditional
  • Extendable evaluator registry — new condition entities added without touching the resolution engine

Related: mlflow/mlflow#24742

Propose condition-based access control — grants can optionally specify
conditions that must be satisfied for the grant to take effect. Two
condition types:
- Resource conditions (tags, aliases): control which resources a grant applies to
- Request conditions: restrict what values a user can set

Enables dynamic permission boundaries within a workspace (dev/prod
lifecycle, promotion protection) without moving resources between
workspaces. Reuses MLflow's search filter syntax, preserves the
allow-only model, and adds no extra DB queries for resource attributes.

Related: mlflow/mlflow#24742
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant