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

Commits on Nov 28, 2023

  1. [Fleet] Improve UX for policy secrets (elastic#171405)

    ## 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 committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    57d780a View commit details
    Browse the repository at this point in the history
  2. Fix translations

    kpollich committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    615353b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    30909f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e2fc78d View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Configuration menu
    Copy the full SHA
    18dd8ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d74a3c8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    37ebc63 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f74af73 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    129e831 View commit details
    Browse the repository at this point in the history