Skip to content
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

Revert setting AuthConfig owner reference #352

Closed
wants to merge 0 commits into from

Conversation

guicassolato
Copy link
Contributor

Merging #303 activated a bug in Authorino that causes it to keep reconciling some AuthConfigs in a loop.

So far, we know that some AuthPolicies (and therefore some AuthConfigs) do not activate the bug, while others do.

Example of AuthPolicy that does not trigger the issue:

apiVersion: kuadrant.io/v1beta2
kind: AuthPolicy
metadata:
  name: toystore
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: toystore
  rules:
    authentication:
      "api-key-authn":
        apiKey:
          selector: {}
        credentials:
          authorizationHeader:
            prefix: APIKEY
    authorization:
      "only-admins":
        opa:
          rego: |
            groups := split(object.get(input.auth.identity.metadata.annotations, "kuadrant.io/groups", ""), ",")
            allow { groups[_] == "admins" }
        routeSelectors:
        - matches:
          - path:
              type: PathPrefix
              value: "/admin"

Example of AuthPolicy that does triger the issue:

apiVersion: kuadrant.io/v1beta2
kind: AuthPolicy
metadata:
  name: toystore
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: toystore
  rules:
    metadata:
      foo:
        http:
          contentType: application/x-www-form-urlencoded
          headers:
            Accept:
              value: application/json
          method: GET
          url: http://toystore:3000

This requires investigation.

The PR is just a hotfix while the investigation goes on.

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Merging #352 (13d94da) into main (f97417a) will decrease coverage by 0.29%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
- Coverage   65.39%   65.11%   -0.29%     
==========================================
  Files          35       35              
  Lines        3800     3795       -5     
==========================================
- Hits         2485     2471      -14     
- Misses       1123     1129       +6     
- Partials      192      195       +3     
Flag Coverage Δ
unit 59.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api/v1beta1 (u) ∅ <ø> (∅)
pkg/common (u) 76.92% <ø> (ø)
pkg/istio (u) 30.24% <ø> (ø)
pkg/log (u) 31.81% <ø> (ø)
pkg/reconcilers (u) 33.33% <ø> (ø)
pkg/rlptools (u) 56.46% <ø> (ø)
controllers (i) 70.15% <ø> (-0.52%) ⬇️
Files Coverage Δ
controllers/authpolicy_authconfig.go 66.75% <ø> (-0.36%) ⬇️
controllers/authpolicy_controller.go 73.79% <ø> (-2.24%) ⬇️

... and 1 file with indirect coverage changes

@guicassolato guicassolato force-pushed the revert-authconfig-owner-ref branch from c2c76b7 to 9f6f1f9 Compare December 4, 2023 09:08
@alexsnaps alexsnaps added this to the v0.5.0 milestone Dec 4, 2023
@guicassolato guicassolato force-pushed the revert-authconfig-owner-ref branch from 13d94da to 2acf31b Compare December 4, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants