I am using traefik-forward-auth in front of an R application using Shiny and authenticating with Keycloak OIDC. I would expect by navigating to the app url that I am redirected to Keycloak page, login with Keycloak, then redirect back to the app I am trying to reach.
Current Behavior
When I navigate to the app's url, I am met with a "Bad Gateway" message and a 502 error after two redirects in the Chrome network dev tools. If I refresh, I am shown a "Not Authenticated" message. The forwardauth logs say:
forwardauth_1 | time="2022-01-04T17:58:15Z" level=warning msg="failed to exchange token: oauth2: cannot fetch token: 400 Bad Request\nResponse: {\"error\":\"invalid_grant\",\"error_description\":\"Code not valid\"}"
I am not sure what is configured wrong and preventing keycloak from being accessed.
Possible Solution
Steps to Reproduce (for bugs)
A client and secret will need to be generated for the rocker image. In the docker compose images below, I have called the client "rocker"
navigate to app.example.com
Context
The following can be placed in a docker compose file and brought up that way.
Expected Behavior
I am using traefik-forward-auth in front of an R application using Shiny and authenticating with Keycloak OIDC. I would expect by navigating to the app url that I am redirected to Keycloak page, login with Keycloak, then redirect back to the app I am trying to reach.
Current Behavior
When I navigate to the app's url, I am met with a "Bad Gateway" message and a 502 error after two redirects in the Chrome network dev tools. If I refresh, I am shown a "Not Authenticated" message. The forwardauth logs say:
I am not sure what is configured wrong and preventing keycloak from being accessed.
Possible Solution
Steps to Reproduce (for bugs) A client and secret will need to be generated for the rocker image. In the docker compose images below, I have called the client "rocker"
navigate to app.example.com
Context The following can be placed in a docker compose file and brought up that way.
traefik-forward-auth Image
Shiny Server Image
Keycloak Image
Your Environment Docker version: 4.0.1 traefik-forward-auth Version used: 3.0.3 Traefik version used: 2.1