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] Add "always denied" network access checks #119867

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

ldematte
Copy link
Contributor

@ldematte ldematte commented Jan 9, 2025

These are always denied because a) they set global things/they can change the behaviour of how things are handled or b) were are always denied today in our SM configuration.

@ldematte ldematte added >non-issue :Core/Infra/Core Core issues without another label 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 9, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jan 9, 2025
@elasticsearchmachine
Copy link
Collaborator

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


session.getSessionContext();
} catch (IOException e) {
throw new RuntimeException(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

It occurs to me that if we changed CheckAction to take a version of Runnable that allows exceptions, we could remove all these re-throws.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ummm... good idea. I'll do that in my other open PR to avoid churn on this one.

@SuppressWarnings("deprecation")
private static void createURLWithURLStreamHandler2() {
try {
var x = new URL(null, "spec", new URLStreamHandler() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we forbidding people from making URLs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are forbidding only making URls with a specific, custom stream handler. This has a special permission in SM, that's why these 2 ctors arrived on our radar.

@ldematte ldematte merged commit d3a1d9b into elastic:main Jan 13, 2025
21 checks passed
@ldematte ldematte deleted the entitlements/net-permission-2 branch January 13, 2025 08:26
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

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 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.

3 participants