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

[Entitlements] Refactor Network Entitlement #120391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ldematte
Copy link
Contributor

@ldematte ldematte commented Jan 17, 2025

This PR introduces specific Inbound (listen/accept/receive) and Outbound (connect/send) network entitlements, in place of the current NetworkEntitlement with actions.

Some changes are almost 1-1, with the exception of listen (bind): the SecurityManager "listen" permission is applied to every bind function (sometimes indirectly from a ctor); on server or datagram sockets, this should be thought as an inbound operation; on client sockets, it should not. I changed the checks and policies to reflect that.

Additional changes:

  • removal of the instrumentation of HttpClientBuilderImpl#bind, as discussed during this PR review
  • addition of missing checks in a second implementation of HttpClient#send/sendAsync

Relates to ES-10355

@ldematte ldematte added :Core/Infra/Core Core issues without another label >refactoring auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 test-entitlements Trigger CI checks using security manager replacement labels Jan 17, 2025
@ldematte ldematte requested review from rjernst and prdoyle January 17, 2025 14:44
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jan 17, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@ldematte ldematte requested review from mosche and jdconrad January 17, 2025 14:44
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 >refactoring Team:Core/Infra Meta label for core/infra team test-entitlements Trigger CI checks using security manager replacement v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants