Skip to content

Conversation

@prdoyle
Copy link
Contributor

@prdoyle prdoyle commented Jan 31, 2025

It's important to ensure that reflective invocation of sensitive methods is protected the same way as ordinary invocation. This is achieved by skipping reflective frames when doing the stack walk.

This PR adds two kinds of tests to ensure this is working:

  1. Some IT tests for static, nonstatic, and constructor cases
  2. Some bootstrap self-tests for allowed and denied cases

See ES-9567.

@prdoyle prdoyle added >non-issue :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged test-entitlements v8.18.1 v8.19.0 v9.0.1 v9.1.0 labels Jan 31, 2025
@prdoyle prdoyle self-assigned this Jan 31, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jan 31, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

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

LGTM, one line to check and one optional suggestion

@prdoyle prdoyle requested a review from a team as a code owner January 31, 2025 16:49
@prdoyle prdoyle enabled auto-merge (squash) January 31, 2025 17:59
@prdoyle prdoyle merged commit 38a3844 into elastic:main Jan 31, 2025
21 checks passed
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request Jan 31, 2025
* Entitlement IT cases for reflection

* EntitlementBootstrap selfTest using reflection

* Remove errant logging setting

* Lambdas instead of booleans

* [CI] Auto commit changes from spotless

* Refactor: Extract lambdas to method refs

---------

Co-authored-by: elasticsearchmachine <[email protected]>
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request Jan 31, 2025
* Entitlement IT cases for reflection

* EntitlementBootstrap selfTest using reflection

* Remove errant logging setting

* Lambdas instead of booleans

* [CI] Auto commit changes from spotless

* Refactor: Extract lambdas to method refs

---------

Co-authored-by: elasticsearchmachine <[email protected]>
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request Jan 31, 2025
* Entitlement IT cases for reflection

* EntitlementBootstrap selfTest using reflection

* Remove errant logging setting

* Lambdas instead of booleans

* [CI] Auto commit changes from spotless

* Refactor: Extract lambdas to method refs

---------

Co-authored-by: elasticsearchmachine <[email protected]>
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18
8.x
9.0

@prdoyle prdoyle deleted the reflection-tests branch January 31, 2025 18:44
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
* Entitlement IT cases for reflection

* EntitlementBootstrap selfTest using reflection

* Remove errant logging setting

* Lambdas instead of booleans

* [CI] Auto commit changes from spotless

* Refactor: Extract lambdas to method refs

---------

Co-authored-by: elasticsearchmachine <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
* Entitlement IT cases for reflection

* EntitlementBootstrap selfTest using reflection

* Remove errant logging setting

* Lambdas instead of booleans

* [CI] Auto commit changes from spotless

* Refactor: Extract lambdas to method refs

---------

Co-authored-by: elasticsearchmachine <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
* Entitlement IT cases for reflection

* EntitlementBootstrap selfTest using reflection

* Remove errant logging setting

* Lambdas instead of booleans

* [CI] Auto commit changes from spotless

* Refactor: Extract lambdas to method refs

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v8.18.1 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants