This is a simple Nginx based Identity-Aware Proxy (IAP) with the authorization engine written in Rust.
Right now this is very much just demo code, however it can be used as follows:
skaffold dev- Get a token from
http://rust-iap.localtest.me/token - Send a request to
http://iap-test.localtest.me/with the token you generated before as theTokenheader:curl -v http://iap-test.localtest.me/ -H 'Token: <MY_TOKEN>
- You should see a proxied request to http://www.example.org.
If you remove the token, or modify it, it will no longer be valid and you will receive a 401 Unauthorized response.