Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
0.14.0
-
None
-
None
-
None
Description
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:
<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/"/>
Using the rewrite.xml rules:
<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>
The issue here is that requests made to knox:port/gateway/topology/livy/v1/batches will not apply the same rewrite rule.
Attachments
Issue Links
- Is contained by
-
KNOX-1098 Livy proxyUser should be added when not present
- Closed