Skip to content
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

[APM] agent keys management improvements #120765

Merged
merged 10 commits into from
Dec 9, 2021

Conversation

gbamparop
Copy link
Contributor

@gbamparop gbamparop commented Dec 8, 2021

Summary

Improvements for agent key management:

  • Add useCurrentUser hook
  • Remove EuiFormControlLayout and use EuiFieldText instead of input element
  • Display error messages in the UI when creating agent keys
  • Removes default agent key name and privileges when creating agent keys
  • Use single state in the form for creating agent keys
  • Use privileges array in the create agent key endpoint
  • Change ...agent key... instances to ...APM agent key...

@gbamparop gbamparop added Team:APM All issues that need APM UI Team support v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Dec 8, 2021
@gbamparop gbamparop requested a review from a team December 8, 2021 14:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@gbamparop gbamparop changed the title [APM] agent keys improvements [APM] agent keys management improvements Dec 8, 2021
Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

Good improvements 👍

Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

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

Some copy nits suggested

@@ -235,7 +236,7 @@ function AgentKeysContent({
<p>
{i18n.translate('xpack.apm.settings.agentKeys.emptyPromptBody', {
defaultMessage:
'Create keys to authorize agent requests to the APM Server.',
'Create APM agent keys to authorize APM agent requests to the APM Server.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'Create APM agent keys to authorize APM agent requests to the APM Server.',
'Create APM agent keys to authorize requests to the APM Server.',

@bmorelli25 Thoughts on reducing the APM agents mention here? Just reads a little harder

gbamparop and others added 3 commits December 9, 2021 16:05
…ndex.tsx

Co-authored-by: Casper Hübertz <casper@formgeist.com>
…gent_keys_table.tsx

Co-authored-by: Casper Hübertz <casper@formgeist.com>
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1215 1217 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.0MB 3.0MB +434.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
apm 47 48 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@gbamparop gbamparop merged commit ebe11e3 into elastic:main Dec 9, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 9, 2021
* Add userCurrentUser hook

* Use EuiFieldText instead of input element

* Display error messages in the UI when creating agent keys

* Remove default agent key name

* Prefix createAgentKeyRoute with /api

* Fix issue where you cannot invalidate API keys when you only have manage_own_api_key privilege

Co-authored-by: Casper Hübertz <casper@formgeist.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Dec 9, 2021
* Add userCurrentUser hook

* Use EuiFieldText instead of input element

* Display error messages in the UI when creating agent keys

* Remove default agent key name

* Prefix createAgentKeyRoute with /api

* Fix issue where you cannot invalidate API keys when you only have manage_own_api_key privilege

Co-authored-by: Casper Hübertz <casper@formgeist.com>

Co-authored-by: Giorgos Bamparopoulos <georgios.bamparopoulos@elastic.co>
Co-authored-by: Casper Hübertz <casper@formgeist.com>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
* Add userCurrentUser hook

* Use EuiFieldText instead of input element

* Display error messages in the UI when creating agent keys

* Remove default agent key name

* Prefix createAgentKeyRoute with /api

* Fix issue where you cannot invalidate API keys when you only have manage_own_api_key privilege

Co-authored-by: Casper Hübertz <casper@formgeist.com>
gbamparop added a commit to gbamparop/kibana that referenced this pull request Jan 12, 2022
* Add userCurrentUser hook

* Use EuiFieldText instead of input element

* Display error messages in the UI when creating agent keys

* Remove default agent key name

* Prefix createAgentKeyRoute with /api

* Fix issue where you cannot invalidate API keys when you only have manage_own_api_key privilege

Co-authored-by: Casper Hübertz <casper@formgeist.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants