Skip to content

[7.x] Add an optional authentication mode for HTTP resources (#58589)#59614

Merged
mshustov merged 1 commit intoelastic:7.xfrom
mshustov:backport/7.x/pr-58589
Mar 7, 2020
Merged

[7.x] Add an optional authentication mode for HTTP resources (#58589)#59614
mshustov merged 1 commit intoelastic:7.xfrom
mshustov:backport/7.x/pr-58589

Conversation

@mshustov
Copy link
Copy Markdown
Contributor

@mshustov mshustov commented Mar 7, 2020

Backports the following commits to 7.x:

* add authRequred: 'optional'

* expose auth status via request context

* update security plugin to use notHandled auth outcome

* capabilities service uses optional auth

* update tests

* attach security headers only to unauthorised response

* add isAuthenticated tests for 'optional' auth mode

* security plugin relies on http.auth.isAuthenticated to calc capabilities

* generate docs

* reword test suit names

* update tests

* update test checking isAuth on optional auth path

* address Oleg comments

* add test for auth: try

* fix

* pass isAuthenticted as boolean via context

* remove response header from notHandled

* update docs

* add redirected for auth interceptor

* security plugin uses t.redirected to be compat with auth: optional

* update docs

* require location header in the interface

* address comments #1

* declare isAuthenticated on KibanaRequest

* remove auth.isAuthenticated from scope

* update docs

* remove unnecessary comment

* do not fail on FakrRequest

* small improvements
@mshustov mshustov added the backport This PR is a backport of another PR label Mar 7, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@mshustov mshustov merged commit 1582299 into elastic:7.x Mar 7, 2020
@mshustov mshustov deleted the backport/7.x/pr-58589 branch March 7, 2020 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants