Protect EndpointsβοΈ
OAuth2-Proxy is a versatile tool that serves as a reverse proxy, utilizing the OAuth 2.0 protocol with various providers like Google, GitHub, and Keycloak to provide both authentication and authorization. This guide instructs readers on how to protect their applications' endpoints using OAuth2-Proxy. By following these steps, users can strengthen their endpoints' security without modifying their current application code. In the context of EDP, it has integration with the Keycloak OIDC provider, enabling it to link with any component that lacks built-in authentication.
Note
OAuth2-Proxy is disabled by default when installing EDP.
PrerequisitesβοΈ
- Keycloak with OIDC authentication is installed.
- Keycloak operator is installed.
Enable OAuth2-ProxyβοΈ
Enabling OAuth2-Proxy implies the following general steps:
- Update your EDP deployment using command
--set 'sso.enabled=true'
or the--values
file by enabling the sso parameter. - Check that OAuth2-Proxy is deployed successfully.
- Enable authentication for your Ingress by adding
auth-signin
andauth-url
of OAuth2-Proxy to its annotation.
This will deploy and connect OAuth2-Proxy to your application endpoint.
Enable OAuth2-Proxy on Tekton DashboardβοΈ
The example below illustrates how to use OAuth2-Proxy in practice when using the Tekton dashboard:
- Run
helm upgrade
to update edp-install release: - Check that OAuth2-Proxy is deployed successfully.
- Edit the Tekton dashboard Ingress annotation by adding
auth-signin
andauth-url
of oauth2-proxy bykubectl
command:
- Generate a cookie-secret for proxy with the following command:
- Create
tekton-dashboard-proxy-cookie-secret
in the edp namespace: - Run
helm upgrade
to update edp-install release: