-
Notifications
You must be signed in to change notification settings - Fork 15
Description
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.