Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-2676

Knox rewrite rules do not support hash mark in the target URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4.0
    • None
    • None
    • None

    Description

      A rewrite rule for Yarn UI v2 should look like this for Oozie UI:

          <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> 

      but it results:

      https://externally_available_knox_domain_name:8443/gateway/cdp-proxy/yarnuiv2/redirect/#/yarn-app/{application_id}/attempts 

      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:

       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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dionusos Dénes Bodó
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: