generated from unleashed/rust-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28: OIDC configuration r=unleashed a=eloycoto Quite big change PR here, the main thing, a new JWT auth plugin that will check the JWT token is valid, etc.. Also added a new keycloak in the compose to validate that all is working as expected. To test that all is working: 1) Get the JWT token: ``` export KEYCLOAK_REALM="http://localhost:8080/auth/realms/ostia" ACCESS_TOKEN=$(curl -k \ -H "Host: keycloak:8080" \ -d "username=jane" \ -d "password=p" \ -d "grant_type=password" \ -d "client_id=admin-cli" \ $KEYCLOAK_REALM/protocol/openid-connect/token -s | jq -r .access_token) echo $ACCESS_TOKEN echo "ACCESS_TOKEN decoded:" jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "$ACCESS_TOKEN" ``` 2) Made the request to envoy: ``` INGRESS_PORT=$(docker inspect compose_ingress_1 | jq -r '.[0].NetworkSettings.Ports."80/tcp"[0].HostPort') curl -v http://127.0.0.1:$INGRESS_PORT/ \ -H "Host: web" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` Major things about this PR: -> Cluster has been refactored to a custom function. -> Also added support for TLS clusters. -> targets are now http uri, because is easy to know if TLS or not. -> OIDC discovery is using libcurl. In the near future tokio request will be used, but asyn issues in all config load make it difficult to add. -> Some fixes regarding wasm plugin. -> A few makefiles changes. Co-authored-by: Eloy Coto <[email protected]>
- Loading branch information
Showing
16 changed files
with
2,498 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
# Wasm filter | ||
/wasm_filter/target | ||
|
||
/compose/control-plane/static/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.