Dénes Bodó created KNOX-2676:
--------------------------------

             Summary: Knox rewrite rules do not support hash mark in the target 
URL
                 Key: KNOX-2676
                 URL: https://issues.apache.org/jira/browse/KNOX-2676
             Project: Apache Knox
          Issue Type: Bug
    Affects Versions: 1.4.0
            Reporter: Dénes Bodó


A rewrite rule for Yarn UI v2 should look like this for Oozie UI:
{noformat}
    <rule dir="OUT" name="OOZIE/oozie/console-url" 
pattern="*://*:*/proxy/{application_id}">
        <rewrite 
template="{gateway.url}/yarnuiv2/redirect/#/yarn-app/{application_id}/attempts"/>
    </rule>

    <filter name="OOZIE/oozie/jobinfo">
        <content type="*/json">
            <apply path="$.actions..consoleUrl" rule="OOZIE/oozie/console-url" 
/>
        </content>
    </filter> {noformat}
but it results:
{noformat}
https://quasar-jbuqfk-1.quasar-jbuqfk.root.hwx.site:8443/gateway/cdp-proxy/yarnuiv2/redirect/#/yarn-app/{application_id}/attempts
 {noformat}
You can see that the rewrite process does not resolve the application_id 
variable. To be honest no variable is resolved placed after the hash mark. If I 
use any encoded form of the hash mark then the variables are resolved but when 
I "click" on the url I get:
{noformat}
 HTTP ERROR 404 Not Found
URI:    /redirect/%23/yarn-app/application_1632341699345_0003/attempts
STATUS: 404
MESSAGE:        Not Found
SERVLET:        org.eclipse.jetty.servlet.DefaultServlet-79c4f23b{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to