Skip to content

[8.12] [Fleet] Only enable output secrets if all Fleet servers are compatible (#173398)#174433

Merged
kibanamachine merged 1 commit intoelastic:8.12from
kibanamachine:backport/8.12/pr-173398
Jan 8, 2024
Merged

[8.12] [Fleet] Only enable output secrets if all Fleet servers are compatible (#173398)#174433
kibanamachine merged 1 commit intoelastic:8.12from
kibanamachine:backport/8.12/pr-173398

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.12:

Questions ?

Please refer to the Backport tool documentation

elastic#173398)

## Summary

Closes elastic#173041

Output secret storage requires that all Fleet servers are on version
8.12.0 or above.

The implementation is similar to package policy secrets:
elastic#163627: this PR adds the new
`output_secret_storage_requirements_met` flag on the
`ingest_manager_settings` saved object.

### Testing

1. Define a preconfigured output wit a secret value in your
`kibana.dev.yml` file, e.g.:
   ```yml
   xpack.fleet.outputs:
     - id: my-logstash-output-with-a-secret
       name: preconfigured logstash output with a secret
       type: logstash
       hosts: ['localhost:9999']
       ssl:
         certificate: xxxxxxxxxx
       secrets:
         ssl:
           key: secretLogstashKey
   ```
3. Start ES and Kibana. Do not start a Fleet server.
4. Go to Fleet settings and inspect the preconfigured output: it should
have been created and the secret value should not have been set
(optionally, you can check in the Console with `GET
.fleet-secrets/_search` that the secret was not created). However, a
plain text equivalent should have been created (in the example above,
`ssl.key` should be set to `secretLogstashKey`).
5. Start a Fleet server on version less than 8.12.0. Kibana should
update the output. Again, check that the secret value was not set and
that the plain text equivalent is set.
6. Stop the Fleet server and start another one on version 8.12.0 or
higher. Kibana should update the output. This time, the secret value
should have been set.

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
(cherry picked from commit 70508b9)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jan 8, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) January 8, 2024 09:26
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 8, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Explore - Security Solution Cypress Tests #4 / url state sets and reads the url state for timeline by id sets and reads the url state for timeline by id

Metrics [docs]

✅ unchanged

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

cc @jillguyonnet

@kibanamachine kibanamachine merged commit edab182 into elastic:8.12 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants