[
https://issues.apache.org/jira/browse/NIFI-5237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16494930#comment-16494930
]
Damian Czaja commented on NIFI-5237:
------------------------------------
I have the following entries in HAProxy:
http-request set-header X-ProxyHost my-nifi
http-request set-header X-ProxyPort 80
http-request set-header X-ProxyContextPath /my/context/path/
server nifi \{{HOSTNAME}}:8080
and to access NiFi I go to:
[http://my-nifi/my/context/path/nifi/.|http://my-nifi/my/context/path/nifi/]
API in this case is under
[http://my-nifi/my/context/path/nifi-api/.|http://my-nifi/my/context/path/nifi/]
NiFi is working fine, I can access the UI and the NiFi API. The only problem I
have is, that after the OpenID provider redirects the browser back to NiFi (to
the oidc/callback endpoint), it processes the callback and redirects to
[http://my-nifi/nifi/], ignoring the root path provided in the
X-ProxyContextPath.
> Wrong redirect from login behind a context path, when using OpenID
> authentication
> ---------------------------------------------------------------------------------
>
> Key: NIFI-5237
> URL: https://issues.apache.org/jira/browse/NIFI-5237
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.6.0
> Environment: NiFi behind a reverse proxy (HAProxy)
> Reporter: Damian Czaja
> Priority: Major
>
> When I deploy NiFi behind a custom context path eg
> ([https://my-nifi/my/context/path/)|https://nifi/my/context/path/)] and using
> OpenID authentication, after the login I'm redirected to
> [https://my-nifi/nifi/|https://my-nifi/nifi] instead of
> [https://my-nifi/my/context/path/nifi/] .
> My presumption is, that the relative redirect in
> httpServletResponse.sendRedirect it's respecting the contextPath provided in
> the X-ProxyContextPath header:
> [https://github.com/apache/nifi/blob/rel/nifi-1.6.0/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/AccessResource.java#L269]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)