You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Risden (JIRA)" <ji...@apache.org> on 2018/11/07 21:20:00 UTC

[jira] [Commented] (KNOX-1355) Knox not honoring originalUrl when pac4j federation is used

    [ https://issues.apache.org/jira/browse/KNOX-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16678784#comment-16678784 ] 

Kevin Risden commented on KNOX-1355:
------------------------------------

[~yhemanth] and [~dipayanb] - There are test failures after this is applied:
{code:java}
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.knox.gateway.pac4j.Pac4jProviderTest
log4j:WARN No appenders could be found for logger (org.pac4j.j2e.filter.CallbackFilter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[ERROR] Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 1.44 s <<< FAILURE! - in org.apache.knox.gateway.pac4j.Pac4jProviderTest
[ERROR] test(org.apache.knox.gateway.pac4j.Pac4jProviderTest)  Time elapsed: 0.914 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<....0.0.1:8443/gateway/[idp/api/v1/websso?originalUrl=https://127.0.0.1:8443/gateway/]sandox/webhdfs/v1/tm...> but was:<....0.0.1:8443/gateway/[]sandox/webhdfs/v1/tm...>
	at org.apache.knox.gateway.pac4j.Pac4jProviderTest.test(Pac4jProviderTest.java:129)

[ERROR] testValidIdAttribute(org.apache.knox.gateway.pac4j.Pac4jProviderTest)  Time elapsed: 0.261 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<....0.0.1:8443/gateway/[idp/api/v1/websso?originalUrl=https://127.0.0.1:8443/gateway/]sandox/webhdfs/v1/tm...> but was:<....0.0.1:8443/gateway/[]sandox/webhdfs/v1/tm...>
	at org.apache.knox.gateway.pac4j.Pac4jProviderTest.testValidIdAttribute(Pac4jProviderTest.java:228)

[ERROR] testInvalidIdAttribute(org.apache.knox.gateway.pac4j.Pac4jProviderTest)  Time elapsed: 0.262 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<....0.0.1:8443/gateway/[idp/api/v1/websso?originalUrl=https://127.0.0.1:8443/gateway/]sandox/webhdfs/v1/tm...> but was:<....0.0.1:8443/gateway/[]sandox/webhdfs/v1/tm...>
	at org.apache.knox.gateway.pac4j.Pac4jProviderTest.testInvalidIdAttribute(Pac4jProviderTest.java:326)
{code}
I haven't looked into why but it would be good to understand this before merging.

> Knox not honoring originalUrl when pac4j federation is used
> -----------------------------------------------------------
>
>                 Key: KNOX-1355
>                 URL: https://issues.apache.org/jira/browse/KNOX-1355
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: KnoxSSO
>            Reporter: DIPAYAN BHOWMICK
>            Priority: Major
>             Fix For: 1.3.0
>
>         Attachments: KNOX-1355.patch, knox_fix_for_dp_keycloak.patch, knoxsso.xml, sequence_diagram.txt
>
>
> I wanted to integrate Keycloak as the IdP provider for Knox using the pack4j federation in Dataplane. This is for an SSO scenario and not Knox Gateway proxy. So, requested to gateway/knoxsso/api/v1/websso?originalUrl=https://dataplane.
> After, the redirection happens to Keycloak and successful authentication knox rather than returning to the requested original URL, it is redirecting to the original requestedURL (ie. gateway/knoxsso/api/v1/websso?originalUrl=https://dataplane)
> The complete Sequence diagram is attached. [^sequence_diagram.txt]
> Also, knoxsso.xml is attached as an example. [^knoxsso.xml]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)