[ https://issues.apache.org/jira/browse/KNOX-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16686786#comment-16686786 ]
Kevin Risden commented on KNOX-1321: ------------------------------------ Yea agree [~jesus.alv] > Livy service.xml does not apply addusername rule to /batches endpoint > --------------------------------------------------------------------- > > Key: KNOX-1321 > URL: https://issues.apache.org/jira/browse/KNOX-1321 > Project: Apache Knox > Issue Type: Bug > Affects Versions: 0.14.0 > Reporter: Jesus Alvarez > Assignee: Jesus Alvarez > Priority: Major > Fix For: 1.3.0 > > > When a request is made to Livy via Knox today: > 1, Spark Magic sends a JSON body to knox, ex: > {"driverMemory":"2G","executorCores":4,"executorMemory":"8G","proxyUser":"alice"} > 2, Knox's service.xml will rewrite the proxyUser "alice" to the actual > authenticated username: > > {code:java} > <route path="/livy/v1/sessions"> > <rewrite apply="LIVYSERVER/livy/addusername/inbound" to="request.body"/> > </route> > <route path="/livy/v1/**?**"/> > <route path="/livy/v1"/> > <route path="/livy/v1/"/>{code} > > > Using the rewrite.xml rules: > > {code:java} > <rule name="LIVYSERVER/livy/user-name"> > <rewrite template="{$username}"/> > </rule> > <filter name="LIVYSERVER/livy/addusername/inbound"> > <content type="*/json"> > <apply path="$.proxyUser" rule="LIVYSERVER/livy/user-name"/> > </content> > </filter> > {code} > > > The issue here is that requests made to > *knox:port/gateway/topology/livy/v1/batches* will not apply the same rewrite > rule. > > > https://livy.incubator.apache.org/docs/latest/rest-api.html -- This message was sent by Atlassian JIRA (v7.6.3#76005)