Skip to content

Wildcard modifier to prevent matches across separator character #107

@gtaws

Description

@gtaws

Can we add a function or operator in Cedar to support the modfying the wildcard matcher to limit pattern matches to anything before a designated separator character, similar to the regex negative classifier modifier? For example - [^.]* in an FQDN pattern matcher such as my-service-[^.]*.example.com will match my-service-zonea.example.com and my-service-zoneb.example.com but not my-service-zonec.exfildomain.example.com. This function can also help support scoping down URL path matching such as "/api/resourceA/[^/]*/". Other possible proposals for the function could include a new like operator, such as like_sep("my-service-*.example.com", "."). Currently the policy language requires explicitly knowledge of possible permutations ahead of time that shouldn't be matched that can circumvent the intended preventative control.

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