Skip to content

All valid hosts added to cache#324

Merged
guicassolato merged 1 commit intomainfrom
accept-all-valid-hosts
Jul 12, 2022
Merged

All valid hosts added to cache#324
guicassolato merged 1 commit intomainfrom
accept-all-valid-hosts

Conversation

@guicassolato
Copy link
Collaborator

Ensures all valid hosts are added to the cache despite presence of invalid (taken) ones among them.

Closes #323

Verification steps

make local-setup # clusterWide: true

kubectl create namespace user-1
kubectl -n user-1 apply -f -<<EOF
apiVersion: authorino.kuadrant.io/v1beta1
kind: AuthConfig
metadata:
  name: auth-1
  namespace: user-1
spec:
  hosts:
  - talker-api.127.0.0.1.nip.io
  response:
  - name: x-auth-data
    json:
      properties:
      - name: authconfig
        value: auth-1
EOF

kubectl create namespace user-2
kubectl -n user-2 apply -f -<<EOF
apiVersion: authorino.kuadrant.io/v1beta1
kind: AuthConfig
metadata:
  name: auth-2
  namespace: user-2
spec:
  hosts:
  - talker-api.127.0.0.1.nip.io
  - talker-api.io
  response:
  - name: x-auth-data
    json:
      properties:
      - name: authconfig
        value: auth-2
EOF

kubectl port-forward deployment/envoy 8000:8000 &
curl -H 'Host: talker-api.127.0.0.1.nip.io' http://localhost:8000 -i
# x-auth-data.authconfig: auth-1
curl -H 'Host: talker-api.io' http://localhost:8000 -i
# x-auth-data.authconfig: auth-2

@guicassolato guicassolato self-assigned this Jul 12, 2022
@guicassolato guicassolato requested a review from a team July 12, 2022 08:08
Copy link
Member

@didierofrivia didierofrivia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@guicassolato guicassolato merged commit f5dd9d8 into main Jul 12, 2022
@guicassolato guicassolato deleted the accept-all-valid-hosts branch July 12, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authorino not appending valid hosts to cache when one is taken

2 participants