You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Risden (JIRA)" <ji...@apache.org> on 2018/11/15 13:30:01 UTC
[jira] [Resolved] (KNOX-1321) Livy service.xml does not apply
addusername rule to /batches endpoint
[ https://issues.apache.org/jira/browse/KNOX-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Risden resolved KNOX-1321.
--------------------------------
Resolution: Duplicate
Assignee: Kevin Risden (was: Jesus Alvarez)
Contained by KNOX-1098
> 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: Kevin Risden
> Priority: Major
>
> 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)