Skip to content
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

Support swapping the user context to the secondary auth user for named actions #106613

Merged
merged 17 commits into from
Apr 4, 2024

Conversation

jakelandis
Copy link
Contributor

@jakelandis jakelandis commented Mar 21, 2024

This commit adds the ability to define specific actions that are required to be executed as the secondary authenticated user. When actions are defined as secondary auth actions, then the secondary authentication headers (and subsequent authentication) are required to call those actions and the authorization is based on the secondary user. The SPI hook to define which actions are required is intended for internal only use only.

@jakelandis jakelandis added >enhancement :Security/Security Security issues without another label >non-issue and removed WIP >enhancement labels Apr 1, 2024
@jakelandis jakelandis marked this pull request as ready for review April 1, 2024 20:28
@jakelandis jakelandis requested a review from a team as a code owner April 1, 2024 20:28
@elasticsearchmachine elasticsearchmachine added the Team:Security Meta label for security team label Apr 1, 2024
@elasticsearchmachine
Copy link
Collaborator

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


public class SecondaryAuthActionsPlugin extends Plugin implements SecondaryAuthActions {
public Set<String> get() {
return Set.of("cluster:admin/xpack/security/user/authenticate", "indices:admin/get");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note - this is a test only plugin.

@albertzaharovits albertzaharovits self-requested a review April 3, 2024 10:59
@jakelandis
Copy link
Contributor Author

jakelandis commented Apr 3, 2024

@elasticmachine run elasticsearch-ci/part-1-fips

(failure instance of #106752)

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

@jakelandis jakelandis merged commit 08ad143 into elastic:main Apr 4, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Security/Security Security issues without another label Team:Security Meta label for security team v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants