Skip to content

Deprecate setup-passwords tool#76902

Merged
jkakavas merged 10 commits intoelastic:masterfrom
jkakavas:deprecate-setup-passwords-tool
Oct 21, 2021
Merged

Deprecate setup-passwords tool#76902
jkakavas merged 10 commits intoelastic:masterfrom
jkakavas:deprecate-setup-passwords-tool

Conversation

@jkakavas
Copy link
Copy Markdown
Contributor

With Security ON by default project where the elastic user
password is auto-generated, we have decided to deprecate the
setup-passwords tool and consider removing it in a future version.
Users will get a password for the elastic built-in user when the
node starts for the first time and they can also use the newly
introduced elastisearch-reset-elastic-password tool to set or
reset that password. With credentials for the elastic user
available, the password for the rest of the built-in users can be
set using the Change Password API, or via Kibana.

With Security ON by default project where the `elastic` user
password is auto-generated, we have decided to deprecate the
setup-passwords tool and consider removing it in a future version.
Users will get a password for the `elastic` built-in user when the
node starts for the first time and they can also use the newly
introduced elastisearch-reset-elastic-password tool to set or
reset that password. With credentials for the elastic user
available, the password for the rest of the built-in users can be
set using the Change Password API, or via Kibana.
@jkakavas jkakavas added >deprecation :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v8.0.0 v7.16.0 labels Aug 24, 2021
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Aug 24, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-security (Team:Security)

@jkakavas
Copy link
Copy Markdown
Contributor Author

I am uncertain of the "in favor of " and "replaced by" wording as the new tool has a subset of the old functionality, happy to get suggestions!

Copy link
Copy Markdown
Contributor

@lockewritesdocs lockewritesdocs left a comment

Choose a reason for hiding this comment

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

Provided some suggested changes, but looks good overall.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
[[setup-passwords]]
== elasticsearch-setup-passwords

deprecated[7.16,"Replaced by <<reset-elastic-password,`elasticsearch-reset-elastic-password`>>."]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to deprecate in 7.16 now?
We haven't backported elasticsearch-reset-elastic-password to 7.x yet have we?

It seems premature to indicate that it's deprecated as of 7.16 when we aren't ready to actually deprecate it in 7.x

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this is the ideal terminology (though I don't have a better set of words).

There's 3 points:

  1. In 8.0 it's "replaced" mostly by security on by default so this utility isn't needed anymore.
  2. For some scenarios, elasticsearch-reset-elastic-password is a replacement, but not in most
  3. For non-elastic users, the replacement is either automated setup (kibana and fleet) or manual use of the change password API

I don't know how we capture that, but I worry that simply pointing to elasticsearch-reset-elastic-password will confuse some people.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@tvernum, I appreciate your insights, as always. I'd like to avoid version-specific language in this message if possible to avoid pinning to a particular version if we need to change when we're deprecating the tool. Perhaps we can cover the two main scenarios that this tool was used for (changing passwords for built-in users and created users) and offer users the alternative options.

The elasticsearch-setup-passwords tool is deprecated and will be removed in a future release. To manually reset the password for the elastic user, use the 'elasticsearch-reset-elastic-password' tool. To change passwords for other users, use either Kibana or the Elasticsearch change passwords API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestions both, I'll add Adam's text here and remove the version

if (shouldPrompt) {
terminal.println("******************************************************************************");
terminal.println("Note: The 'elasticsearch-setup-passwords' tool has been deprecated");
terminal.println(" and might be removed in a future release.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't love "might". I think we should say "will be" or "is intended to be"

terminal.println("******************************************************************************");
terminal.println("Note: The 'elasticsearch-setup-passwords' tool has been deprecated");
terminal.println(" and might be removed in a future release.");
terminal.println(" Use the 'elasticsearch-reset-elastic-password' tool instead. ");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See my comment above - not every use of setup-passwords can switch to "elasticsearch-reset-elastic-password" and I worry about confusion.

@lockewritesdocs
Copy link
Copy Markdown
Contributor

@elasticmachine run elasticsearch-ci/docs

Copy link
Copy Markdown
Contributor

@lockewritesdocs lockewritesdocs left a comment

Choose a reason for hiding this comment

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

One minor nit, but LGTM otherwise 👍

terminal.errorPrintln(" This tool used the keystore at " + KeyStoreWrapper.keystorePath(env.configFile()));
terminal.errorPrintln("");
terminal.errorPrintln(
"You can use `elasticsearch-reset-elastic-password` CLI tool to reset the password of the '" + elasticUser
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"You can use `elasticsearch-reset-elastic-password` CLI tool to reset the password of the '" + elasticUser
"You can use the `elasticsearch-reset-elastic-password` CLI tool to reset the password of the '" + elasticUser

@lockewritesdocs
Copy link
Copy Markdown
Contributor

@elasticmachine update branch

[[setup-passwords]]
== elasticsearch-setup-passwords

deprecated[8.0, "The `elasticsearch-setup-passwords` tool is deprecated and will be removed in a future release. To manually reset the password for the `elastic` user, use the <<reset-elastic-password,`elasticsearch-reset-elastic-password` tool>>. To change passwords for other users, use either {kib} or the {es} change passwords API."]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Drive-by comment: We should also add a deprecation notice to the 8.0 breaking changes.

There isn't a deprecations section yet, but we can use the 7.15 one as a template.

@lockewritesdocs Do you mind assisting and ensuring this gets added?

We'll also want to remove the 7.16 label if the elasticsearch-reset-elastic-password tool won't be in 7.x.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @jrodewig! I created #78793 to add the deprecation notice to the 8.0 migration guide.

Copy link
Copy Markdown
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Left a comment. We still need a deprecation notice in the 8.0 breaking changes.

Copy link
Copy Markdown
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM (with @lockewritesdocs's suggested change)

@lockewritesdocs
Copy link
Copy Markdown
Contributor

@jkakavas, should we remove the 7.16 label from this PR if we're not deprecating in that release?

@jkakavas
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@jkakavas jkakavas dismissed jrodewig’s stale review October 21, 2021 10:20

Adam addressed the comments

@jkakavas jkakavas merged commit e288a1a into elastic:master Oct 21, 2021
lockewritesdocs pushed a commit to lockewritesdocs/elasticsearch that referenced this pull request Oct 28, 2021
With Security ON by default project where the `elastic` user
password is auto-generated, we have decided to deprecate the
setup-passwords tool and consider removing it in a future version.
Users will get a password for the `elastic` built-in user when the
node starts for the first time and they can also use the newly
introduced elastisearch-reset-elastic-password tool to set or
reset that password. With credentials for the elastic user
available, the password for the rest of the built-in users can be
set using the Change Password API, or via Kibana.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>deprecation :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) Team:Security Meta label for security team v8.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants