Skip to content

RFC: support recursive path pattern delegations #328

Description

@cyphar

At the moment, the wildcards supported by PATHPATTERN only allow you to match within one directory, but this is quite problematic if you want to delegate entire directory trees to a role. A fairly simple example where this would be particularly useful is if you use directories to represent projects which can then delegate to sub-projects -- the top-level delegator role would not know how the delegatee's structure looks in order to create a comprehensive PATHPATTERN, but all they would care about is the top-level directory.

The simplest proposal that matches the existing Unix glob-like semantics would be to allow for ** to act as a wildcard that matches / as well (many Unix tools support that as a special kind of glob). An alternative approach would be to allow for a PATHPATTERN to define a path prefix to match against, but ** is more generic.

Regardless of the approach taken, clients would likely need to gate this new matching behaviour based on the spec_version in root.json as otherwise they may start to misinterpret older repository data that inadvertently used ** instead of * for regular globbing.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions