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

Process auth CheckResponse #86

Merged
merged 4 commits into from
Sep 23, 2024
Merged

Process auth CheckResponse #86

merged 4 commits into from
Sep 23, 2024

Conversation

adam-cattermole
Copy link
Member

Changes

Process the CheckResponse from the auth service.

Verification

  • Build and deploy locally
make build && make local-setup
  • Port-forward and watch logs in different terminals:
kubectl port-forward --namespace default deployment/envoy 8000:8000
kubectl logs -f deployment/envoy
kubectl logs -f deployment/authorino
  • Make some requests based on the default authconfig:
curl -H "Host: test.a.auth.com" http://127.0.0.1:8000/get -i
# HTTP/1.1 401 Unauthorized
curl -H "Host: test.a.auth.com" -H "Authorization: APIKEY ndyBzreUzF4zqDQsqSPMHkRhriEOtcRx" http://127.0.0.1:8000/get -i
# HTTP/1.1 200 OK

See in envoy logs the /Check call and in Authorino the processing of the request.

Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
@adam-cattermole adam-cattermole requested review from didierofrivia, alexsnaps and eguzki and removed request for didierofrivia and alexsnaps September 20, 2024 11:06
```

```sh
curl -H "Host: test.a.auth.com" -H "Authorization: APIKEY ndyBzreUzF4zqDQsqSPMHkRhriEOtcRx" http://127.0.0.1:8000/get -i
Copy link
Contributor

Choose a reason for hiding this comment

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

That token is generated from our make targets?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep - it's coming from here https://github.com/Kuadrant/wasm-shim/blob/external-auth/utils/deploy/authconfig.yaml#L27 (I took this one from the authorino repo).

I'm going to update this to use the IAMALICE/BOB in a future PR just for ease of use

Copy link
Contributor

@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.

This is great! 🍪

@didierofrivia
Copy link
Contributor

BTW, works like charm!

@adam-cattermole adam-cattermole merged commit 1265852 into external-auth Sep 23, 2024
8 checks passed
@adam-cattermole adam-cattermole deleted the auth-response branch September 23, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants