On 16 May 2015, at 17:41, Ted Yu 
<[email protected]<mailto:[email protected]>> wrote:

Looks like you were reading out of date Slider doc.
amwebfilter is no longer used in current develop branch.


Ted: we just used the standard 
org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter except in the 
special slider 0.70+ mode where you want the back door enabled for two-way REST 
calls

for that we use the
org.apache.slider.server.appmaster.web.rest.InsecureAmFilter


I searched *.md files and didn't find amwebfilter mentioned.


I looked at the REST API v2 
docs<http://slider.incubator.apache.org/docs/api/slider_REST_api_v2.html> and 
we don't call it out there.

To summarise
-every YARN app is required to redirect HTTP requests that don't come from the 
YARN RM proxy, with a redirect URL that points the caller though the proxy.
-the proxy then authenticates the caller's (SPNEGO) credentials. And, on the 
HTML bits of the app web site, does some HTML editing "for security reasons"
-the Slider AM, accordingly, deploys an Http servlet filter to redirect all 
GET/POST/DELETE/* ops which don't come from the IP address of the RM proxy; the 
ASF one sends a 302 back.
-which works, provided the caller is making a GET call. (see: YARN-2031)

For the two-way  REST API to work today as proof of concept, we open a back 
door into the AM filter, SLIDER-710

we mention this in passing in the 0.70 release notes,:

It is impossible to offer a secure two-way REST API in Hadoop 2.6, due to how 
authentication and
security is implemented in the YARN Resource Manager proxy. Therefore even
though a two-way API is partially implemented in the slider code, it is 
explicitly
read only. To enable it, set the property `slider.dev.ws.insecure` to true in
the Slider Application Master. This can be done by setting it in the file
`$SLIDER_CONF_DIR/slider-server.xml`.


Try setting that option and see if your requests work. This is not a fix for 
the problem; it's a back door for us to run functional tests of a REST API 
before YARN lets us


Cheers

On Sat, May 16, 2015 at 6:01 AM, <[email protected]<mailto:[email protected]>> 
wrote:

hello guys:
       i want fix this problem,so i read a lot slider docs, it mentioned
that yarn amwebfilter for redirecting the get request.
but i did not find the yarn amwebfilter class.
could you help me point out that class?


I've just been looking at this on the JIRA; not caught up on the web ... you 
are ahead of me.

This looks like a Jersey upgrade is going to be needed. It's actually probably


Reply via email to