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 
| 
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 | 
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%20Unresolved%20AND%20text%20~%20%22original%20url%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC
 | 
https://issues.apache.org/jira/browse/KNOX-1355?jql=project%20%3D%20KNOX%20AND%20resolution%20%3D%20Unresolved%20AND%20text%20~%20%22original%20url%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC
 ] 
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-definitions/src/main/resources/services/spark3historyui/3.0.0/rewrite.xml#L82-L91
 | 
https://github.com/apache/knox/blob/d21cf8f63944afdd5d4ffa0236a16cd788d9a14a/gateway-service-definitions/src/main/resources/services/spark3historyui/3.0.0/rewrite.xml#L82-L91
 ] 

Thank you in advance for your suggestions. 

Reply via email to