authservice icon indicating copy to clipboard operation
authservice copied to clipboard

Unify FilterChain matcher and TriggerRule for API simplification

Open Shikugawa opened this issue 3 years ago • 0 comments

TriggerRule and FilterChain matcher have overlapping functionality; TriggerRule currently uses only path attributes to determine whether to match or not. However, this can be achieved by specifying :path in the matcher's header. This issue is also related to #171 , if NotMatch is in the matcher, then the current TriggerRule can be completely eliminated to achieve the same functionality.

Currently, what we want to achieve with TriggerRule and Matcher is

  1. In the filter chain, if an attribute in the request header is matched, authentication is required.
  2. in the filter chain, if an attribute in the request header is not matched, do not require authentication
  3. In all filter chains, if neither match nor not-match an attribute in the request header, require default behavior (current implementation does not require authentication)

I think this will be All of these features should be available in Match, and we can eliminate the TriggerRule. This will also contribute to the simplification of the API.

Shikugawa avatar Oct 14 '21 03:10 Shikugawa