Thanks Wei and Sandeep to be on top of it.
Wei, One option could be to resolve the issue for Oozie first in one JIRA. And
then create a ticket for other UI's.
On Friday, October 27, 2017, 9:58:49 AM PDT, Wei Han <[email protected]>
wrote:
viewfs is not the original request, I guess it's part of a html body.
Yes this can definitely work, I can provide a patch for oozie. However this
sounds like a potential issue for a lot of services(like yarnui, etc), should
we change all of them?
On Fri, Oct 27, 2017 at 6:37 AM, Sandeep More <[email protected]> wrote:
Hello Wei Han,
Do you send 'viewfs://' as a request (like http) ?
Also, there could be a chance that the protocol could be http or https, so I
think it would be better to handle both in the rewrite rules, for e.g.
<rule name="test-rule-with-complex- flow" flow="OR">
<match pattern="http://*:*/**/oozie/" >
<rewrite template="{$serviceUrl[ OOZIEUI]}/"/>
</match>
<match pattern="https://*:*/**/oozie/ ">
<rewrite template="{$serviceUrl[ OOZIEUI]}/"/>
</match>
</rule>
There could be a better way to handle this, if anyone knows please let me know !
Best,Sandeep
On Fri, Oct 27, 2017 at 1:15 AM, Wei Han <[email protected]> wrote:
We have seen some false positives with the current rewrite rules. For example
the following rule in oozieui will rewrite viewfs://ns-default/foo/bar/oo
zie/myfile.jar to http://oozie:11000/oozie/myfil e.jar
<rule dir="IN" name="OOZIEUI/oozie/inbound/ro ot" pattern="*://*:*/**/oozie/">
<rewrite template="{$serviceUrl[OOZIEUI ]}/"/>
</rule>
The reason is the ** before 'oozie' in the pattern can match any number of
paths, however in reality any valid url(like https://localhost:844
3/gateway/sandbox/oozie/v1/job s?action=start) should only have two paths
before 'oozie', so can we change the pattern to "*://*:*/*/*/oozie/" (note the
extra slash I added between the stars)?
Another option is to make the scheme explicit in the patter, for example:
https://*:*/**/oozie/
Thanks.