Skip to content

Permission should support multiple name patterns #4510

Closed

Description

@dmartinol

Is your feature request related to a problem? Please describe.
As of today RBAC permissions can match resources by type and a single name_pattern field, as in:

Permission(
    name="reader",
    types=[FeatureView],
    name_pattern=".*risky.*",
    policy=RoleBasedPolicy(roles=["trusted"]),
    actions=[AuthzedAction.QUERY_OFFLINE],
)

We should extend this concept by allowing multiple patterns instead, to simplify the customer configuration.

Describe the solution you'd like
Support a list of name_patterns instead:

Permission(
    name="reader",
    types=[FeatureView],
    name_pattern=[".*risky.*", "critical_data"],
    policy=RoleBasedPolicy(roles=["trusted"]),
    actions=[AuthzedAction.QUERY_OFFLINE],
)

In this case, the permission would apply to all the feature views matching any of the configured patterns.

Describe alternatives you've considered
Do not rename the name_pattern field for backward compatibility.

Activity

  1. added
    kind/feature
    on Sep 10, 2024
  2. dmartinol commented on Sep 10, 2024

    @dmartinol
    ContributorAuthor
  3. franciscojavierarceo commented on Oct 15, 2024

    @franciscojavierarceo
    Member

    @dmartinol do you think we could do this before I cut the next release?

  4. dmartinol commented on Oct 16, 2024

    @dmartinol
    ContributorAuthor

    @dmartinol do you think we could do this before I cut the next release?

    on it

  5. dmartinol commented on Oct 16, 2024

    @dmartinol
    ContributorAuthor

    Do not rename the name_pattern field for backward compatibility

    Since we haven't released any RBAC version yet, I would also rename it to plural name_patterns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions