Deprecate kibana user in favor of kibana_system user#63186
Deprecate kibana user in favor of kibana_system user#63186legrego merged 12 commits intoelastic:masterfrom
Conversation
bfb081d to
03662f2
Compare
|
Pinging @elastic/kibana-security (Team:Security) |
There was a problem hiding this comment.
EDIT: tested locally and works great! A few nits aside from the changes you directly made... (using permalinks to the current HEAD in master so they render properly in my comment)
- In #48247 we deprecated using the
elasticuser in config in favor of using thekibanauser. I'm thinking we should probably change that to deprecate it in favor ofkibana_systemtoo. This is in a few files...
kibana/src/core/server/elasticsearch/elasticsearch_config.ts
Lines 132 to 136 in 129cf4f
kibana/x-pack/plugins/monitoring/server/config.ts
Lines 119 to 124 in 129cf4f
kibana/x-pack/plugins/monitoring/server/deprecations.ts
Lines 60 to 64 in 129cf4f
- Should we update this functional test assertion for the
kibana_systemuser instead?
kibana/x-pack/test/functional/apps/security/users.js
Lines 28 to 29 in 129cf4f
- This is really nitpicky, but do we want to change the wording from "
kibana user" to "Kibana user" to differentiate the intent from the username itself? Or split this into two messages for thekibanaandkibana_systemusers? 😛 I don't feel super strongly about it, just wanted to point it out in case you missed it.
- I found a few more references to the deprecated
kibanauser:
Line 15 in 129cf4f
kibana/packages/kbn-es/src/utils/native_realm.test.js
Lines 191 to 209 in 129cf4f
There were a couple more in code comments, but those don't matter as much IMO.
| metadata: { | ||
| _reserved: true, | ||
| _deprecated: true, | ||
| _deprecated_reason: 'This user is not cool anymore.', |
x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx
Outdated
Show resolved
Hide resolved
| export const getExtendedUserDeprecationNotice = (user: User) => { | ||
| const reason = user.metadata?._deprecated_reason ?? ''; | ||
| return i18n.translate('xpack.security.management.users.extendedUserDeprecationNotice', { | ||
| defaultMessage: `The {username} user is deprecated. {reason}`, |
There was a problem hiding this comment.
Perhaps this should change so it will be consistent with the reason?
| defaultMessage: `The {username} user is deprecated. {reason}`, | |
| defaultMessage: `The [{username}] user is deprecated. {reason}`, |
There was a problem hiding this comment.
The current text is consistent with the deprecation message we display for roles today. Gail had actually requested that we remove the brackets from the reason when we did the role deprecations, but then that change would have been inconsistent with the rest of the messages in ES. Overall, I'm 🤷♂️ about it, I could go either way.
Given my beautiful backstory, which would you prefer? I'll defer to you 😄
pgayvallet
left a comment
There was a problem hiding this comment.
LGTM for config/kibana.yml changes
|
@jportner thanks for the review! I'm not sure how my search missed those other references, so good looking out 🥇 |
jportner
left a comment
There was a problem hiding this comment.
Sorry, I could have been clearer in my last comment, a couple more suggestions!
tylersmalley
left a comment
There was a problem hiding this comment.
Operations changes to kbn-es LGTM
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
…ort-deprecated-users
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@jportner ready for another look whenever you get a chance |
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
This updates the User Grid page and Edit User page to warn about deprecated users. Support for deprecated users was added to Elasticsearch in elastic/elasticsearch#54967, and is used to denote that the
kibanauser is deprecated in favor of thekibana_systemuser.Companion PRs:
elastic/stack-docs#991
elastic/elasticsearch#54967
Resolves #25879