You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/proposals/authentication-filter.md
+30-27Lines changed: 30 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -825,42 +825,45 @@ This can use the status `RouteConditionPartiallyInvalid` defined in the Gateway
825
825
- Unit tests
826
826
- Functional tests to validate behavioural scenarios when referencing filters in different combinations.
827
827
828
-
### Functional Test Cases
828
+
## Functional Test Cases
829
829
830
-
The keyword "resolved" is used to refer to a filter that the controller has found, and matches the reference of the route rule.
831
-
For a filter to be considered "resolved", it must:
830
+
### Valid scenarios
832
831
833
-
1. Exist in the same namespace as the HTTP/GRPCRoute
834
-
2. The group and kind referenced must match
832
+
This sections covers deployment scenarios that are considered valid
835
833
836
-
For each test, we aim to ensure the NGINX configuration is always correct for each scenario.
834
+
- Single route rule with a single path in an HTTPRoute/GRPCRoute referencing a valid AuthenticationFilter
835
+
- Single route rule with two or more paths in an HTTPRoute/GRPCRoute referencing a valid AuthenticationFilter
836
+
- Two or more route rules each with a single path in an HTTPRoute/GRPCRoute referencing a valid AuthenticationFilter
837
+
- Two or more route rules each with two or more paths in an HTTPRoute/GRPCRoute referencing a valid AuthenticationFilter
838
+
- Two or more HTTPRoute/GRPCRoute resource each with single route rule with a single path referencing a valid AuthenticationFilter.
839
+
- Two or more HTTPRoute/GRPCRoute resource each with single route rule, each with two or more paths referencing a valid AuthenticationFilter.
840
+
- Two or more HTTPRoute/GRPCRoute resource each with two or more route rules each with a single path referencing a valid AuthenticationFilter.
837
841
838
-
Invalid resolved filter scenarios:
842
+
### Invalid scenarios
839
843
840
-
- Resolved filter that references a secret that does not exist
841
-
- Expected outcome: Filter is marked as Invalid. The route rule that references this filter is also marked as Invalid
842
-
- Resolved filter that references a secret with the incorrect data key
843
-
- Expected outcome: Filter is marked as Invalid. The route rule that references this filter is also marked as Invalid
844
+
This sections covers deployment scenarios that are considered valid
844
845
845
-
Valid reference scenarios:
846
+
- Single route rule with a single path in an HTTPRoute/GRPCRoute referencing an invalid AuthenticationFilter
847
+
- Single route rule with two or more paths in an HTTPRoute/GRPCRoute referencing an invalid AuthenticationFilter
848
+
- Two or more route rules each with a single path in an HTTPRoute/GRPCRoute referencing an invalid AuthenticationFilter
849
+
- Two or more route rules each with two or more paths in an HTTPRoute/GRPCRoute referencing an invalid AuthenticationFilter
850
+
- Two or more HTTPRoute/GRPCRoute resource each with single route rule with a single path referencing an invalid AuthenticationFilter.
851
+
- Two or more HTTPRoute/GRPCRoute resource each with single route rule, each with two or more paths referencing an invalid AuthenticationFilter.
852
+
- Two or more HTTPRoute/GRPCRoute resource each with two or more route rules each with a single path referencing an invalid AuthenticationFilter.
853
+
- Two or more route rules each with a single path in an HTTPRoute/GRPCRoute, where one rule references a valid AuthenticationFilter, and the other references an invalid AuthenticationFilter.
854
+
- Two or more route rules each with two or more paths in an HTTPRoute/GRPCRoute where one rule references a valid AuthenticationFilter, and the other references an invalid AuthenticationFilter.
855
+
- Two or more valid or invalid AuthenticationFilters referenced in a route rule.
846
856
847
-
- Resolved filter referenced by a single route rule within a single HTTP/GRPCRoute
848
-
- Expected outcome: Requests to this route rule will successfully process authentication requests
849
-
- Resolved filter referenced by multiple route rules within a single HTTP/GRPCRoute
850
-
- Expected outcome: Requests to all route rules referencing the filter successfully process authentication requests
851
-
- Resolved filter referenced by rules in multiple HTTP/GRPCRoutes
852
-
- Expected outcome: Requests to all route rules across each HTTP/GRPCRoute successfully process authentication requests
857
+
### Invalid AuthenticationFilter scenarios
853
858
854
-
Invalid reference scenarios:
859
+
This section covers configuation scenarios for an AuthenticationFilter resource that would be considered invalid
855
860
856
-
- Resolved filter referenced multiple times in a single route rule within a single HTTP/GRPCRoute
857
-
- Expected outcome: The route rule referencing multiple filters will be marked as Invalid
858
-
- Resolved filter referenced multiple times by multiple route rules within a single HTTP/GRPCRoute
859
-
- Expected outcome: Each route rule referencing multiple filters will be marked as Invalid
860
-
- Unresolved filter referenced by a single route rule within a single HTTP/GRPCRoute
861
-
- Expected outcome: The route rule referencing multiple filters will be marked as Invalid
862
-
- Unresolved filter referenced by multiple route rules within a single HTTP/GRPCRoute
863
-
- Expected outcome: Each route rule referencing multiple filters will be marked as Invalid
861
+
- An AuthenticationFilter deployed with an empty `Realm` value
862
+
- An AuthenticationFilter deployed with an empty `secretRef.Name` value
863
+
- An AuthenticationFilter referencing a secret that does not exist
864
+
- An AuthenticationFilter referencing a secret in a different namespace
865
+
- An AuthenticationFilter referencing a secret with an incorrect type (e.g Opaque)
866
+
- An AuthenticationFilter referencing a secret with an incorrect keyd
0 commit comments