-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[authpolicy-v2] AuthPolicy v1beta2 #249
Conversation
Codecov Report
@@ Coverage Diff @@
## main #249 +/- ##
==========================================
+ Coverage 63.42% 64.81% +1.39%
==========================================
Files 33 35 +2
Lines 3204 3806 +602
==========================================
+ Hits 2032 2467 +435
- Misses 999 1147 +148
- Partials 173 192 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
So far this is looking good. I am not sure if there are verification steps to be carried out right now. |
afa63b1
to
6491b20
Compare
4820025
to
8818edb
Compare
7101dd3
to
702e821
Compare
changes all look reasonable. Bit unsure as to why RLP changed in the PR though ( I am sure there is a good reason) |
/lgtm |
1ba111e
to
856d6d8
Compare
Defines new `v1beta2` version of the `AuthPolicy` CRD, based on Authorino's `AuthConfig/v1beta2`. Closes #247 Depends on Kuadrant/authorino#417, Kuadrant/authorino-operator#137 Bump Authorino to latest (unreleased) version Bump Authorino to latest (unreleased) version Bump Authorino to latest (unreleased) version Update AuthPolicy manifests based on latest AuthConfig v1beta2 changes Bump Authorino to latest (unreleased) version Bump Authorino to latest (unreleased) version
Enables [superseding of strict host subsets](https://github.com/Kuadrant/authorino/blob/main/docs/architecture.md#avoiding-host-name-collision) in Authorino – i.e., set `SupersedingHostSubsets` to `true` in the Authorino CR. Closes #264.
[authpolicy-v2] AuthConfig superseding of strict host subsets
…y) into all Istio AuthorizationPolicy rules that do not include hostnames already built from the route selectors, so we don't send a request to authorino for hosts that are not in the scope of the policy
…Rule and between HTTPRouteRules themselves
…conciling HTTPRoute ones
…entRefs of the route and finds all policies that target one of its parent resources, thus yielding events for those policies.
…sion and HeaderMatchRegularExpression
…or full HTTPRoute only (i.e. ignore config-level conditions)
+ unit tests from Istio AuthorizationPolicy rules from HTTPRouteRules and hostnames
… attached to HTTPRoutes
[authpolicy-v2] Well-known attributes in the generated AuthConfigs
[authpolicy-v2] route selectors
…el up This will pair the level of these policy-wide options to the top-level 'routeSelectors', rather than having two things that have semantics over the same scope defined at different levels in the API. This change also separates the auth scheme, making it now exclusively about auth rules.
[authpolicy-v2] Move AuthPolicy top-level 'patterns' and 'when' fields one level up
* docs: authpolicy v1beta2 * docs: addressing suggestions of enhancements to the authpolicy docs
ea01fc8
to
4bf902a
Compare
* prevent usage of routeSelectors in a gateway AuthPolicy * AuthPolicy CEL validation rules - Invalid targetRef.group - Invalid targetRef.kind - Route selectors not supported when targeting a Gateway Note: cannot set a validation rule for !has(spec.targetRef.namespace) || spec.targetRef.namespace == metadata.namespace, because Kubernetes does not allow accessing `metadata.namespace`. See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite an effort put on this one, thanks 🙏🏼
🥇 🥇 🥇
Base branch for the first chunk of #207.
Closes:
AuthScheme
types to be based on AuthConfig v1beta2 types #253 → replaces versionv1beta1
of theAuthPolicy
CRD with newv1beta2
(based on Authorino'sAuthConfig/v1beta2
)As well as:
routeSelectors
fields to the AuthPolicy #248gateway.networking.k8s.io/policy
label at the AuthPolicy CRD #278targetRef.group/kind
,routeSelectors
in gw policies)How to review/verify this PR
make local-setup
ing this branch and running a user guide such as https://github.com/Kuadrant/kuadrant-operator/blob/authpolicy-v2/doc/user-guides/auth-for-app-devs-and-platform-engineers.md