You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by Rick Kellogg <rm...@comcast.net> on 2017/06/21 15:14:05 UTC

Apache Tomcat Rewrite Functionality

Greetings,

 

This afternoon I stumbled upon some functionality in Apache Tomcat called
the Rewrite Valve.  It is basically a port of the mod_rewrite module in
Apache HTTP Server.

 

http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html

 

At some point, this might be a good base to extend our existing rewrite
capabilities.  

 

Just a thought.

Rick


Re: Apache Tomcat Rewrite Functionality

Posted by larry mccay <la...@gmail.com>.
I agree and see the following advantages:

* leveraging organizations investment in familiar syntax
* potentially leveraging a library rather than having to maintain our own
rewrite infrastructure

Provided that we can find such a library - or figure out how to wrap a
tomcat valve in a filter - this would be a high impact project.
We should probably spin up JIRA/s and maybe a KIP for it.


On Wed, Jul 5, 2017 at 10:45 PM, Rick Kellogg <rm...@comcast.net> wrote:

> Larry,
>
> At this point, I just don't have the experience with the rewrite
> functionality within Knox or bandwidth to lead the efforts on this.  When I
> stumbled upon the Tomcat module, I just wanted to be sure we gave it a
> look.  Using a familiar technology that IT staff are already familiar with
> has advantages.
>
> Wish I could do more.
> Rick
>
> -----Original Message-----
> From: larry mccay [mailto:lmccay@apache.org]
> Sent: Wednesday, July 5, 2017 12:02 PM
> To: dev@knox.apache.org
> Subject: Re: Apache Tomcat Rewrite Functionality
>
> Hi Rick -
>
> I'm sorry for having missed this when it was sent.
>
> This is a great topic!
>
> I have often though about digging out some of the more standard or well
> known engines and figuring out how it's syntax would affect an existing
> service definition. Especially for the UIs which are really painful at the
> moment.
>
> I've been trying to determine how much benefit we could realize by
> leveraging the port mapping feature to simplify something like the ambariui
> rewrite rules. So far, it looks like we could simplify the URLs by not
> having to prepend "gateway/topology/ to each URL but we sill need to
> prepend "ambari" to each since the actual URL doesn't have such an app
> context and port mapping is at the topology level rather than the service
> level.
>
> Of course, doing port mapping at the service level would require a
> separate topology and port per service which would sort of limit the value
> proposition of Knox in terms of firewall holes.
>
> So, anyway, I would love to see you file a JIRA and do some research -
> maybe start a KIP - to detail:
>
> 1. a design proposal
> 2. an example of migrating something like ambariui rewrite.xml to the new
> syntax 3. how to deal with existing deployments and backward compatibillity
>
> Would you be interesting in starting that ball rolling?
>
> thanks!
>
> --larry
>
> On Wed, Jun 21, 2017 at 11:14 AM, Rick Kellogg <rm...@comcast.net>
> wrote:
>
> > Greetings,
> >
> >
> >
> > This afternoon I stumbled upon some functionality in Apache Tomcat
> > called the Rewrite Valve.  It is basically a port of the mod_rewrite
> > module in Apache HTTP Server.
> >
> >
> >
> > http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html
> >
> >
> >
> > At some point, this might be a good base to extend our existing
> > rewrite capabilities.
> >
> >
> >
> > Just a thought.
> >
> > Rick
> >
> >
>
>

RE: Apache Tomcat Rewrite Functionality

Posted by Rick Kellogg <rm...@comcast.net>.
Larry,

At this point, I just don't have the experience with the rewrite functionality within Knox or bandwidth to lead the efforts on this.  When I stumbled upon the Tomcat module, I just wanted to be sure we gave it a look.  Using a familiar technology that IT staff are already familiar with has advantages.

Wish I could do more.
Rick

-----Original Message-----
From: larry mccay [mailto:lmccay@apache.org] 
Sent: Wednesday, July 5, 2017 12:02 PM
To: dev@knox.apache.org
Subject: Re: Apache Tomcat Rewrite Functionality

Hi Rick -

I'm sorry for having missed this when it was sent.

This is a great topic!

I have often though about digging out some of the more standard or well known engines and figuring out how it's syntax would affect an existing service definition. Especially for the UIs which are really painful at the moment.

I've been trying to determine how much benefit we could realize by leveraging the port mapping feature to simplify something like the ambariui rewrite rules. So far, it looks like we could simplify the URLs by not having to prepend "gateway/topology/ to each URL but we sill need to prepend "ambari" to each since the actual URL doesn't have such an app context and port mapping is at the topology level rather than the service level.

Of course, doing port mapping at the service level would require a separate topology and port per service which would sort of limit the value proposition of Knox in terms of firewall holes.

So, anyway, I would love to see you file a JIRA and do some research - maybe start a KIP - to detail:

1. a design proposal
2. an example of migrating something like ambariui rewrite.xml to the new syntax 3. how to deal with existing deployments and backward compatibillity

Would you be interesting in starting that ball rolling?

thanks!

--larry

On Wed, Jun 21, 2017 at 11:14 AM, Rick Kellogg <rm...@comcast.net>
wrote:

> Greetings,
>
>
>
> This afternoon I stumbled upon some functionality in Apache Tomcat 
> called the Rewrite Valve.  It is basically a port of the mod_rewrite 
> module in Apache HTTP Server.
>
>
>
> http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html
>
>
>
> At some point, this might be a good base to extend our existing 
> rewrite capabilities.
>
>
>
> Just a thought.
>
> Rick
>
>


Re: Apache Tomcat Rewrite Functionality

Posted by larry mccay <lm...@apache.org>.
Hi Rick -

I'm sorry for having missed this when it was sent.

This is a great topic!

I have often though about digging out some of the more standard or well
known engines and figuring out how it's syntax would affect an existing
service definition. Especially for the UIs which are really painful at the
moment.

I've been trying to determine how much benefit we could realize by
leveraging the port mapping feature to simplify something like the ambariui
rewrite rules. So far, it looks like we could simplify the URLs by not
having to prepend "gateway/topology/ to each URL but we sill need to
prepend "ambari" to each since the actual URL doesn't have such an app
context and port mapping is at the topology level rather than the service
level.

Of course, doing port mapping at the service level would require a separate
topology and port per service which would sort of limit the value
proposition of Knox in terms of firewall holes.

So, anyway, I would love to see you file a JIRA and do some research -
maybe start a KIP - to detail:

1. a design proposal
2. an example of migrating something like ambariui rewrite.xml to the new
syntax
3. how to deal with existing deployments and backward compatibillity

Would you be interesting in starting that ball rolling?

thanks!

--larry

On Wed, Jun 21, 2017 at 11:14 AM, Rick Kellogg <rm...@comcast.net>
wrote:

> Greetings,
>
>
>
> This afternoon I stumbled upon some functionality in Apache Tomcat called
> the Rewrite Valve.  It is basically a port of the mod_rewrite module in
> Apache HTTP Server.
>
>
>
> http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html
>
>
>
> At some point, this might be a good base to extend our existing rewrite
> capabilities.
>
>
>
> Just a thought.
>
> Rick
>
>