Skip to content

Conversation

@ldematte
Copy link
Contributor

With #124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"

@ldematte ldematte added >non-issue auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 :Core/Infra/Entitlements Entitlements infrastructure labels Mar 17, 2025
@ldematte ldematte requested a review from a team as a code owner March 17, 2025 11:44
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Mar 17, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

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

Any reason to keep these separate?

    private static final String PLUGIN_POLICY_OVERRIDE_PREFIX = "es.entitlements.policy.";
    private static final String SERVER_POLICY_OVERRIDE = "es.entitlements.server_policy";

One thing less to remember if using the same property pattern for both.

@ldematte
Copy link
Contributor Author

@mosche made the keys uniform too

@ldematte ldematte requested a review from mosche March 18, 2025 08:23
Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

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

Thanks @ldematte , LGTM

@ldematte ldematte enabled auto-merge (squash) March 18, 2025 08:43
@ldematte ldematte merged commit d20528b into elastic:main Mar 18, 2025
17 checks passed
ldematte added a commit to ldematte/elasticsearch that referenced this pull request Mar 18, 2025
…5011)

With elastic#124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
@ldematte ldematte deleted the entitlements/policy-override-plugins-2 branch March 18, 2025 11:03
ldematte added a commit to ldematte/elasticsearch that referenced this pull request Mar 18, 2025
…5011)

With elastic#124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
ldematte added a commit to ldematte/elasticsearch that referenced this pull request Mar 18, 2025
…5011)

With elastic#124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
elasticsearchmachine pushed a commit that referenced this pull request Mar 18, 2025
…125086)

With #124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
elasticsearchmachine pushed a commit that referenced this pull request Mar 18, 2025
…125087)

With #124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
ldematte added a commit that referenced this pull request Mar 18, 2025
…125078)

With #124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
…5011)

With elastic#124904 we introduced server policy patching via system properties; now that we have the possibility to merge policies and scopes, it's worth applying the same mechanism to plugin policies too.

This PR changes the behaviour of plugin policy overrides; now they are not replacing the policy entirely, but patch it by adding the entitlements and scopes specified in the "patch policy"
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/Entitlements Entitlements infrastructure >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