Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented Feb 8, 2025

This commit adds instrumentation for File methods that require write permission. No server or plugins use these methods, so no policy changes were necessary. Note that since we are not planning to restrict temp file creation, the bootstrap self test on file writing was removed, which failed with these changes.

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
@rjernst rjernst added :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 labels Feb 8, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Feb 8, 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.

Looks good, but I'd test this with test-entitlements just to be sure any of these do not need other policy adjustments.
Also, can you add "relates to ES-10790" or similar to the description? (Its' the task for File).

@rjernst
Copy link
Member Author

rjernst commented Feb 10, 2025

@elasticmachine update branch

"org.elasticsearch.nativeaccess",
List.of(
new LoadNativeLibrariesEntitlement(),
new FilesEntitlement(Arrays.asList(dataDirs).stream().map(d -> new FileData(d.toString(), READ_WRITE)).toList())
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Arrays.stream(dataDirs).map(d -> new FileData(d.toString(), READ_WRITE)).toList()

Copy link
Member Author

Choose a reason for hiding this comment

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

done

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 thanks!

@rjernst rjernst merged commit 5f00b64 into elastic:main Feb 12, 2025
22 checks passed
@rjernst rjernst deleted the entitlements/file_write_methods branch February 12, 2025 14:20
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Feb 12, 2025
)

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Feb 12, 2025
)

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Feb 12, 2025
)

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18
8.x
9.0

elasticsearchmachine pushed a commit that referenced this pull request Feb 12, 2025
…122389)

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
elasticsearchmachine pushed a commit that referenced this pull request Feb 12, 2025
…122387)

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
elasticsearchmachine pushed a commit that referenced this pull request Feb 12, 2025
…122388)

This commit adds instrumentation for File methods that require write
permission. No server or plugins use these methods, so no policy changes
were necessary. Note that since we are not planning to restrict temp
file creation, the bootstrap self test on file writing was removed,
which failed with these changes.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Feb 13, 2025
This commit adds instrumentation for File methods that require read permissions.

see elastic#122109 for the write side
rjernst added a commit that referenced this pull request Feb 17, 2025
This commit adds instrumentation for File methods that require read permissions.

see #122109 for the write side
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Feb 17, 2025
)

This commit adds instrumentation for File methods that require read permissions.

see elastic#122109 for the write side
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Feb 17, 2025
)

This commit adds instrumentation for File methods that require read permissions.

see elastic#122109 for the write side
elasticsearchmachine pushed a commit that referenced this pull request Feb 17, 2025
…122786)

This commit adds instrumentation for File methods that require read permissions.

see #122109 for the write side
elasticsearchmachine pushed a commit that referenced this pull request Feb 17, 2025
…122787)

This commit adds instrumentation for File methods that require read permissions.

see #122109 for the write side
mosche pushed a commit to mosche/elasticsearch that referenced this pull request Feb 18, 2025
)

This commit adds instrumentation for File methods that require read permissions.

see elastic#122109 for the write side

(cherry picked from commit bf1cbb0)

# Conflicts:
#	x-pack/plugin/security/src/main/plugin-metadata/entitlement-policy.yaml
elasticsearchmachine pushed a commit that referenced this pull request Feb 18, 2025
…122862)

This commit adds instrumentation for File methods that require read permissions.

see #122109 for the write side

(cherry picked from commit bf1cbb0)

# Conflicts:
#	x-pack/plugin/security/src/main/plugin-metadata/entitlement-policy.yaml

Co-authored-by: Ryan Ernst <[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 >refactoring 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.

4 participants