Member since
07-18-2024
13
Posts
6
Kudos Received
0
Solutions
08-05-2024
12:27 AM
1 Kudo
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%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 Thank you in advance for your suggestions.
... View more
Labels:
- Labels:
-
Apache Knox
08-05-2024
12:01 AM
Hello @cloude even after adding those parameters I get the 302 error, wondering if the issue is not on the Knox part though now but thank you very much for your answer
... View more
08-02-2024
05:42 AM
Hello @cloude thank you for your answer, I disabled it and still got the error, tried on chrome too here is the error message in chrome, Access to XMLHttpRequest at 'https://spark-host:18080/api/v1/applications?limit=2147483647&status=completed' from origin 'https://knox-host:8443' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Do you have any other idea ?
... View more
08-01-2024
08:45 AM
Hello, I'm trying to acces Spark History UI through Apache Knox proxy but I get this error the following error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://<spark-host>:18080/api/v1/applications?limit=2147483647&status=completed. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 302. I can' t find something related to CORS in Spark do you know how I could fix that ? Thanks for your answer
... View more
Labels:
- Labels:
-
Apache Knox
-
Apache Spark
07-29-2024
06:57 AM
I saw that hdfsui actually does that and redirect me to the namenode instead of proxying the frontend but I didn' t find anything regarding that in the rewrite rules
... View more
07-29-2024
03:05 AM
1 Kudo
Hello, I am using Apache Knox and am having trouble with some rewrites rules, to avoid those is there a way to tell Knox to just redirect the user to the service he asked for instead of proxying the requests on the KnoxUI on port :8443 ? Thanks for your answers
... View more
Labels:
- Labels:
-
Apache Knox
07-28-2024
11:59 PM
1 Kudo
Hello @Bharati and@jagadeesan wondering if you got any ideas about that topic ?
... View more
07-24-2024
01:47 AM
1 Kudo
Hello @JeffLawson I tried using this JWTRedirectAuthenticationHandler but didn' t had any result, do you know that param name is it in the hbase-site.xml ?
... View more
07-23-2024
11:56 PM
Hello @shubham_sharma Thank you very much for taking the time, I currently run under 2.3.5 and I can' t use this filter, is this ability to redirect to Knox with the AuthenticationFilterInitializer only available since 3.0.0 ?
... View more
07-23-2024
12:04 AM
1 Kudo
Hello, I am wondering if there is any way to secure HBase with Apache Knox so that if the Knox token is not provided HBase redirects to the Knox SSO page. I managed to do it for HDFS Yarn and Spark using filters but can' t seem to find any way to do that with HBase. ``` <property> <name>hadoop.http.authentication.type</name> <value>org.apache.hadoop.security.authentication.server.JWTRedirectAuthenticationHandler</value> </property> <property> <name>hadoop.http.authentication.authentication.provider.url</name> <value>https://<knox-host>:8443/gateway/knoxsso/api/v1/websso</value> </property> <property> <name>hadoop.http.authentication.public.key.pem</name> <value><Your public token from the .pem file></value> </property> ``` Here is what I added in core-site.xml to protect HDFS and Yarn. Thank you for your time
... View more
Labels:
- Labels:
-
Apache HBase
-
Apache Knox