Allow different URLs for user redirect and backend access

Created on 28 September 2021, over 3 years ago
Updated 14 March 2023, almost 2 years ago

Problem/Motivation

I'm trying to create a development environment with Docker and docker-compose, authenticating against a Keycloak server exposed on localhost.

That means that the user needs to be redirected to http://localhost:8081/auth, whereas the backends needs to speak with (say) http://keycloak:8080/auth.

That means that the module should take two URL parameters for configuration, and the getEndpoints method should return the endpoints correspondingly - i.e., assuming that one URL is _only_ for the back end and the other _only_ for the front end.

Whereas my use case is building a dev environment, the backend service URL and frontend auth URL might also differ in a production environment e.g. because of a firewall with the server restricted to internal addresses for outgoing requests, so the use case is important.

Steps to reproduce

Run a Keycloak exposed to the user on localhost, to Drupal as "keycloak". Try to configure with either as auth URL - see it fail.

Proposed resolution

It should be possible to specify two Keycloak base URLs, one for redirect and one for Drupal server to access.

Remaining tasks

* Add this field in GUI
* Change module correspondingly

User interface changes

One new URL parameter is added, "Keycloak Redirect URL". This should be optional, i.e. it is not needed if the base URL is also accessible for the user, in the browser.

API changes

None.

Data model changes

The new URL parameter is also stored in the configuration.

💬 Support request
Status

Closed: outdated

Version

1.5

Component

Miscellaneous

Created by

🇩🇰Denmark agger

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024