Skip to content

[BUG] HTTPSERVER_HOSTNAME env variable not used in redirect_uri for OAuth #1025

@sebekmartin

Description

@sebekmartin

Describe the Bug

We are experiencing issue, when we setup OAuth using Okta as provider. We went step by step with the documentation. The authentication is working, but the redirect_uri send by EJBCA is localhost. Because of that, the login does not work correctly.

Our setup is Traefik as reverse proxy in front of EJBCA container. I tried to find something, how to change the redirect_uri but did not find anything.

My only problem is that redirect uri. I had to add localhost to Okta to test it, but after each login I am redirected to localhost and I have to rewrite the URL to access EJBCA.

To Reproduce

Steps to reproduce the behavior:

  1. Go to URL of EJBCA instance (public FQDN)
  2. Click on sign in with Okta
  3. I am redirected to Okta login, which is sucessfull
  4. I get redirected to https://localhost/ejbca/adminweb....
  5. If i rewrite the localhost to my FQDN and keep the rest of URL, then I am sucesfully sign-in into EJBCA

Expected Behavior

I expect, that after sucesfull signin, I will be redirected to my FQDN of EJBCA instance.

Screenshots and Logs

Product Deployment

Please complete the following information:

  • Deployment format: container
  • Version 9.3.7
  • we have HTTPSERVER_HOSTNAME set to our FQDN (without https://)

Desktop

Please complete the following information:

  • OS: windows, macOS
  • Browser edge, safari
  • Version edge 145

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions