Skip to content

Conversation

dan-rubinstein
Copy link
Member

@dan-rubinstein dan-rubinstein commented Nov 25, 2024

Issue - https://github.com/elastic/ml-team/issues/919

Description

The data_frame_transforms_admin and data_frame_transforms_user roles have been deprecated for some time now. The roles are still created to ensure backwards compatibility but they have a deprecation tag in all documentation and a critical deprecation warning is going to be added to 8.18 for these roles as part of this in-progress change. This change removes all references to these roles from code and documentation including the logic to create them. This will only be added to 9.0. Users will have migrated their transforms to the non-deprecated equivalent roles as part of handling the critical deprecation warning mentioned above during their migration from 8.18->9. Any users that were unable to do so, will be able to call the transforms update API to update their roles and get their transforms working again.

Testing

  • Unit tests
  • Ran elastic search locally and confirmed that the deprecated roles are no longer being created.

[MERGE BLOCKER] Note: This change is blocked on both the deprecation warning change and approval on the breaking change request.

Note [Updated]: The deprecation warning change has been merged and backported and the breaking change request has been approved. This change no longer has any merge blockers.

@dan-rubinstein dan-rubinstein added >deprecation :ml Machine learning Team:ML Meta label for the ML team v9.0.0 labels Nov 25, 2024
Copy link
Contributor

Documentation preview:

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Nov 25, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @dan-rubinstein, I've created a changelog YAML for you. Note that since this PR is labelled >deprecation, you need to update the changelog YAML to fill out the extended information sections.

@dan-rubinstein dan-rubinstein removed the external-contributor Pull request authored by a developer outside the Elasticsearch team label Nov 25, 2024
@dan-rubinstein dan-rubinstein marked this pull request as ready for review December 2, 2024 20:49
@dan-rubinstein dan-rubinstein requested a review from a team as a code owner December 2, 2024 20:49
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@dan-rubinstein
Copy link
Member Author

@elasticmachine merge upstream

@mattc58 mattc58 requested review from jfreden and n1v0lg and removed request for jfreden December 10, 2024 21:46
"manage_behavioral_analytics",
"manage_ccr",
"manage_connector",
"manage_data_frame_transforms",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see mention of removing these privileges in the breaking changes request -- we only mention roles. The manage_data_frame_transforms and monitor_data_frame_transforms privileges are indeed deprecated according to our docs (monitor_data_frame_transforms has already been removed from docs it seems), but we don't issue any deprecation warnings around these privileges (currently there's no clean, built-in support for that). These privileges can be assigned to user-defined roles and user-created API keys so they are not just scoped to the built-in roles we're removing here.

I think it's likely still a good idea to remove the privileges in 9.0 but I prefer that we do this in a separate PR and after making sure that it's worth the trouble.

@dan-rubinstein could you revert the changes around privileges in this PR? That'll also take care of some of the CI failures. I can open a follow up PR with the privileges removed -- since it requires a PR against the Serverless repo as well, it'll be easier for me to author both PRs than only one of them.

Copy link
Member

Choose a reason for hiding this comment

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

I can revert the changes for this file - to clarify though, would you prefer that we revert the change entirely, or would you prefer that we set the permissions as empty via Set.of()?

Copy link
Contributor

Choose a reason for hiding this comment

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

@prwhelan let's revert it entirely -- I synced on this with the ES sec team before the holidays and the preference from our end would be to follow the deprecate, then remove approach, i.e., implement a deprecation warning for the privilege, then remove in a later version. This would delay the removal of the privilege since we'd first need a mechanism for issuing deprecation warnings for privileges (that's on the ES security team to implement).

Would the following be acceptable for the ML team? Remove the roles now, wait for ES security to implement a deprecation mechanism, deprecate the privilege, then remove it in some later ES version? This way things are less disruptive for any customers that may still be relying on the privilege.

Just a preference: if you have confidence that only very few (if any) customers still use this privilege, or feel strongly about making it non-functional sooner, I'm also good with making it a NOOP via Set.of().

Either way though, let's do whatever we do around the privilege in a separate PR to keep things focused.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, is there an issue we can track for deprecating and removing the privilege? I imagine we'll need to wait to the v10 upgrade to delete it, in which case I want to record it in some way

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup -- I'll create Jira for deprecating this particular privilege and Slack it to you (it's a private link that external people won't have access to).

pr: 117519
summary: Deprecating `data_frame_transforms` roles
area: Machine Learning
type: deprecation
Copy link
Contributor

Choose a reason for hiding this comment

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

We want a >breaking label on the PR instead of a >deprecation label. That'll also update some of the contents of this changelog IIRC.

After updating the label, lets tweak the title and summary here and the PR title to "Removing data_frame_transforms roles".

@elasticsearchmachine
Copy link
Collaborator

Hi @dan-rubinstein, I've updated the changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

@prwhelan prwhelan added :ml/Transform Transform and removed :ml Machine learning labels Dec 23, 2024
@prwhelan
Copy link
Member

@elasticmachine update branch

"my_admin_role": { <4>
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: unknown cluster privilege [bad_cluster_privilege]. a privilege must be either one of the predefined cluster privilege names [manage_own_api_key,manage_data_stream_global_retention,monitor_data_stream_global_retention,none,cancel_task,cross_cluster_replication,cross_cluster_search,delegate_pki,grant_api_key,manage_autoscaling,manage_index_templates,manage_logstash_pipelines,manage_oidc,manage_saml,manage_search_application,manage_search_query_rules,manage_search_synonyms,manage_service_account,manage_token,manage_user_profile,monitor_connector,monitor_enrich,monitor_inference,monitor_ml,monitor_rollup,monitor_snapshot,monitor_stats,monitor_text_structure,monitor_watcher,post_behavioral_analytics_event,read_ccr,read_connector_secrets,read_fleet_secrets,read_ilm,read_pipeline,read_security,read_slm,transport_client,write_connector_secrets,write_fleet_secrets,create_snapshot,manage_behavioral_analytics,manage_ccr,manage_connector,manage_enrich,manage_ilm,manage_inference,manage_ml,manage_rollup,manage_slm,manage_watcher,monitor_data_frame_transforms,monitor_transform,manage_api_key,manage_ingest_pipelines,manage_pipeline,manage_data_frame_transforms,manage_transform,manage_security,monitor,manage,all] or a pattern over one of the available cluster actions;"
"reason": "Validation Failed: 1: unknown cluster privilege [bad_cluster_privilege]. a privilege must be either one of the predefined cluster privilege names [manage_own_api_key,manage_data_stream_global_retention,monitor_data_stream_global_retention,none,cancel_task,cross_cluster_replication,cross_cluster_search,delegate_pki,grant_api_key,manage_autoscaling,manage_index_templates,manage_logstash_pipelines,manage_oidc,manage_saml,manage_search_application,manage_search_query_rules,manage_search_synonyms,manage_service_account,manage_token,manage_user_profile,monitor_connector,monitor_enrich,monitor_inference,monitor_ml,monitor_rollup,monitor_snapshot,monitor_stats,monitor_text_structure,monitor_watcher,post_behavioral_analytics_event,read_ccr,read_connector_secrets,read_fleet_secrets,read_ilm,read_pipeline,read_security,read_slm,transport_client,write_connector_secrets,write_fleet_secrets,create_snapshot,manage_behavioral_analytics,manage_ccr,manage_connector,manage_enrich,manage_ilm,manage_inference,manage_ml,manage_rollup,manage_slm,manage_watcher,monitor_transform,manage_api_key,manage_ingest_pipelines,manage_pipeline,manage_transform,manage_security,monitor,manage,all] or a pattern over one of the available cluster actions;"
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll need to revert this

prwhelan and others added 3 commits December 27, 2024 08:04
Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
@prwhelan
Copy link
Member

@elasticmachine update branch

@elasticmachine
Copy link
Collaborator

There are no new commits on the base branch.

@prwhelan prwhelan requested a review from n1v0lg December 27, 2024 21:53
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

LGTM!

@dan-rubinstein dan-rubinstein merged commit f5cffbf into elastic:main Jan 6, 2025
16 checks passed
@leemthompo
Copy link
Contributor

@dan-rubinstein is this PR relevant to the serverless changelog? [FYI this question is based on 9.0 breaking changes]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>breaking :ml/Transform Transform Team:ML Meta label for the ML team v9.0.0

7 participants