[ 
https://issues.apache.org/jira/browse/KNOX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Larry McCay updated KNOX-380:
-----------------------------
    Fix Version/s:     (was: 0.5.0)
                   0.6.0

> Rewrite functions should accept multiple parameters and retain param names
> --------------------------------------------------------------------------
>
>                 Key: KNOX-380
>                 URL: https://issues.apache.org/jira/browse/KNOX-380
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 0.4.0
>            Reporter: Kevin Minder
>             Fix For: 0.6.0
>
>
> This came up while trying to implement functions for rewriting a host:port in 
> a RM REST API response body.  The client is supposed to take that host:port 
> and add it to the end of a URL as a path.  So the encrypted needed to turn 
> host:port into a single encrypted value that could be part of the path.  The 
> thinking for the rule was something like this:
> {code}
>  <rule dir="OUT" name="RESOURCEMANAGER/resourcemanager/nodeId/outbound">
>         <match pattern="{host=*}:{port=*}"/>
>         <rewrite template="{$encrypt(host,':', port)}"/>
> </rule>
> {code}
> It looks like this should start with Evaluator and work its way outward.
> {code}
> package org.apache.hadoop.gateway.util.urltemplate;
> import java.util.List;
> public interface Evaluator {
>   //List<String> evaluate( String function, List<String> parameters );
>   List<String> evaluate( String function, List<String> parameters, Resolver 
> resolver );
> }
> {code}
> This would transition the responsibility of resolving the parameter names in 
> List<String> parameters to the function implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to