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

fix: missing one-of constraint of top-level when conditions #432

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

guicassolato
Copy link
Collaborator

@guicassolato guicassolato commented Sep 27, 2023

Add missing top-level when conditions one-of constraints. Should have been in #427.

Verification steps

① Setup:

make local-setup FF=1

② Create an AuthConfig otherwise invalid

kubectl apply -f -<<EOF
apiVersion: authorino.kuadrant.io/v1beta2
kind: AuthConfig
metadata:
  name: toystore
spec:
  hosts:
  - api.toystore.com
  when:
  - any:
    - any:
      - all:
        - operator: eq
          selector: context.request.http.method
          value: GET
        - operator: matches
          selector: context.request.http.path.@extract:{"sep":"?"}
          value: /cars.*
      - all:
        - operator: eq
          selector: context.request.http.method
          value: GET
        - operator: matches
          selector: context.request.http.path.@extract:{"sep":"?"}
          value: /dolls.*
    - any:
      - all:
        - operator: matches
          selector: context.request.http.path.@extract:{"sep":"?"}
          value: /admin.*
EOF

③ Verify the AuthConfig is ready:

kubectl get authconfig/toystore
# NAME       READY   HOSTS
# toystore   true    1/1

@guicassolato guicassolato merged commit eecd82e into main Sep 27, 2023
9 checks passed
@guicassolato guicassolato deleted the fix/one-of-constraint-when-conditions branch September 27, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/bug Something isn't working size/small
Projects
No open projects
Status: To test
Development

Successfully merging this pull request may close these issues.

2 participants