This is more of a question rather than an issue. Can I use oauth2-proxy just as a reverse proxy server with basic auth and without any third-party authentication.
I have been using it in my project to authenticate with Gitlab but I want to provide a flexibility to the admin of my application to deploy it with OAuth2 authentication or just plain basic auth. The admin can choose this option at the time of deployment.
I tried using --htpasswd-file option having the basic auth credentials and omit the options like issuer-url, but I can't bring the oauth2-proxy container to be running. It fails with an error
[2022/07/13 21:44:32] [main.go:60] ERROR: Failed to initialise OAuth2 Proxy: error intiailising provider: could not create provider data: error building OIDC ProviderVerifier: invalid provider verifier options: missing required setting: issuer-url
So just wanted to know if it's even possible run this with only basic auth?
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
You might be able to reproduce this bug with my config.
This is the snippet for the args I provide in my yaml.
- --http-address
- "0.0.0.0:4180"
- --upstream
- http://localhost:8100/1.0.0/,http://localhost:8080/ui/
- --provider
- "gitlab"
- --redirect-url
- "http://example.com/oauth2/callback"
- --client-id
- <some-client-id>
- --client-secret
- <some-secret>
- --cookie-secret
- IelBwY6bF_G9oQ7okmCe5A==
- --oidc-issuer-url
- https://example.com
- --cookie-secure=false
- --email-domain
- example.com
- --skip-provider-button=true
- --skip-oidc-discovery=true
- --display-htpasswd-form=true
- --htpasswd-file
- /etc/oauth2/basicauth_creds
Context
Your Environment
This is more of a question rather than an issue. Can I use oauth2-proxy just as a reverse proxy server with basic auth and without any third-party authentication.
I have been using it in my project to authenticate with Gitlab but I want to provide a flexibility to the admin of my application to deploy it with OAuth2 authentication or just plain basic auth. The admin can choose this option at the time of deployment.
I tried using
--htpasswd-fileoption having the basic auth credentials and omit the options likeissuer-url, but I can't bring the oauth2-proxy container to be running. It fails with an errorSo just wanted to know if it's even possible run this with only basic auth?
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
You might be able to reproduce this bug with my config.
This is the snippet for the args I provide in my yaml.
Context
Your Environment
v 7.3.0