Skip to content

KNOX-2026 - Accept Impala's authentication cookies#161

Merged
risdenk merged 1 commit intoapache:masterfrom
twmarshall:KNOX-2026
Oct 9, 2019
Merged

KNOX-2026 - Accept Impala's authentication cookies#161
risdenk merged 1 commit intoapache:masterfrom
twmarshall:KNOX-2026

Conversation

@twmarshall
Copy link
Contributor

This patch modifies HadoopAuthCookieStore to accept cookies with
Impala's cookie name, "impala.auth".

It also updates a check that is used to ensure the cookie belongs to
Knox - previously, this check parsed the cookie according to the
specific format that Hadoop uses for its cookies and ensures that the
Knox principal appears in the expected location.

Impala uses a similar cookie format, but with a few changes such as
fields being in a different order. The check is made more permissive
such that it will accept any cookie that contains the Knox principal
anywhere in it.

Testing:

  • Deployed in a cluster and verified that Knox accepts and returns
    Impala's cookies as expected.

This patch modifies HadoopAuthCookieStore to accept cookies with
Impala's cookie name, "impala.auth".

It also updates a check that is used to ensure the cookie belongs to
Knox - previously, this check parsed the cookie according to the
specific format that Hadoop uses for its cookies and ensures that the
Knox principal appears in the expected location.

Impala uses a similar cookie format, but with a few changes such as
fields being in a different order. The check is made more permissive
such that it will accept any cookie that contains the Knox principal
anywhere in it.

Testing:
- Deployed in a cluster and verified that Knox accepts and returns
  Impala's cookies as expected.

Change-Id: Ib6c92b801a0182c8087f3f9e99c59f7311f2641b
@twmarshall
Copy link
Contributor Author

@pzampino could you possible take a look? You appear to have implemented the check in the first place in KNOX-1341. Thanks

@risdenk
Copy link
Contributor

risdenk commented Oct 4, 2019

Change looks good to me. Limited to only the 3 cookies that Knox will check anyway. Waiting on @pzampino to review as well

@risdenk risdenk self-assigned this Oct 9, 2019
@risdenk risdenk merged commit f7acac9 into apache:master Oct 9, 2019
@risdenk risdenk changed the title KNOX-2026: Accept Impala's authentication cookies KNOX-2026 - Accept Impala's authentication cookies Oct 9, 2019
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
…e#161)

This patch modifies HadoopAuthCookieStore to accept cookies with
Impala's cookie name, "impala.auth".

It also updates a check that is used to ensure the cookie belongs to
Knox - previously, this check parsed the cookie according to the
specific format that Hadoop uses for its cookies and ensures that the
Knox principal appears in the expected location.

Impala uses a similar cookie format, but with a few changes such as
fields being in a different order. The check is made more permissive
such that it will accept any cookie that contains the Knox principal
anywhere in it.

Testing:
- Deployed in a cluster and verified that Knox accepts and returns
  Impala's cookies as expected.

Signed-off-by: Kevin Risden <krisden@cloudera.com>
Change-Id: Id366c2d54ad1da997d6b1f22d230e01ccdee6417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants