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

[Fleet] Display package verification status #135928

Merged
merged 13 commits into from
Jul 8, 2022

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Jul 7, 2022

Summary

Part of #133822

if the package verification feature flag is enabled, show which packages are unverified in the UI:

  • show unverified label on the package card in installed integrations (this is not shown in the browse view)
  • show a callout in the installed integrations view if any packages are unverified
  • show a warning icon on the installed integrations tab if any packages are unverified
  • show a callout on the integration overview page if a package is unverified

Additional changes:

  • add error.attributes.type to the error response when verification fails so that verification error can be distinguished
  • add package_verification_key_id to the fleet status response

NOTE: there are a few TODOs in the code where I will need to add a documentation link when its available, I don't know what other people do when a link isn't ready yet?

Screenshots

Installed integrations: new labels, callout and icon on tab
Screenshot 2022-07-07 at 20 17 24

Tab icon still visible when not on tab:
Screenshot 2022-07-07 at 20 17 51

Callout also displayed on integrations overview:
Screenshot 2022-07-07 at 20 17 59

Testing steps

    1. Run the version of the EPR with package signatures locally:

docker run -p 8080:8080 docker.elastic.co/observability-ci/package-registry/distribution:PR-463

    1. set xpack.fleet.registryUrl: http://localhost:8080
    1. download this public key which will cause all verifications to fail NOT_THE_ELASTIC_KEY
    1. set xpack.fleet.packageVerification.gpgKeyPath: /tmp/NOT_THE_ELASTIC_KEY.txt
    1. Enable the feature by setting:
xpack.fleet.enableExperimental: 
    - packageVerification
    1. force install some packages (force is required to override the verification failing)

Checklist

Delete any items that are not applicable to this PR.

@hop-dev hop-dev added Team:Fleet Team label for Observability Data Collection Fleet team release_note:feature Makes this part of the condensed release notes v8.4.0 labels Jul 7, 2022
@hop-dev hop-dev self-assigned this Jul 7, 2022
@hop-dev hop-dev changed the title [Fleet] Display package verification status in installed packages UI [Fleet] Display package verification status Jul 7, 2022
@hop-dev hop-dev force-pushed the 133822-verification-ui branch from 0d1a1f4 to 0a17655 Compare July 7, 2022 20:13
@hop-dev hop-dev marked this pull request as ready for review July 7, 2022 20:17
@hop-dev hop-dev requested a review from a team as a code owner July 7, 2022 20:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@@ -4082,6 +4082,9 @@
"encrypted_saved_object_encryption_key_required"
]
}
},
"package_verification_key_id": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if the key ID is out of place on the status endpoint, I contemplated having it on its own endpoint but that also seemed excessive for one value which is unchanging and almost like config.

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

Code LGTM

@hop-dev hop-dev force-pushed the 133822-verification-ui branch from 1626916 to c867a12 Compare July 8, 2022 11:50
Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

Couple minor comments but overall LGTM 🚀

@hop-dev hop-dev force-pushed the 133822-verification-ui branch from c867a12 to 30ecf43 Compare July 8, 2022 15:24
@hop-dev hop-dev enabled auto-merge (squash) July 8, 2022 15:27
@hop-dev hop-dev merged commit f5e8724 into elastic:main Jul 8, 2022
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #46 / Kibana Spaces Accessibility a11y test for delete space button

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 735 737 +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1381 1389 +8

Async chunks

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

id before after diff
fleet 844.4KB 846.9KB +2.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 111.3KB 111.6KB +344.0B
Unknown metric groups

API count

id before after diff
fleet 1513 1521 +8

History

  • 💛 Build #56259 was flaky c867a12b0181c4334303fc9e5f9a5aa9314b85a3
  • 💚 Build #56099 succeeded 162691626d2a5fcdaa509587c3ceba6062fd2abd
  • 💔 Build #56091 failed 0a17655c4f48deeee70ae47da3d01287748b24e3
  • 💔 Build #56012 failed 0d1a1f4a4189bc2f5a08f77403ed59d653cc1b81

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

cc @hop-dev

@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 8, 2022
@hop-dev hop-dev deleted the 133822-verification-ui branch July 8, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:feature Makes this part of the condensed release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants