[
https://issues.apache.org/jira/browse/KNOX-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17037162#comment-17037162
]
Kevin Risden commented on KNOX-2234:
------------------------------------
[~shanyu] the issue is "forward the request to [anyhost], " - not the cookie
part.
Knox has a dispatch whitelist. If you want to control what host/ports Knox
sends requests to you need to specify a comprehensive whitelist. The default is
domain based, but it takes a list of regexes for more control.
{quote}
gateway.dispatch.whitelist
A semicolon-delimited list of regular expressions for controlling to which
endpoints Knox dispatches and redirects will be permitted. If DEFAULT is
specified, or the property is omitted entirely, then a default domain-based
whitelist will be derived from the Knox host. An empty value means no
dispatches will be permitted.
{quote}
>From https://knox.apache.org/books/knox-1-4-0/user-guide.html
----
For what it is worth, the cookies are the least of the concern. You can have a
malicious backend service steal authentication credentials if you don't
properly configure the whitelist. Even if you block the cookies, the
AUTHORIZATION header is sensitive and required for Knox to work correctly. So
the proper whitelist is the way to ensure that Knox only talks to backends you
want it to - not just any random endpoint.
> 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)