Use OAuth Proxy with ALB
TOC
Overview
This document demonstrates how to use OAuth Proxy with ALB to implement external authentication.
Procedure
Follow these steps to use the feature:
-
Deploy kind
-
Deploy alb
-
Deploy test application
- Create github oauth app
Note that
$GITHUB_CLIENT_ID$GITHUB_CLIENT_SECRETwill be obtained in this step, which needs to be set in the environment variable - Configure dns
Here we use echo.com as the application domain, auth.alb.echo.com and alb.echo.com
- Deploy oauth-proxy
oauth2-proxy needs to access github, which may require setting the HTTPS_PROXY environment variable
- Create github oauth app
-
Configure ingress
We will configure two ingresses, auth.alb.echo.com and alb.echo.com
Result
- After the operation is complete, an alb, oauth-proxy, and test application will be deployed.
- After accessing alb.echo.com, you will be redirected to the github authentication page, and after verification, you can see the output of the application