[
https://issues.apache.org/jira/browse/KNOX-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17037295#comment-17037295
]
Kevin Risden commented on KNOX-2234:
------------------------------------
{quote}And you do think that the cookie between client and knox is useful for
the second leg between knox and backend?{quote}
In the case of Knox acting as just a proxy, not doing any authenticaiton, yes
Knox HAS to pass through all headers/cookies. This is the same as
Nginx/haproxy. So yes there are valid use cases and whitelisting is the proper
approach to ensure that Knox isn't an open proxy to any backend.
{quote}Don't you think it is wrong to forward the authentication info in the
first leg to the second leg?{quote}
Not sure what you mean by authentication info here.
The authentication information I was referring to was from Knox to the backend.
Knox injects authentication for itself to act as a proxy to the backend. Knox
credentials end up in the AUTHORIZATION header. The request is typically
modified to add the doAs user of the original request. This is in most of the
cases where Knox is a trusted proxy.
In some cases, Knox is just a pass through with no authentication happening at
Knox. This means that Knox is just a pass through proxy and all headers/cookies
are passed through from the client. The backend can ask for credentials and
client provides them. Knox just passes the information along. This allows Knox
to limit open required ports. Just like an Nginx or haproxy.
In both cases, you want to ensure that Knox is not an open proxy and have a
whitelist enabled to prevent arbitrary backend requests.
> Omitting cookie from outbound request header
> --------------------------------------------
>
> Key: KNOX-2234
> URL: https://issues.apache.org/jira/browse/KNOX-2234
> Project: Apache Knox
> Issue Type: Improvement
> Affects Versions: 1.2.0, 1.3.0
> Reporter: James Chen
> Priority: Minor
> Labels: easy-fix
> Attachments: KNOX-2234.patch
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> It is possible for an attacker to directly steal user session information by
> having a user visit or load a URL using Knox, as cookies are forwarded in the
> header on the outbound request. This behavior doesn't seem to serve any
> particular function either, as the endpoint Knox tries to contact shouldn't
> need any authentication by Knox. We suggest that user-Knox cookies should be
> omitted from the outbound request.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)