-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add 'user-managed' label to the rule details page for the api keys created by users #155699
add 'user-managed' label to the rule details page for the api keys created by users #155699
Conversation
f6c10aa
to
eec9043
Compare
Pinging @elastic/response-ops (Team:ResponseOps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! Created a rule with my own API key and saw the (user-managed)
label appended 👍
I think the label works well enough. My original thought was to have the Reviewed the previous issue and had a few questions. Feel free to direct me there instead. Can you remind me of the implications if I edit a rule owned by another user? Would it switch it to my api key? Also not trying to make this more complicated than it needs to be as well. 😄 |
AFAIK yes.
Not sure about this. @mikecote can you help us here? |
You would be able to modify this rule for sure but by modifying the rule a new API key would get assigned on your behalf and un-associate the previous API key from the rule. |
After understanding this a bit more, I'm thinking a simple API Key Owner: < EuiIconTip position="right" content={...} />
That's very likely not correct... @lcawl Apologies for the mid-conversation ping, but can you take a look at this? |
IMO the second sentence seems out of place here. I'm hovering over the tooltip since I'm curious what the API key owner field means, not because I want to edit the rule. I think it would be more appropriate to have that info somewhere in the Edit rule UI. For example, where there are other warnings already: If we can tell that a rule uses API keys at this stage, it would be cool to modify the message to something like: "Saving this rule will change the API key owner and therefore its privileges and behavior might change." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the small copy tweak.
'xpack.triggersActionsUI.sections.ruleDetails.userManagedApikey', | ||
{ | ||
defaultMessage: | ||
'This rule is associated with an API key. Modifying this rule with either remove or switch the API key owner.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @lcawl . Let's remove this second sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should i add that exclamation mark next to the save button too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean the additional text mentioned in #155699 (comment), that'd be great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
…eated by users (elastic#155699) Resolves: elastic#154581 This PR adds 'user-managed' label next to the API key owner name when the API key is created by the user. <img width="813" alt="Screenshot 2023-05-06 at 19 02 08" src="https://user-images.githubusercontent.com/92688503/236637767-d0c0ee00-1314-4824-b97a-b7bdf1b7f43b.png"> (cherry picked from commit d297a99)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…eys created by users (#155699) (#157792) # Backport This will backport the following commits from `main` to `8.8`: - [add 'user-managed' label to the rule details page for the api keys created by users (#155699)](#155699) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-15T19:33:48Z","message":"add 'user-managed' label to the rule details page for the api keys created by users (#155699)\n\nResolves: #154581\r\n\r\nThis PR adds 'user-managed' label next to the API key owner name when\r\nthe API key is created by the user.\r\n\r\n<img width=\"813\" alt=\"Screenshot 2023-05-06 at 19 02 08\"\r\nsrc=\"https://user-images.githubusercontent.com/92688503/236637767-d0c0ee00-1314-4824-b97a-b7bdf1b7f43b.png\">","sha":"d297a9949fc603a797faebc997ea92bee1001fee","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","ui-copy","v8.8.0","v8.9.0"],"number":155699,"url":"https://github.com/elastic/kibana/pull/155699","mergeCommit":{"message":"add 'user-managed' label to the rule details page for the api keys created by users (#155699)\n\nResolves: #154581\r\n\r\nThis PR adds 'user-managed' label next to the API key owner name when\r\nthe API key is created by the user.\r\n\r\n<img width=\"813\" alt=\"Screenshot 2023-05-06 at 19 02 08\"\r\nsrc=\"https://user-images.githubusercontent.com/92688503/236637767-d0c0ee00-1314-4824-b97a-b7bdf1b7f43b.png\">","sha":"d297a9949fc603a797faebc997ea92bee1001fee"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155699","number":155699,"mergeCommit":{"message":"add 'user-managed' label to the rule details page for the api keys created by users (#155699)\n\nResolves: #154581\r\n\r\nThis PR adds 'user-managed' label next to the API key owner name when\r\nthe API key is created by the user.\r\n\r\n<img width=\"813\" alt=\"Screenshot 2023-05-06 at 19 02 08\"\r\nsrc=\"https://user-images.githubusercontent.com/92688503/236637767-d0c0ee00-1314-4824-b97a-b7bdf1b7f43b.png\">","sha":"d297a9949fc603a797faebc997ea92bee1001fee"}}]}] BACKPORT--> Co-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com>
…eated by users (#155699) Resolves: #154581 This PR adds 'user-managed' label next to the API key owner name when the API key is created by the user. <img width="813" alt="Screenshot 2023-05-06 at 19 02 08" src="https://user-images.githubusercontent.com/92688503/236637767-d0c0ee00-1314-4824-b97a-b7bdf1b7f43b.png">
Resolves: #154581
This PR adds 'user-managed' label next to the API key owner name when the API key is created by the user.