Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Louketo Proxy adds trailing slash to base-uri #574

Open
abstractj opened this issue Apr 28, 2020 · 1 comment
Open

Louketo Proxy adds trailing slash to base-uri #574

abstractj opened this issue Apr 28, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@abstractj
Copy link

abstractj commented Apr 28, 2020

What:

Hi,
seems that Keycloak Gatekeeper 6.0.1 adds trailing slash to base-uri.
That will results to bad redirect url and redirect loop.
Example:

docker run -d \
-p 3000:3000 \
--restart unless-stopped \
--name guacamole-gatekeeper \
keycloak/keycloak-gatekeeper:6.0.1 \
    --discovery-url=https://keycloak.domain.com/auth/realms/foobar \
    --client-id=account \
    --client-secret=<redacted> \
    --listen=0.0.0.0:3000 \
    --encryption-key=<redacted> \
    --enable-default-deny=true \
    --redirection-url=https://guacamole.domain.com/ \
    --upstream-url=http://guacamole:8080/ \
    --base-uri=/guacamole \
    --oauth-uri=/oauth \
    --resources="uri=/guacmole/*|roles=admin" \
    --verbose=true \
    --preserve-host 

Will generate URL:

 https://keycloak.domain.com/auth/realms/foobar/protocol/openid-connect/auth?client_id=account&redirect_uri=https%3A%2F%2Fguacamole.domain.com%2Fguacamole%2F%2Foauth%2Fcallback&response_type=code&scope=openid+email+profile&state=1c4b2cd6-fc48-4046-868e-cef13ba0d696

Notice %2F%2 between base-uri and oauth-uri

Thanks

Reference:

@abstractj abstractj self-assigned this May 29, 2020
@abstractj abstractj added this to the 1.0.0-alpha.1 milestone May 29, 2020
@abstractj
Copy link
Author

Indeed this is a bug, when people provide a base-uri with slash, for example base-uri: "/". This is something that should be fixed.

@abstractj abstractj removed the triage label Jun 2, 2020
@abstractj abstractj modified the milestones: 1.0.0-alpha.1, 1.0.0 Jun 2, 2020
@abstractj abstractj added the good first issue Denotes an issue ready for a new contributor label Jun 2, 2020
@abstractj abstractj pinned this issue Jun 2, 2020
@abstractj abstractj changed the title Keycloak Gatekeeper adds trailing slash to base-uri Louketo Proxy adds trailing slash to base-uri Jun 4, 2020
@abstractj abstractj removed the good first issue Denotes an issue ready for a new contributor label Jun 4, 2020
@abstractj abstractj modified the milestones: 1.0.0, 1.0.0-alpha.2 Jun 4, 2020
@abstractj abstractj unpinned this issue Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant