[jira] [Comment Edited] (KNOX-578) Supporting Regex patterns on rewrite patters accross Html Filtering beyon embeded JS
[ https://issues.apache.org/jira/browse/KNOX-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563932#comment-16563932 ] Wei Han edited comment on KNOX-578 at 7/31/18 4:29 PM: --- [~jeffreyr97] [~kminder] Was there a follow up on this JIRA? Looks like I'm facing a similar issue with jobhistory UI, which has the following meta refresh tag: http://hadoopmaster007:19888/jobhistory/logs/hadoopworker3064:8041/container_e50_1529521645530_115338_01_01/container_e50_1529521645530_115338_01_01/];> was (Author: weihan): [~jeffreyr97] [~kminder] Was there a follow up on this JIRA? Looks like I'm facing a similar issue with jobhistory UI, which has the following meta refresh tag: {quote} http://hadoopmaster007:19888/jobhistory/logs/hadoopworker3064:8041/container_e50_1529521645530_115338_01_01/container_e50_1529521645530_115338_01_01/;> {quote} > Supporting Regex patterns on rewrite patters accross Html Filtering beyon > embeded JS > > > Key: KNOX-578 > URL: https://issues.apache.org/jira/browse/KNOX-578 > Project: Apache Knox > Issue Type: Improvement > Components: Server >Affects Versions: 0.7.0 > Environment: All >Reporter: Jeffrey E Rodriguez >Priority: Major > Fix For: Future > > > The reason for the this is that we already have some Regex support > on embedded Javascript but it doesn't seem to work on some other cases like > in Html elements like. > meta element which is used by Yarn UI for example where some > of the UI pages uses them to do a meta refresh. > e.g. > Let say we want the following outbound html content to go through Knox > http://service;> > So we would like to rewrite it to: > http://knox_host:knox_port/gateway/default/service;> > I can match the entire "0; url=http://service; with a rule dir="OUT" > but I don't have control on how to parse the refresh time from the url so if > the page changes tomorrow I respect it in the rewrite. > If Regex would be supported then we could use something like (\d);\s*(.*) to > capture the refresh time in the rule and use > it in the rewrite template. > The case above is a simple one, but having better control through Regex on > how to parse patterns and use matched groups would be desirable. > Kevin Minder, said the following: > "Something like > > Where the rule would be applied to say group(1) of the regex. Might even be > able to build that into the normal with an implied regex=“.*”. > " -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-578) Supporting Regex patterns on rewrite patters accross Html Filtering beyon embeded JS
[ https://issues.apache.org/jira/browse/KNOX-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563932#comment-16563932 ] Wei Han commented on KNOX-578: -- [~jeffreyr97] [~kminder] Was there a follow up on this JIRA? Looks like I'm facing a similar issue with jobhistory UI, which has the following meta refresh tag: {quote} http://hadoopmaster007:19888/jobhistory/logs/hadoopworker3064:8041/container_e50_1529521645530_115338_01_01/container_e50_1529521645530_115338_01_01/;> {quote} > Supporting Regex patterns on rewrite patters accross Html Filtering beyon > embeded JS > > > Key: KNOX-578 > URL: https://issues.apache.org/jira/browse/KNOX-578 > Project: Apache Knox > Issue Type: Improvement > Components: Server >Affects Versions: 0.7.0 > Environment: All >Reporter: Jeffrey E Rodriguez >Priority: Major > Fix For: Future > > > The reason for the this is that we already have some Regex support > on embedded Javascript but it doesn't seem to work on some other cases like > in Html elements like. > meta element which is used by Yarn UI for example where some > of the UI pages uses them to do a meta refresh. > e.g. > Let say we want the following outbound html content to go through Knox > http://service;> > So we would like to rewrite it to: > http://knox_host:knox_port/gateway/default/service;> > I can match the entire "0; url=http://service; with a rule dir="OUT" > but I don't have control on how to parse the refresh time from the url so if > the page changes tomorrow I respect it in the rewrite. > If Regex would be supported then we could use something like (\d);\s*(.*) to > capture the refresh time in the rule and use > it in the rewrite template. > The case above is a simple one, but having better control through Regex on > how to parse patterns and use matched groups would be desirable. > Kevin Minder, said the following: > "Something like > > Where the rule would be applied to say group(1) of the regex. Might even be > able to build that into the normal with an implied regex=“.*”. > " -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1354) Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues
[ https://issues.apache.org/jira/browse/KNOX-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520496#comment-16520496 ] Wei Han commented on KNOX-1354: --- Thanks guys. [~mgaido] Could you please follow up with a Jira for the documentation? Thanks a lot! > Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues > -- > > Key: KNOX-1354 > URL: https://issues.apache.org/jira/browse/KNOX-1354 > Project: Apache Knox > Issue Type: Bug > Components: Server >Affects Versions: 1.1.0 >Reporter: Wei Han >Assignee: Wei Han >Priority: Minor > Fix For: 1.1.0 > > Attachments: KNOX-1354-001.patch, revert.patch > > > As discussed in KNOX-1160, the original fix is not the right way to fix the > UI issues, rather we should use spark.ui.proxyBase. So opening an new issue > to revert KNOX-1160. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (KNOX-1354) Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues
[ https://issues.apache.org/jira/browse/KNOX-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1354: -- Description: As discussed in KNOX-1160, the original fix is not the right way to fix the UI issues, rather we should use spark.ui.proxyBase. So opening an new issue to revert KNOX-1160. was: As discussed in https://issues.apache.org/jira/browse/KNOX-1160, the original fix is not the right way to fix the UI issues, rather we should use spark.ui.proxyBase. So opening an new issue to revert https://issues.apache.org/jira/browse/KNOX-1160. > Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues > -- > > Key: KNOX-1354 > URL: https://issues.apache.org/jira/browse/KNOX-1354 > Project: Apache Knox > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Wei Han >Priority: Minor > Attachments: revert.patch > > > As discussed in KNOX-1160, the original fix is not the right way to fix the > UI issues, rather we should use spark.ui.proxyBase. So opening an new issue > to revert KNOX-1160. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1354) Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues
[ https://issues.apache.org/jira/browse/KNOX-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16509740#comment-16509740 ] Wei Han commented on KNOX-1354: --- [~mgaido] This is the issue to revert KNOX-1160, could you review it? If you can test the patch on your env, that'll be even better. cc [~smore] > Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues > -- > > Key: KNOX-1354 > URL: https://issues.apache.org/jira/browse/KNOX-1354 > Project: Apache Knox > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Wei Han >Priority: Minor > Attachments: revert.patch > > > As discussed in https://issues.apache.org/jira/browse/KNOX-1160, the original > fix is not the right way to fix the UI issues, rather we should use > spark.ui.proxyBase. So opening an new issue to revert > https://issues.apache.org/jira/browse/KNOX-1160. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (KNOX-1354) Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues
[ https://issues.apache.org/jira/browse/KNOX-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1354: -- Attachment: revert.patch > Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues > -- > > Key: KNOX-1354 > URL: https://issues.apache.org/jira/browse/KNOX-1354 > Project: Apache Knox > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Wei Han >Priority: Minor > Attachments: revert.patch > > > As discussed in https://issues.apache.org/jira/browse/KNOX-1160, the original > fix is not the right way to fix the UI issues, rather we should use > spark.ui.proxyBase. So opening an new issue to revert > https://issues.apache.org/jira/browse/KNOX-1160. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (KNOX-1354) Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues
Wei Han created KNOX-1354: - Summary: Revert KNOX-1160 in favor of using spark.ui.proxyBase to solve spark UI issues Key: KNOX-1354 URL: https://issues.apache.org/jira/browse/KNOX-1354 Project: Apache Knox Issue Type: Bug Affects Versions: 1.1.0 Reporter: Wei Han As discussed in https://issues.apache.org/jira/browse/KNOX-1160, the original fix is not the right way to fix the UI issues, rather we should use spark.ui.proxyBase. So opening an new issue to revert https://issues.apache.org/jira/browse/KNOX-1160. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1160) Bug fixes to make spark history UI work
[ https://issues.apache.org/jira/browse/KNOX-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16508826#comment-16508826 ] Wei Han commented on KNOX-1160: --- [~mgaido] Thanks for pointing this out. I'm not an expert on Spark, could you share how/where to set spark.ui.proxyBase to make it work? >From your description, it seem reverting the change makes sense. > Bug fixes to make spark history UI work > --- > > Key: KNOX-1160 > URL: https://issues.apache.org/jira/browse/KNOX-1160 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Priority: Minor > Fix For: 1.1.0 > > Attachments: sparkhistoryui.patch > > > During my test of the spark history UI I found a couple of issues. The > attached patch fixes all of the issues I have seen -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1315) Spark UI urls issue: Jobs, stdout/stderr and threadDump links
[ https://issues.apache.org/jira/browse/KNOX-1315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16504825#comment-16504825 ] Wei Han commented on KNOX-1315: --- Can someone please take a look? > Spark UI urls issue: Jobs, stdout/stderr and threadDump links > - > > Key: KNOX-1315 > URL: https://issues.apache.org/jira/browse/KNOX-1315 > Project: Apache Knox > Issue Type: Bug >Affects Versions: 0.14.0, 1.0.0 >Reporter: Guang Yang >Assignee: Guang Yang >Priority: Major > Fix For: 1.1.0 > > Attachments: KNOX-1315.patch > > > When users get to the SPARK UI page by clicking on the *{{Application > Master}}* link the Yarn application page for running applications, the link > for *Individual job* doesn't work. Also, if users go to *executors* page, the > stdout/stderr and threadDump link don't work as well. > The above issues are at this page > https://host:port/gateway/sandbox/yarn/proxy/application_1525479109400_910288 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (KNOX-1164) bug fix on oozieui rewrite rul
[ https://issues.apache.org/jira/browse/KNOX-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han resolved KNOX-1164. --- Resolution: Invalid > bug fix on oozieui rewrite rul > -- > > Key: KNOX-1164 > URL: https://issues.apache.org/jira/browse/KNOX-1164 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Priority: Major > Fix For: 1.1.0 > > Attachments: 0001-oozieUI-rewrite-rule-fix.patch > > > Fix a bug introduced in https://issues.apache.org/jira/browse/KNOX-1106. The > issue is that pattern is always required at the top level definition > otherwise the rule won't be effective: > https://github.com/apache/knox/blob/5515056406afd48a6b55f4188fe80816c2133744/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java#L92 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1164) bug fix on oozieui rewrite rul
[ https://issues.apache.org/jira/browse/KNOX-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16504824#comment-16504824 ] Wei Han commented on KNOX-1164: --- We might not need this, as knox-1106 was essentially reverted by https://issues.apache.org/jira/browse/KNOX-1172. Closing this for now. > bug fix on oozieui rewrite rul > -- > > Key: KNOX-1164 > URL: https://issues.apache.org/jira/browse/KNOX-1164 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Priority: Major > Fix For: 1.1.0 > > Attachments: 0001-oozieUI-rewrite-rule-fix.patch > > > Fix a bug introduced in https://issues.apache.org/jira/browse/KNOX-1106. The > issue is that pattern is always required at the top level definition > otherwise the rule won't be effective: > https://github.com/apache/knox/blob/5515056406afd48a6b55f4188fe80816c2133744/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java#L92 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (KNOX-1157) Scoped rewrite rules are treated as global rules in some cases
[ https://issues.apache.org/jira/browse/KNOX-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1157: -- Attachment: NewScopedMatcher.patch > Scoped rewrite rules are treated as global rules in some cases > -- > > Key: KNOX-1157 > URL: https://issues.apache.org/jira/browse/KNOX-1157 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Assignee: Wei Han >Priority: Minor > Fix For: 1.1.0 > > Attachments: NewScopedMatcher.patch > > > https://issues.apache.org/jira/browse/KNOX-711 introduced the concept of > 'scope' for rewrite rules. A rewrite rule can be applied to an input url only > if they share the same scope, unless the rule is explicitly defined as > 'global' rules. > However given the following rewrite.xml, and input url "/foo/bar" with role > service-1, the second rule(service-2) will win because the second rule is > more specific, even the scope is different from the input url. > > > > > > > The root cause is the templates for these two rules are different, so in > ScopedMatcher.java(https://github.com/apache/knox/commit/286e02a44dfb5f9ee101007b46bcb8ee47fa62d7#diff-6cffc9c391024e27c73a85ba8e736e60R118), > we don't create a separate matcher and the two rules share the same matcher > object. > My proposal is to change the implementation to create a brand new matcher for > each scope, and store them in a map keyed by scope name. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1157) Scoped rewrite rules are treated as global rules in some cases
[ https://issues.apache.org/jira/browse/KNOX-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470896#comment-16470896 ] Wei Han commented on KNOX-1157: --- [~pzampino] Could you try the new patch attached? > Scoped rewrite rules are treated as global rules in some cases > -- > > Key: KNOX-1157 > URL: https://issues.apache.org/jira/browse/KNOX-1157 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Assignee: Wei Han >Priority: Minor > Fix For: 1.1.0 > > Attachments: NewScopedMatcher.patch > > > https://issues.apache.org/jira/browse/KNOX-711 introduced the concept of > 'scope' for rewrite rules. A rewrite rule can be applied to an input url only > if they share the same scope, unless the rule is explicitly defined as > 'global' rules. > However given the following rewrite.xml, and input url "/foo/bar" with role > service-1, the second rule(service-2) will win because the second rule is > more specific, even the scope is different from the input url. > > > > > > > The root cause is the templates for these two rules are different, so in > ScopedMatcher.java(https://github.com/apache/knox/commit/286e02a44dfb5f9ee101007b46bcb8ee47fa62d7#diff-6cffc9c391024e27c73a85ba8e736e60R118), > we don't create a separate matcher and the two rules share the same matcher > object. > My proposal is to change the implementation to create a brand new matcher for > each scope, and store them in a map keyed by scope name. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (KNOX-1157) Scoped rewrite rules are treated as global rules in some cases
[ https://issues.apache.org/jira/browse/KNOX-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1157: -- Attachment: (was: 0001-bug-fix-use-a-map-to-store-all-rules-in-ScopedMatche.patch) > Scoped rewrite rules are treated as global rules in some cases > -- > > Key: KNOX-1157 > URL: https://issues.apache.org/jira/browse/KNOX-1157 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Assignee: Wei Han >Priority: Minor > Fix For: 1.1.0 > > Attachments: NewScopedMatcher.patch > > > https://issues.apache.org/jira/browse/KNOX-711 introduced the concept of > 'scope' for rewrite rules. A rewrite rule can be applied to an input url only > if they share the same scope, unless the rule is explicitly defined as > 'global' rules. > However given the following rewrite.xml, and input url "/foo/bar" with role > service-1, the second rule(service-2) will win because the second rule is > more specific, even the scope is different from the input url. > > > > > > > The root cause is the templates for these two rules are different, so in > ScopedMatcher.java(https://github.com/apache/knox/commit/286e02a44dfb5f9ee101007b46bcb8ee47fa62d7#diff-6cffc9c391024e27c73a85ba8e736e60R118), > we don't create a separate matcher and the two rules share the same matcher > object. > My proposal is to change the implementation to create a brand new matcher for > each scope, and store them in a map keyed by scope name. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KNOX-1157) Scoped rewrite rules are treated as global rules in some cases
[ https://issues.apache.org/jira/browse/KNOX-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470830#comment-16470830 ] Wei Han commented on KNOX-1157: --- [~pzampino] sure. > Scoped rewrite rules are treated as global rules in some cases > -- > > Key: KNOX-1157 > URL: https://issues.apache.org/jira/browse/KNOX-1157 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Assignee: Wei Han >Priority: Minor > Fix For: 1.1.0 > > Attachments: > 0001-bug-fix-use-a-map-to-store-all-rules-in-ScopedMatche.patch > > > https://issues.apache.org/jira/browse/KNOX-711 introduced the concept of > 'scope' for rewrite rules. A rewrite rule can be applied to an input url only > if they share the same scope, unless the rule is explicitly defined as > 'global' rules. > However given the following rewrite.xml, and input url "/foo/bar" with role > service-1, the second rule(service-2) will win because the second rule is > more specific, even the scope is different from the input url. > > > > > > > The root cause is the templates for these two rules are different, so in > ScopedMatcher.java(https://github.com/apache/knox/commit/286e02a44dfb5f9ee101007b46bcb8ee47fa62d7#diff-6cffc9c391024e27c73a85ba8e736e60R118), > we don't create a separate matcher and the two rules share the same matcher > object. > My proposal is to change the implementation to create a brand new matcher for > each scope, and store them in a map keyed by scope name. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (KNOX-1164) bug fix on oozieui rewrite rul
Wei Han created KNOX-1164: - Summary: bug fix on oozieui rewrite rul Key: KNOX-1164 URL: https://issues.apache.org/jira/browse/KNOX-1164 Project: Apache Knox Issue Type: Bug Reporter: Wei Han Attachments: 0001-oozieUI-rewrite-rule-fix.patch Fix a bug introduced in https://issues.apache.org/jira/browse/KNOX-1106. The issue is that pattern is always required at the top level definition otherwise the rule won't be effective: https://github.com/apache/knox/blob/5515056406afd48a6b55f4188fe80816c2133744/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java#L92 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (KNOX-1160) Bug fixes to make spark history UI work
Wei Han created KNOX-1160: - Summary: Bug fixes to make spark history UI work Key: KNOX-1160 URL: https://issues.apache.org/jira/browse/KNOX-1160 Project: Apache Knox Issue Type: Bug Reporter: Wei Han Priority: Minor Attachments: sparkhistoryui.patch During my test of the spark history UI I found a couple of issues. The attached patch fixes all of the issues I have seen -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (KNOX-1157) Scoped rewrite rules are treated as global rules in some cases
[ https://issues.apache.org/jira/browse/KNOX-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1157: -- Status: Patch Available (was: Open) > Scoped rewrite rules are treated as global rules in some cases > -- > > Key: KNOX-1157 > URL: https://issues.apache.org/jira/browse/KNOX-1157 > Project: Apache Knox > Issue Type: Bug >Reporter: Wei Han >Assignee: Sumit Gupta >Priority: Minor > Attachments: > 0001-bug-fix-use-a-map-to-store-all-rules-in-ScopedMatche.patch > > > https://issues.apache.org/jira/browse/KNOX-711 introduced the concept of > 'scope' for rewrite rules. A rewrite rule can be applied to an input url only > if they share the same scope, unless the rule is explicitly defined as > 'global' rules. > However given the following rewrite.xml, and input url "/foo/bar" with role > service-1, the second rule(service-2) will win because the second rule is > more specific, even the scope is different from the input url. > > > > > > > The root cause is the templates for these two rules are different, so in > ScopedMatcher.java(https://github.com/apache/knox/commit/286e02a44dfb5f9ee101007b46bcb8ee47fa62d7#diff-6cffc9c391024e27c73a85ba8e736e60R118), > we don't create a separate matcher and the two rules share the same matcher > object. > My proposal is to change the implementation to create a brand new matcher for > each scope, and store them in a map keyed by scope name. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (KNOX-1157) Scoped rewrite rules are treated as global rules in some cases
Wei Han created KNOX-1157: - Summary: Scoped rewrite rules are treated as global rules in some cases Key: KNOX-1157 URL: https://issues.apache.org/jira/browse/KNOX-1157 Project: Apache Knox Issue Type: Bug Reporter: Wei Han Assignee: Sumit Gupta Priority: Minor Attachments: 0001-bug-fix-use-a-map-to-store-all-rules-in-ScopedMatche.patch https://issues.apache.org/jira/browse/KNOX-711 introduced the concept of 'scope' for rewrite rules. A rewrite rule can be applied to an input url only if they share the same scope, unless the rule is explicitly defined as 'global' rules. However given the following rewrite.xml, and input url "/foo/bar" with role service-1, the second rule(service-2) will win because the second rule is more specific, even the scope is different from the input url. The root cause is the templates for these two rules are different, so in ScopedMatcher.java(https://github.com/apache/knox/commit/286e02a44dfb5f9ee101007b46bcb8ee47fa62d7#diff-6cffc9c391024e27c73a85ba8e736e60R118), we don't create a separate matcher and the two rules share the same matcher object. My proposal is to change the implementation to create a brand new matcher for each scope, and store them in a map keyed by scope name. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (KNOX-1106) Tighten the rewrite rule on oozieui to reduce false positives
Wei Han created KNOX-1106: - Summary: Tighten the rewrite rule on oozieui to reduce false positives Key: KNOX-1106 URL: https://issues.apache.org/jira/browse/KNOX-1106 Project: Apache Knox Issue Type: Bug Components: Server Affects Versions: 0.14.0 Reporter: Wei Han Assignee: Sandeep More Fix For: 0.14.0 Attachments: 0001-Tighten-the-rewrite-rule-on-oozieui-to-reduce-false-.patch Currently oozieui rule will match uri with any scheme, which sometimes could cause false positives. For example the following rule in oozieui will rewrite viewfs://ns-default/foo/bar/oozie/myfile.jar to http://oozie:11000/oozie/myfile.jar The attached patch will tighten the rule to match only http and https schemes. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (KNOX-1097) Document option to preserve original string when lookup fails in regex based identity assertion provider
[ https://issues.apache.org/jira/browse/KNOX-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16238138#comment-16238138 ] Wei Han commented on KNOX-1097: --- Thanks a lot Sandeep > Document option to preserve original string when lookup fails in regex based > identity assertion provider > > > Key: KNOX-1097 > URL: https://issues.apache.org/jira/browse/KNOX-1097 > Project: Apache Knox > Issue Type: Bug > Components: Site >Reporter: Sandeep More >Assignee: Sandeep More >Priority: Minor > Fix For: 0.14.0 > > > Document option to preserve original string when lookup fails in regex based > identity assertion provider which went in as part of KNOX-1078 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (KNOX-1078) Add option to preserve original string when lookup fails in regex based identity assertion provider
[ https://issues.apache.org/jira/browse/KNOX-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1078: -- Description: Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. {code:java} identity-assertion Regex true input (.*)@(.*?)\..* output {1}_{[2]} lookup us=USA;ca=CANADA {code} mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk was: Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. bq. bq. identity-assertion bq. Regex bq. true bq. bq. input bq. (.*)@(.*?)\..* bq. bq. bq. output bq. {1}_{[2]} bq. bq. bq. lookup bq. us=USA;ca=CANADA bq. bq. mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk > Add option to preserve original string when lookup fails in regex based > identity assertion provider > --- > > Key: KNOX-1078 > URL: https://issues.apache.org/jira/browse/KNOX-1078 > Project: Apache Knox > Issue Type: Improvement > Components: Server >Affects Versions: 0.11.0 >Reporter: Wei Han >Priority: Minor > Fix For: 0.12.0 > > Attachments: > 0001-RegexIdentityAssertionFilter-add-an-option-to-preser.patch > > > Currently the Regex identify-assertion supports 'lookup' feature. When the > output matches any of the strings in the 'lookup' dictionary, it'll replace > the string with the new value. If there's no match, it'll replace the > original string with empty string. > {code:java} > > identity-assertion > Regex > true > > input > (.*)@(.*?)\..* > > > output > {1}_{[2]} > > > lookup > us=USA;ca=CANADA > > > {code} > mem...@us.apache.org will be translated to /user/member_USA > mem...@ca.apache.org will be translated to /user/member_CANADA > mem...@uk.apache.org will be translated to /user/member_ > This patch adds an optional field use.original.on.lookup.failure. If sets to > true(defaults to false), it'll preserve the original string if there's no > match. So after this patch, > mem...@uk.apache.org will be translated to /user/member_uk -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (KNOX-1078) Add option to preserve original string when lookup fails in regex based identity assertion provider
[ https://issues.apache.org/jira/browse/KNOX-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1078: -- Description: Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. bq. bq. identity-assertion bq. Regex bq. true bq. bq. input bq. (.*)@(.*?)\..* bq. bq. bq. output bq. {1}_{[2]} bq. bq. bq. lookup bq. us=USA;ca=CANADA bq. bq. mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk was: Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. identity-assertion Regex true input (.*)@(.*?)\..* output {1}_{[2]} lookup us=USA;ca=CANADA mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk > Add option to preserve original string when lookup fails in regex based > identity assertion provider > --- > > Key: KNOX-1078 > URL: https://issues.apache.org/jira/browse/KNOX-1078 > Project: Apache Knox > Issue Type: Improvement > Components: Server >Affects Versions: 0.11.0 >Reporter: Wei Han >Priority: Minor > Fix For: 0.12.0 > > Attachments: > 0001-RegexIdentityAssertionFilter-add-an-option-to-preser.patch > > > Currently the Regex identify-assertion supports 'lookup' feature. When the > output matches any of the strings in the 'lookup' dictionary, it'll replace > the string with the new value. If there's no match, it'll replace the > original string with empty string. > bq. > bq. identity-assertion > bq. Regex > bq. true > bq. > bq. input > bq. (.*)@(.*?)\..* > bq. > bq. > bq. output > bq. {1}_{[2]} > bq. > bq. > bq. lookup > bq. us=USA;ca=CANADA > bq. > bq. > mem...@us.apache.org will be translated to /user/member_USA > mem...@ca.apache.org will be translated to /user/member_CANADA > mem...@uk.apache.org will be translated to /user/member_ > This patch adds an optional field use.original.on.lookup.failure. If sets to > true(defaults to false), it'll preserve the original string if there's no > match. So after this patch, > mem...@uk.apache.org will be translated to /user/member_uk -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (KNOX-1078) Add option to preserve original string when lookup fails in regex based identity assertion provider
[ https://issues.apache.org/jira/browse/KNOX-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Han updated KNOX-1078: -- Description: Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. identity-assertion Regex true input (.*)@(.*?)\..* output {1}_{[2]} lookup us=USA;ca=CANADA mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk was: Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. ?? identity-assertion Regex true input (.*)@(.*?)\..* output {1}_{[2]} lookup us=USA;ca=CANADA ?? mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk > Add option to preserve original string when lookup fails in regex based > identity assertion provider > --- > > Key: KNOX-1078 > URL: https://issues.apache.org/jira/browse/KNOX-1078 > Project: Apache Knox > Issue Type: Improvement > Components: Server >Affects Versions: 0.11.0 >Reporter: Wei Han >Priority: Minor > Fix For: 0.12.0 > > Attachments: > 0001-RegexIdentityAssertionFilter-add-an-option-to-preser.patch > > > Currently the Regex identify-assertion supports 'lookup' feature. When the > output matches any of the strings in the 'lookup' dictionary, it'll replace > the string with the new value. If there's no match, it'll replace the > original string with empty string. > > identity-assertion > Regex > true > > input > (.*)@(.*?)\..* > > > output > {1}_{[2]} > > > lookup > us=USA;ca=CANADA > > > mem...@us.apache.org will be translated to /user/member_USA > mem...@ca.apache.org will be translated to /user/member_CANADA > mem...@uk.apache.org will be translated to /user/member_ > This patch adds an optional field use.original.on.lookup.failure. If sets to > true(defaults to false), it'll preserve the original string if there's no > match. So after this patch, > mem...@uk.apache.org will be translated to /user/member_uk -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (KNOX-1078) Add option to preserve original string when lookup fails in regex based identity assertion provider
Wei Han created KNOX-1078: - Summary: Add option to preserve original string when lookup fails in regex based identity assertion provider Key: KNOX-1078 URL: https://issues.apache.org/jira/browse/KNOX-1078 Project: Apache Knox Issue Type: Improvement Components: Server Affects Versions: 0.11.0 Reporter: Wei Han Priority: Minor Fix For: 0.12.0 Attachments: 0001-RegexIdentityAssertionFilter-add-an-option-to-preser.patch Currently the Regex identify-assertion supports 'lookup' feature. When the output matches any of the strings in the 'lookup' dictionary, it'll replace the string with the new value. If there's no match, it'll replace the original string with empty string. ?? identity-assertion Regex true input (.*)@(.*?)\..* output {1}_{[2]} lookup us=USA;ca=CANADA ?? mem...@us.apache.org will be translated to /user/member_USA mem...@ca.apache.org will be translated to /user/member_CANADA mem...@uk.apache.org will be translated to /user/member_ This patch adds an optional field use.original.on.lookup.failure. If sets to true(defaults to false), it'll preserve the original string if there's no match. So after this patch, mem...@uk.apache.org will be translated to /user/member_uk -- This message was sent by Atlassian JIRA (v6.4.14#64029)