Skip to content

[Fleet] Add secrets package API integration test#164583

Merged
jillguyonnet merged 2 commits intoelastic:mainfrom
jillguyonnet:fleet/add-secrets-package-upgrade-api-test
Aug 24, 2023
Merged

[Fleet] Add secrets package API integration test#164583
jillguyonnet merged 2 commits intoelastic:mainfrom
jillguyonnet:fleet/add-secrets-package-upgrade-api-test

Conversation

@jillguyonnet
Copy link
Copy Markdown
Member

@jillguyonnet jillguyonnet commented Aug 23, 2023

Summary

Closes #162045

This PR adds an API integration test for the following scenario:

  • Given an integration with some non secret (plain text) vars that become secret in a newer version;
  • When Fleet has an agent policy with this integration and upgrades from the old to the newer version;
  • Then the vars that have become secrets should correctly be stored as secret values.

Checklist

@jillguyonnet jillguyonnet self-assigned this Aug 23, 2023
@jillguyonnet jillguyonnet added the Team:Fleet Team label for Observability Data Collection Fleet team label Aug 23, 2023
@ghost
Copy link
Copy Markdown

ghost commented Aug 23, 2023

🤖 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!)

@jillguyonnet jillguyonnet added release_note:skip Skip the PR/issue when compiling release notes v8.10.0 labels Aug 23, 2023
@jillguyonnet jillguyonnet marked this pull request as ready for review August 23, 2023 13:52
@jillguyonnet jillguyonnet requested a review from a team as a code owner August 23, 2023 13:52
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Copy Markdown
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.

Thanks for the test, LGTM!

Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

Nice, really glad we have this test 👍

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @jillguyonnet

@jillguyonnet jillguyonnet merged commit 766ff8f into elastic:main Aug 24, 2023
@jillguyonnet jillguyonnet deleted the fleet/add-secrets-package-upgrade-api-test branch August 24, 2023 07:37
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.10

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 24, 2023
## Summary

Closes elastic#162045

This PR adds an API integration test for the following scenario:
- Given an integration with some non secret (plain text) vars that
become secret in a newer version;
- When Fleet has an agent policy with this integration and upgrades from
the old to the newer version;
- Then the vars that have become secrets should correctly be stored as
secret values.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
(cherry picked from commit 766ff8f)
kibanamachine added a commit that referenced this pull request Aug 24, 2023
…64666)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Fleet] Add secrets package API integration test
(#164583)](#164583)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jill
Guyonnet","email":"jill.guyonnet@elastic.co"},"sourceCommit":{"committedDate":"2023-08-24T07:37:34Z","message":"[Fleet]
Add secrets package API integration test (#164583)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/162045\r\n\r\nThis PR adds an
API integration test for the following scenario:\r\n- Given an
integration with some non secret (plain text) vars that\r\nbecome secret
in a newer version;\r\n- When Fleet has an agent policy with this
integration and upgrades from\r\nthe old to the newer version;\r\n- Then
the vars that have become secrets should correctly be stored
as\r\nsecret values.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Bardi
<90178898+juliaElastic@users.noreply.github.com>","sha":"766ff8fa614d6b62b750c0eef9c1d129b2187e4f","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.10.0","v8.11.0"],"number":164583,"url":"https://github.com/elastic/kibana/pull/164583","mergeCommit":{"message":"[Fleet]
Add secrets package API integration test (#164583)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/162045\r\n\r\nThis PR adds an
API integration test for the following scenario:\r\n- Given an
integration with some non secret (plain text) vars that\r\nbecome secret
in a newer version;\r\n- When Fleet has an agent policy with this
integration and upgrades from\r\nthe old to the newer version;\r\n- Then
the vars that have become secrets should correctly be stored
as\r\nsecret values.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Bardi
<90178898+juliaElastic@users.noreply.github.com>","sha":"766ff8fa614d6b62b750c0eef9c1d129b2187e4f"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164583","number":164583,"mergeCommit":{"message":"[Fleet]
Add secrets package API integration test (#164583)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/162045\r\n\r\nThis PR adds an
API integration test for the following scenario:\r\n- Given an
integration with some non secret (plain text) vars that\r\nbecome secret
in a newer version;\r\n- When Fleet has an agent policy with this
integration and upgrades from\r\nthe old to the newer version;\r\n- Then
the vars that have become secrets should correctly be stored
as\r\nsecret values.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Bardi
<90178898+juliaElastic@users.noreply.github.com>","sha":"766ff8fa614d6b62b750c0eef9c1d129b2187e4f"}}]}]
BACKPORT-->

Co-authored-by: Jill Guyonnet <jill.guyonnet@elastic.co>
jloleysens added a commit that referenced this pull request Aug 24, 2023
* main: (3152 commits)
  [Security Solution][Detection Engine] fixes 410 error on index legacy template call (#164682)
  [SavedObjects] Create serverless roots for jest integration tests (#164157)
  Create upselling package and implement EntityAnalytics serverless upselling (#164136)
  [Fleet] Change 'Out-of-date' to 'Outdated policy' in agent list table (#164673)
  [IndexManagement] Use internal base path for API (#164665)
  [Profiling] removing ~ symbol (#164595)
  [Telemetry] Fetch snapshot: allow specifying the version via querystring (#164670)
  [Cases] Show warning when all cases table reaches 10k cases message (#164323)
  [ML] Removing token list from text expansion model testing (#164560)
  [Fleet] Add secrets package API integration test (#164583)
  [Fleet] Fix security solution tag id (#164582)
  [Security Solution] Modal says "duplicating 0 rules" when you duplicate an individual rule (#163908)
  [api-docs] 2023-08-24 Daily api_docs build (#164658)
  [APM] Cleanup alerting api tests (#164438)
  Upgrade EUI to 87.2.0 (#164385)
  [ML] Fix query bar autocompletion for ML and AIOps embeddables (#164485)
  [Fleet] Fix flaky unit test for the details page (#164641)
  [Security Solution] update codeowner for serverless security subdir (#164640)
  [Security Solution] Fixes Assistant Connector and Actions RBAC Flow (#164382)
  [Discover] Removing large string truncation from doc viewer (#164236)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.10.0 v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Upgrade APIs to support moving a value from .fleet-policies to secrets index when a field moves to being secret

6 participants