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

[8.11] [Fleet] Improve UX for policy secrets (#171405) #172098

Merged
merged 9 commits into from Nov 29, 2023

Conversation

kpollich
Copy link
Member

Backport

This will backport the following commits from main to 8.11:

Questions ?

Please refer to the Backport tool documentation

## Summary

Closes elastic#171225

- Highlights secrets during package policy creation with a distinct
background and icon
- Add tooltip + docs link for secrets where appropriate
- Detect "new secrets" during policy upgrade and alert the user in a
separate callout

## To do
- [x] Fix any failing tests
- [x] Add tests for "new secrets" detection logic

## Screenshots

![image](https://github.com/elastic/kibana/assets/6766512/e943a3e8-68db-40eb-a5c3-b108e7d299ff)

![image](https://github.com/elastic/kibana/assets/6766512/751bbe50-7553-4dcc-a8dc-b9802f331013)

![image](https://github.com/elastic/kibana/assets/6766512/6cceb4cd-0b8e-42cd-aafb-d2e3ddcd23a8)

## How to test

There's probably an easier way to do this, but this is what I did

1. Clone https://github.com/elastic/package-registry and
https://github.com/elastic/integrations
2. Add the following to `config.yml` in your package-registry repo

```yml
package_paths:
  - path/to/your/integrations/build/packages
```

3. Build a version of an integration with some `secrets: true` for
various variables. I used `1password`

```shell
cd integrations/packages/1password
# Edit `manifest.yml` or a given `data_stream/*/manifest.yml` file to change some variables to `secret: true`. Also bump the version and update `changelog.yml`
elastic-package build
```

4. Run the local package registry e.g.

```shell
cd package-registry
go run . --feature-proxy-mode=true -proxy-to=https://epr.elastic.co # makes it so you can still see EPR packages in Kibana
```

5. Update your `kibana.dev.yml` to point at your local package registry

```yml
xpack.fleet.registryUrl: http://localhost:8080
```

6. Start Kibana and Elasticsearch and install, upgrade, etc your package
in question to verify the changes

---------

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
(cherry picked from commit 9396ef3)

# Conflicts:
#	packages/kbn-doc-links/src/get_doc_links.ts
#	packages/kbn-doc-links/src/types.ts
#	x-pack/plugins/translations/translations/fr-FR.json
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json
@kpollich kpollich enabled auto-merge (squash) November 28, 2023 18:51
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@kpollich
Copy link
Member Author

buildkite test this

@kpollich
Copy link
Member Author

I have no idea what's going on with CI here. The buildkite build reports as passed but there are failures:
image

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@kpollich
Copy link
Member Author

buildkite test this

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@patrykkopycinski patrykkopycinski added the ci:skip-cypress-osquery Skips osquery cypress checks label Nov 29, 2023
@patrykkopycinski
Copy link
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

kibana-ci commented Nov 29, 2023

💔 Build Failed

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 940 941 +1

Async chunks

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

id before after diff
fleet 1.2MB 1.2MB +3.9KB
lists 147.7KB 147.9KB +226.0B
total +4.1KB

Page load bundle

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

id before after diff
core 368.5KB 368.7KB +226.0B

History

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

@kpollich kpollich merged commit 279c469 into elastic:8.11 Nov 29, 2023
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:skip-cypress-osquery Skips osquery cypress checks Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants