Skip to content

[Test] Fix header value assertion for 401 error #83037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 26, 2022

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Jan 25, 2022

The WWW-Authenticate header is multi-valued. In rare cases, the first
value may not be the one beginning with "Basic". The PR makes the
assertion agnostic to the order and also asserts for all possible header
values.

Resolves: #83022

The WWW-Authenticate header is multi-valued. In rare cases, the first
value may not be the one beginning with "Basic". The PR makes the
assertion agnostic to the order and also asserts for all possible header
values.

Resolves: elastic#83022
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v8.1.0 labels Jan 25, 2022
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Jan 25, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ywangd ywangd merged commit c432ef1 into elastic:master Jan 26, 2022
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Feb 1, 2022
The WWW-Authenticate header is multi-valued. In rare cases, the first
value may not be the one beginning with "Basic". The PR makes the
assertion agnostic to the order and also asserts for all possible header
values.

Resolves: elastic#83022
elasticsearchmachine pushed a commit that referenced this pull request Feb 1, 2022
* Fix test in AnonymousUserIntegTests #82977

All test cluster nodes should be using the same value for setting
ANONYMOUS_AUTHORIZATION_EXCEPTION_SETTING.

* [Test] Fix header value assertion for 401 error (#83037)

The WWW-Authenticate header is multi-valued. In rare cases, the first
value may not be the one beginning with "Basic". The PR makes the
assertion agnostic to the order and also asserts for all possible header
values.

Resolves: #83022

Co-authored-by: Albert Zaharovits <albert.zaharovits@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] AnonymousUserIntegTests testAnonymousViaHttp failing
3 participants