cjww-development / gatekeeper

Implementation of OIDC and OAuth2
Apache License 2.0
16 stars 0 forks source link

Invalid domain in open id well known config #57

Closed chrisjwwalker closed 3 years ago

chrisjwwalker commented 3 years ago

Describe the bug OpenId well known configuration endpoint doesn't use the host being called with

To Reproduce Steps to reproduce the behavior:

  1. Go to '/gatekeeper/api/.well-known/openid-configuration'
  2. Review response
  3. See domain for the urls is http://localhost:5678 and not the configured domain

Expected behavior URL shouldn't use http://localhost:5678 it should use the domain gatekeeper sits behind

chrisjwwalker commented 3 years ago

Part of the problem the headers being pass into the application server. Taking an example of Gatekeeper being behind an nginx proxy if the Host header isn't being passed from nginx then localhost will be used as default.

Setting proxy_set_header Host $host; will fix the localhost:5678 issue.

Dev works needs to be done to fix the http issue if calling with a https host. PR is incoming.