[Fleet] Add ssl fields to agent binary source settings#213211
[Fleet] Add ssl fields to agent binary source settings#213211criamico merged 23 commits intoelastic:mainfrom
Conversation
|
@elasticmachine merge upstream |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
… src/core/server/integration_tests/ci_checks'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/fleet (Team:Fleet) |
| changes: [ | ||
| { | ||
| type: 'mappings_addition', | ||
| addedMappings: {}, |
There was a problem hiding this comment.
explanation of this field can be found in a previous PR: https://github.com/elastic/kibana/pull/208091/files#r1971649339
| }); | ||
| encryptedSavedObjects.registerType({ | ||
| type: DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, | ||
| attributesToEncrypt: new Set([{ key: 'ssl', dangerouslyExposeValue: true }]), |
There was a problem hiding this comment.
Had a discussion about the attributes on this encrypted object in the previuos PR, it applies the same here : https://github.com/elastic/kibana/pull/208091/files#r1971664328
| type: DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, | ||
| attributesToEncrypt: new Set([{ key: 'ssl', dangerouslyExposeValue: true }]), | ||
| // enforceRandomId allows to create an SO with an arbitrary id | ||
| enforceRandomId: false, |
There was a problem hiding this comment.
Explanation of the need for this parameter: https://github.com/elastic/kibana/pull/208091/files#r1948774730
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
There are no new commits on the base branch. |
| schema.object({ | ||
| certificate_authorities: schema.maybe(schema.arrayOf(schema.string())), | ||
| certificate: schema.maybe(schema.string()), | ||
| key: schema.maybe(schema.string()), |
There was a problem hiding this comment.
should we allow null here?
There was a problem hiding this comment.
Good question, I was going with the same basic schema as the other ssl.key values that I added recently. neither fleet server host nor outputs have it nullable, but maybe they should all be nullable instead?
I think it makes sense to keep their behavior aligned as they work the same way.
There was a problem hiding this comment.
maybe we don't need it, tested locally and works fine when updating a plain text ssl.key to a secret
| verification_mode: schema.maybe(schema.string()), | ||
| certificate_authorities: schema.maybe(schema.arrayOf(schema.string())), | ||
| certificate: schema.maybe(schema.string()), | ||
| key: schema.maybe(schema.string()), |
There was a problem hiding this comment.
same here, should we allow null here?
| label={i18n.translate( | ||
| 'xpack.fleet.settings.editDownloadSourcesFlyout.sslCertificateAuthoritiesInputLabel', | ||
| { | ||
| defaultMessage: 'Server SSL certificate authorities (optional)', |
There was a problem hiding this comment.
do we need (optional) here, all fields seems optional?
There was a problem hiding this comment.
I'm going to open a follow up PR to address some small UX changes across the whole feature. I think it can be addressed there.
juliaElastic
left a comment
There was a problem hiding this comment.
Tested locally, LGTM
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Public APIs missing exports
History
cc @criamico |
## Summary Follow up of #208091, #213211 and #213211 Small UI enhancements to the SSL options introduced with the mentioned PRs - All the forms are now nested under an accordion to avoid taking too much space <details> <summary>Fleet server hosts</summary> <img width="804" alt="Screenshot 2025-03-12 at 11 38 01" src="https://github.com/user-attachments/assets/5835811a-6a22-470e-9e74-6dfc78761d8b" /> <img width="806" alt="Screenshot 2025-03-12 at 11 38 11" src="https://github.com/user-attachments/assets/865f02b0-ec36-489f-904c-97c91a29ffca" /> <img width="787" alt="Screenshot 2025-03-12 at 11 51 39" src="https://github.com/user-attachments/assets/494e20b7-a44b-45e9-aead-c7d51260da72" /> <img width="795" alt="Screenshot 2025-03-12 at 11 51 51" src="https://github.com/user-attachments/assets/ba0abb37-0142-4ae1-ab5f-f2af96602c7a" /> </details> <details> <summary>Agent Binary source</summary> <img width="801" alt="Screenshot 2025-03-12 at 11 39 38" src="https://github.com/user-attachments/assets/915b4ed9-d23d-4764-9805-aef5cce5798e" /> <img width="801" alt="Screenshot 2025-03-12 at 11 39 44" src="https://github.com/user-attachments/assets/ea0347fb-a1fa-4454-b296-a132dffe6611" /> </details> <details> <summary>ES Outputs</summary> <img width="801" alt="Screenshot 2025-03-12 at 11 38 30" src="https://github.com/user-attachments/assets/7ae7fdd4-f693-4d12-bb7e-79ddee2c6c3b" /> <img width="803" alt="Screenshot 2025-03-12 at 11 38 36" src="https://github.com/user-attachments/assets/179463c2-9cbb-4dec-8f80-44c08a53073d" /> </details> <details> <summary>Remote ES Outputs</summary> <img width="802" alt="Screenshot 2025-03-12 at 11 46 39" src="https://github.com/user-attachments/assets/b1f151a9-433a-4699-8aec-79f8174d069f" /> </details> <details> <summary>Logstash Outputs</summary> <img width="803" alt="Screenshot 2025-03-12 at 11 39 25" src="https://github.com/user-attachments/assets/1f4da34c-ba2a-47e8-a258-61d943e9af7a" /> </details> ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
## Summary Follow up of elastic#208091, elastic#213211 and elastic#213211 Small UI enhancements to the SSL options introduced with the mentioned PRs - All the forms are now nested under an accordion to avoid taking too much space <details> <summary>Fleet server hosts</summary> <img width="804" alt="Screenshot 2025-03-12 at 11 38 01" src="https://github.com/user-attachments/assets/5835811a-6a22-470e-9e74-6dfc78761d8b" /> <img width="806" alt="Screenshot 2025-03-12 at 11 38 11" src="https://github.com/user-attachments/assets/865f02b0-ec36-489f-904c-97c91a29ffca" /> <img width="787" alt="Screenshot 2025-03-12 at 11 51 39" src="https://github.com/user-attachments/assets/494e20b7-a44b-45e9-aead-c7d51260da72" /> <img width="795" alt="Screenshot 2025-03-12 at 11 51 51" src="https://github.com/user-attachments/assets/ba0abb37-0142-4ae1-ab5f-f2af96602c7a" /> </details> <details> <summary>Agent Binary source</summary> <img width="801" alt="Screenshot 2025-03-12 at 11 39 38" src="https://github.com/user-attachments/assets/915b4ed9-d23d-4764-9805-aef5cce5798e" /> <img width="801" alt="Screenshot 2025-03-12 at 11 39 44" src="https://github.com/user-attachments/assets/ea0347fb-a1fa-4454-b296-a132dffe6611" /> </details> <details> <summary>ES Outputs</summary> <img width="801" alt="Screenshot 2025-03-12 at 11 38 30" src="https://github.com/user-attachments/assets/7ae7fdd4-f693-4d12-bb7e-79ddee2c6c3b" /> <img width="803" alt="Screenshot 2025-03-12 at 11 38 36" src="https://github.com/user-attachments/assets/179463c2-9cbb-4dec-8f80-44c08a53073d" /> </details> <details> <summary>Remote ES Outputs</summary> <img width="802" alt="Screenshot 2025-03-12 at 11 46 39" src="https://github.com/user-attachments/assets/b1f151a9-433a-4699-8aec-79f8174d069f" /> </details> <details> <summary>Logstash Outputs</summary> <img width="803" alt="Screenshot 2025-03-12 at 11 39 25" src="https://github.com/user-attachments/assets/1f4da34c-ba2a-47e8-a258-61d943e9af7a" /> </details> ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
closes elastic#207324 follow up of elastic#207322 ## Summary Add ssl fields to agent binary source settings. The new fields allow users to set a TLS connection to the agent binary source uri. - The cert key will be stored either as an encrypted SO or a secret (latter option will be available once fleet server will have this functionality: elastic/fleet-server#4470). - The secret field is only available when the feature flag `enableSSLSecrets` is enabled, otherwise the cert key is saved as an encrypted SO. <details> <summary>Screenshots</summary> <img width="809" alt="Screenshot 2025-03-11 at 14 53 44" src="https://github.com/user-attachments/assets/e93a04cf-c699-4e13-8cb6-870986197f92" /> <img width="804" alt="Screenshot 2025-03-11 at 14 53 34" src="https://github.com/user-attachments/assets/c2c13c8f-e65c-4843-a538-d317e1359bf0" /> Generated policy: <img width="797" alt="Screenshot 2025-03-06 at 17 43 02" src="https://github.com/user-attachments/assets/12411fea-9a8b-4ee9-aa7c-123c6aefea4a" /> </details> ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary Follow up of elastic#208091, elastic#213211 and elastic#213211 Small UI enhancements to the SSL options introduced with the mentioned PRs - All the forms are now nested under an accordion to avoid taking too much space <details> <summary>Fleet server hosts</summary> <img width="804" alt="Screenshot 2025-03-12 at 11 38 01" src="https://github.com/user-attachments/assets/5835811a-6a22-470e-9e74-6dfc78761d8b" /> <img width="806" alt="Screenshot 2025-03-12 at 11 38 11" src="https://github.com/user-attachments/assets/865f02b0-ec36-489f-904c-97c91a29ffca" /> <img width="787" alt="Screenshot 2025-03-12 at 11 51 39" src="https://github.com/user-attachments/assets/494e20b7-a44b-45e9-aead-c7d51260da72" /> <img width="795" alt="Screenshot 2025-03-12 at 11 51 51" src="https://github.com/user-attachments/assets/ba0abb37-0142-4ae1-ab5f-f2af96602c7a" /> </details> <details> <summary>Agent Binary source</summary> <img width="801" alt="Screenshot 2025-03-12 at 11 39 38" src="https://github.com/user-attachments/assets/915b4ed9-d23d-4764-9805-aef5cce5798e" /> <img width="801" alt="Screenshot 2025-03-12 at 11 39 44" src="https://github.com/user-attachments/assets/ea0347fb-a1fa-4454-b296-a132dffe6611" /> </details> <details> <summary>ES Outputs</summary> <img width="801" alt="Screenshot 2025-03-12 at 11 38 30" src="https://github.com/user-attachments/assets/7ae7fdd4-f693-4d12-bb7e-79ddee2c6c3b" /> <img width="803" alt="Screenshot 2025-03-12 at 11 38 36" src="https://github.com/user-attachments/assets/179463c2-9cbb-4dec-8f80-44c08a53073d" /> </details> <details> <summary>Remote ES Outputs</summary> <img width="802" alt="Screenshot 2025-03-12 at 11 46 39" src="https://github.com/user-attachments/assets/b1f151a9-433a-4699-8aec-79f8174d069f" /> </details> <details> <summary>Logstash Outputs</summary> <img width="803" alt="Screenshot 2025-03-12 at 11 39 25" src="https://github.com/user-attachments/assets/1f4da34c-ba2a-47e8-a258-61d943e9af7a" /> </details> ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
|
Just commenting to leave a trail on use of |
closes #207324
follow up of #207322
Summary
Add ssl fields to agent binary source settings. The new fields allow users to set a TLS connection to the agent binary source uri.
enableSSLSecretsis enabled, otherwise the cert key is saved as an encrypted SO.Screenshots
Generated policy:

Checklist