Skip to content

BACKPORT Fix security origin for TokenService#findActiveTokensFor... (#47418)#48280

Merged
albertzaharovits merged 1 commit intoelastic:7.xfrom
albertzaharovits:7x-backport-invalidate-for-user-and-realm
Oct 21, 2019
Merged

BACKPORT Fix security origin for TokenService#findActiveTokensFor... (#47418)#48280
albertzaharovits merged 1 commit intoelastic:7.xfrom
albertzaharovits:7x-backport-invalidate-for-user-and-realm

Conversation

@albertzaharovits
Copy link
Copy Markdown
Contributor

BACKPORT of #47418

All internal searches (triggered by APIs) across the .security index
must be performed while "under the security origin". Otherwise,
the search is performed in the context of the caller which most
likely does not have privileges to search .security (hopefully).
This commit fixes this in the case of two methods in the
TokenService and corrects an overly done such context switch
in the ApiKeyService.

In addition, this makes all tests from the client/rest-high-level
module execute as an all mighty administrator,
but not a literal superuser.

Closes #47151

…47418)

All internal searches (triggered by APIs) across the .security index
must be performed while "under the security origin". Otherwise,
the search is performed in the context of the caller which most
likely does not have privileges to search .security (hopefully).
This commit fixes this in the case of two methods in the
TokenService and corrects an overly done such context switch
in the ApiKeyService.

In addition, this makes all tests from the client/rest-high-level
module execute as an all mighty administrator,
but not a literal superuser.

Closes elastic#47151
@albertzaharovits albertzaharovits self-assigned this Oct 21, 2019
@albertzaharovits albertzaharovits merged commit 69fc715 into elastic:7.x Oct 21, 2019
@albertzaharovits albertzaharovits deleted the 7x-backport-invalidate-for-user-and-realm branch October 21, 2019 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant