Support Questions

Find answers, ask questions, and share your expertise

Error with Pac4j provider on query param of original URL ?

avatar
Contributor

Hey, as I mentioned in another thread I am having issues with SparkHistoryUI, but I stepped on another problem related to Pac4j that could be linked so this is why I'm starting a new thread on this different subject.

Looks like Knox is not rewriting well the URL after the redirection to ` knoxsso/api/v1/websso ? originalUrl =` . For example the following GET request: https:// knox-host:8443 /gateway/knoxsso/api/v1/websso ? originalUrl = https:// spark-host :18080/api/v1/applications?limit=2147483647 & status = completed redirects me to  https://spark-host:18080/api/v1/applications?limit=2147483647?&status=completed but this second url got an issue, adding a ? in front of the &status making it wrong and giving me a 404 error. I suspect this error on the originalUrl to be the one breaking the Jquery api call that fetches the JSON of the history as mentioned here: https://lists.apache.org/thread/q15blso0kx9bl8ntnyw23ymj3h23wm45

The following ticket seems to be related since I also am using Pac4j but there doesn't seem to be any fix available yet in Knox 2.0.0 [ https://issues.apache.org/jira/browse/KNOX-1355?jql=project%20%3D%20KNOX%20AND%20resolution%20%3D%20...
Wondering if you have any idea on how this could be solved. I managed to find a rewrite rule related to that but wasn' t able to fix anything in it https://github.com/apache/knox/blob/d21cf8f63944afdd5d4ffa0236a16cd788d9a14a/gateway-service-definit...

Thank you in advance for your suggestions.

 

0 REPLIES 0