[ 
https://issues.apache.org/jira/browse/KNOX-2841?focusedWorklogId=825786&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-825786
 ]

ASF GitHub Bot logged work on KNOX-2841:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Nov/22 15:03
            Start Date: 14/Nov/22 15:03
    Worklog Time Spent: 10m 
      Work Description: dionusos opened a new pull request, #674:
URL: https://github.com/apache/knox/pull/674

   (It is very **important** that you created an Apache Knox JIRA for this 
change and that the PR title/commit message includes the Apache Knox JIRA ID!)
   
   ## What changes were proposed in this pull request?
   
   Oozie's "root" rewrite rule must be more strict making it not to match to 
HDFS paths like "hdfs://namespace/oozie/libraries"
   
   ## How was this patch tested?
   
   I did manual test steps in my environment:
    * I run an Oozie job using Hue having a workflow property: 
prop1=hdfs://namespace/oozie/libraries
    * checked the value is broken
    * then I edited /var/lib/knox/gateway/data/services/oozie/5.0.0/rewrite.xml 
to apply the change
    * then restarted Knox
    * then waited two minutes
    * then started the same Oozie workflow via Hue
   then I experienced on the issue is gone. I did revert the change, tun the 
whole again then the issue came again. Then repeated the whole with the fix and 
the issue has gone again.
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 825786)
    Remaining Estimate: 0h
            Time Spent: 10m

> Oozie "root" rewrite rule's pattern is too open
> -----------------------------------------------
>
>                 Key: KNOX-2841
>                 URL: https://issues.apache.org/jira/browse/KNOX-2841
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 1.6.0
>            Reporter: Dénes Bodó
>            Assignee: Dénes Bodó
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> It seems that the "root" rewrite rule for Oozie is too open and causes the 
> following issue:
> When we use Apache Hue as the UI for Oozie and we define a workflow property 
> for a file path like
> *hdfs://mnameservice1/oozie/test*
> then on Hue's workflow details page we will see an url for that property like:
> *[http://oozie-host.examole.com:11000/oozie/test]*
> And it seems this replacement is due to the following rule:
> {code:xml}
>     <rule dir="IN" name="OOZIE/oozie/root" 
> pattern="*://*:*/**/oozie/{**}?{**}">
>         <rewrite template="{$serviceUrl[OOZIE]}/{**}?{**}"/>
>     </rule> 
> {code}
> When I changed it to
> {code:xml}
>     <rule dir="IN" name="OOZIE/oozie/root" 
> pattern="http*://*:*/**/oozie/{**}?{**}">
>         <rewrite template="{$serviceUrl[OOZIE]}/{**}?{**}"/>
>     </rule> 
> {code}
> in my test environment then the Hue UI showed me the correct HDFS path.
>  
> I am creating the pull request soon.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to