Skip to content

Conversation

@ywangd
Copy link
Member

@ywangd ywangd commented May 4, 2022

Changes in this PR enables marking the Authentication class to final in
a future PR as part of the overall plan for closing down Authentication.

Relates: #86206

Changes in this PR enables marking the Authentication class to final in
a future PR as part of the overall plan for closing down Authentication.
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Security/Security Security issues without another label v8.3.0 labels May 4, 2022
@ywangd ywangd requested a review from albertzaharovits May 4, 2022 11:36
@elasticmachine elasticmachine added the Team:Security Meta label for security team label May 4, 2022
@elasticmachine
Copy link
Collaborator

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

@ywangd
Copy link
Member Author

ywangd commented May 5, 2022

@elasticmachine update branch

queryApiKeyRequest.setFilterForCurrentUser();
assertThat(kibanaRole.cluster().check(CreateApiKeyAction.NAME, queryApiKeyRequest, authentication), is(true));
assertThat(kibanaRole.cluster().check(QueryApiKeyAction.NAME, queryApiKeyRequest, authentication), is(true));

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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
Copy link
Member Author

ywangd commented May 6, 2022

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

@ywangd ywangd merged commit 051f971 into elastic:master May 6, 2022
ywangd added a commit to ywangd/elasticsearch that referenced this pull request May 7, 2022
Internal users bypass operator check. So we should not use them for
operator check test.

Relates: elastic#86424
Resolves: elastic#86530
ywangd added a commit to ywangd/elasticsearch that referenced this pull request May 9, 2022
This PR marks the Authentication class to be final which is the last
step of locking down the Authentication class. The Authentication class
is basically a record class and it has internal logics on what values
can or cannot be used together. We don't expect it to be extended by any
subclasses and a concrete object should always be created for tests
instead of mocking.

Relates: elastic#86424
Relates: elastic#86206
ywangd added a commit that referenced this pull request May 17, 2022
Internal users bypass operator check. So we should not use them for
operator check test.

Relates: #86424
Resolves: #86530
ywangd added a commit that referenced this pull request May 17, 2022
This PR marks the Authentication class to be final which is the last
step of locking down the Authentication class. The Authentication class
is basically a record class and it has internal logics on what values
can or cannot be used together. We don't expect it to be extended by any
subclasses and a concrete object should always be created for tests
instead of mocking.

Relates: #86424
Relates: #86206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Security/Security Security issues without another label Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants