|
| 1 | +## OAuth2 Proxy Config File |
| 2 | +## https://github.com/oauth2-proxy/oauth2-proxy |
| 3 | + |
| 4 | +## <addr>:<port> to listen on for HTTP/HTTPS clients |
| 5 | +# http_address = "127.0.0.1:4180" |
| 6 | +http_address="0.0.0.0:4180" |
| 7 | +# https_address = ":443" |
| 8 | + |
| 9 | +## Are we running behind a reverse proxy? Will not accept headers like X-Real-Ip unless this is set. |
| 10 | +# reverse_proxy = true |
| 11 | + |
| 12 | +## TLS Settings |
| 13 | +# tls_cert_file = "" |
| 14 | +# tls_key_file = "" |
| 15 | + |
| 16 | +## the OAuth Redirect URL. |
| 17 | +# defaults to the "https://" + requested host header + "/oauth2/callback" |
| 18 | +redirect_url="http://nginx.127.0.0.1.nip.io:9000/oauth2/callback" |
| 19 | + |
| 20 | +## the http url(s) of the upstream endpoint. If multiple, routing is based on path |
| 21 | +upstreams = [ |
| 22 | + # static://200 |
| 23 | + "http://server:8000/" |
| 24 | +] |
| 25 | +## Logging configuration |
| 26 | +#logging_filename = "" |
| 27 | +#logging_max_size = 100 |
| 28 | +#logging_max_age = 7 |
| 29 | +#logging_local_time = true |
| 30 | +#logging_compress = false |
| 31 | +#standard_logging = true |
| 32 | +#standard_logging_format = "[{{.Timestamp}}] [{{.File}}] {{.Message}}" |
| 33 | +#request_logging = true |
| 34 | +#request_logging_format = "{{.Client}} - {{.Username}} [{{.Timestamp}}] {{.Host}} {{.RequestMethod}} {{.Upstream}} {{.RequestURI}} {{.Protocol}} {{.UserAgent}} {{.StatusCode}} {{.ResponseSize}} {{.RequestDuration}}" |
| 35 | +#auth_logging = true |
| 36 | +#auth_logging_format = "{{.Client}} - {{.Username}} [{{.Timestamp}}] [{{.Status}}] {{.Message}}" |
| 37 | + |
| 38 | +## pass HTTP Basic Auth, X-Forwarded-User and X-Forwarded-Email information to upstream |
| 39 | +# pass_basic_auth = true |
| 40 | +# pass_user_headers = true |
| 41 | +## pass the request Host Header to upstream |
| 42 | +## when disabled the upstream Host is used as the Host Header |
| 43 | +# pass_host_header = true |
| 44 | + |
| 45 | +## Email Domains to allow authentication for (this authorizes any email on this domain) |
| 46 | +## for more granular authorization use `authenticated_emails_file` |
| 47 | +## To authorize any email addresses use "*" |
| 48 | +# email_domains = [ |
| 49 | +# "yourcompany.com" |
| 50 | +# ] |
| 51 | +email_domains = "*" |
| 52 | + |
| 53 | +## The OAuth Client ID, Secret |
| 54 | +client_id = "server" |
| 55 | +client_secret = "d1680bbb-24f3-4835-a0d9-2a7492a4cc99" |
| 56 | + |
| 57 | +## Pass OAuth Access token to upstream via "X-Forwarded-Access-Token" |
| 58 | +# pass_access_token = true |
| 59 | + |
| 60 | +## Authenticated Email Addresses File (one email per line) |
| 61 | +# authenticated_emails_file = "" |
| 62 | + |
| 63 | +## Htpasswd File (optional) |
| 64 | +## Additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -s" for SHA encryption |
| 65 | +## enabling exposes a username/login signin form |
| 66 | +# htpasswd_file = "" |
| 67 | + |
| 68 | +## Templates |
| 69 | +## optional directory with custom sign_in.html and error.html |
| 70 | +# custom_templates_dir = "" |
| 71 | + |
| 72 | +## skip SSL checking for HTTPS requests |
| 73 | +# ssl_insecure_skip_verify = false |
| 74 | + |
| 75 | + |
| 76 | +## Cookie Settings |
| 77 | +## Name - the cookie name |
| 78 | +## Secret - the seed string for secure cookies; should be 16, 24, or 32 bytes |
| 79 | +## for use with an AES cipher when cookie_refresh or pass_access_token |
| 80 | +## is set |
| 81 | +## Domain - (optional) cookie domain to force cookies to (ie: .yourcompany.com) |
| 82 | +## Expire - (duration) expire timeframe for cookie |
| 83 | +## Refresh - (duration) refresh the cookie when duration has elapsed after cookie was initially set. |
| 84 | +## Should be less than cookie_expire; set to 0 to disable. |
| 85 | +## On refresh, OAuth token is re-validated. |
| 86 | +## (ie: 1h means tokens are refreshed on request 1hr+ after it was set) |
| 87 | +## Secure - secure cookies are only sent by the browser of a HTTPS connection (recommended) |
| 88 | +## HttpOnly - httponly cookies are not readable by javascript (recommended) |
| 89 | +# cookie_name = "_oauth2_proxy" |
| 90 | +cookie_secret = "MTExMTExMTExMTExMTExMQ==" |
| 91 | +# cookie_domains = "" |
| 92 | +# cookie_expire = "168h" |
| 93 | +cookie_refresh = "5m" |
| 94 | +cookie_secure = false |
| 95 | +# cookie_httponly = true |
| 96 | + |
| 97 | +oidc_issuer_url = "http://keycloak.127.0.0.1.nip.io:8080/auth/realms/dev" |
| 98 | +provider = "oidc" |
| 99 | +provider_display_name = "Keycloak" |
| 100 | + |
| 101 | +request_logging = false |
| 102 | +# Optional: Set additional headers at http://nginx.127.0.0.1.nip.io:9000/oauth2/auth |
| 103 | +set_authorization_header = true |
| 104 | +set_xauthrequest = true |
0 commit comments