Skip to content

[6.x] [security] Token auth provider (#26997)#27503

Merged
epixa merged 2 commits intoelastic:6.xfrom
epixa:backport/6.x/pr-26997
Dec 21, 2018
Merged

[6.x] [security] Token auth provider (#26997)#27503
epixa merged 2 commits intoelastic:6.xfrom
epixa:backport/6.x/pr-26997

Conversation

@epixa
Copy link
Contributor

@epixa epixa commented Dec 19, 2018

Backports the following commits to 6.x:

* [security] Token auth provider

From a user perspective, the token provider behaves similarly to the
basic provider in that it can power the native login experience and can
also be used for API calls via the authorization header (albeit with the
Bearer realm).

From a technical perspective, the token provider deals with
authentication via the token service in Elasticsearch, so while it
handles user credentials in the case of login, a temporary, refreshable
access token is stored in the session cookie instead. This means that
when you log out, not only is the cookie invalidated, but the token
itself cannot be reused.

* token provider integration tests

* include token api integration tests by default

* remove unused ProviderOptions from typedef

* assert that valid login sets an authorization header

* unit tests for refresh token and failure cases

* integration tests for headers and sessions

* clean up login/logout tests for consistent setup functions

* test for header rejection scenarios
@epixa epixa added the backport This PR is a backport of another PR label Dec 19, 2018
@elasticmachine

This comment has been minimized.

@epixa

This comment has been minimized.

@epixa

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@epixa epixa merged commit 1fb934b into elastic:6.x Dec 21, 2018
@epixa epixa deleted the backport/6.x/pr-26997 branch December 21, 2018 16:19
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