forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Synthetics] Omit or include
ssl
keys when appropriate for project …
…monitors and private locations (elastic#149298) ## Summary Resolves elastic#149083 1. [Prevents tls fields from being saved](https://github.com/elastic/kibana/pull/149298/files#diff-56296f634bf379eb71629f426c670cd030d2a15263a59964847c0d10af09a767R14) on the Synthetics Integration policy when `is_tls_enabled` is false 2. Ensures `is_tls_enabled` is set properly for project monitors ([http](https://github.com/elastic/kibana/pull/149298/files#diff-0f42bb3b11a6ab864dee3488d5e9f7282adc009a261b3caee743a880b825c766R73) and [tcp](https://github.com/elastic/kibana/pull/149298/files#diff-3ad87e629abc6f17c395e8435c94f0f1a6274c9efea7d24ab81b7635ef0e43dfR69)). This ensures that when a monitor is sent to a public location or a private location, the `ssl` fields are sent or stripped appropriately. ### Testing 1. Create a private location 2. Create 2 lightweight project monitors using the following configuration ``` - type: tcp id: 'tls-enabled' name: 'TLS-Enabled' hosts: ["8.8.8.8:80"] ssl: verification_mode: 'strict' ``` ``` - type: tcp id: 'tls-disabled' name: 'TLS-Disabled' hosts: ["8.8.8.8:80"] ``` 3. Set these monitors to execute from both a private and public location via the `monitor` key in your `synthetics.config.ts` file. ``` monitor: { schedule: 3, privateLocations: ["YOUR PRIVATE LOCATION"], locations: ["us_central"], // to test against dev environment }, ``` 4. Navigate to the agent policy for the private location and inspect the full policy. Ensure the Synthetics policy on the agent package policy does not have `ssl` fields set for ssl disabled monitor. Ensure the `ssl` fields are set for the ssl enabled monitor. (cherry picked from commit 0592abd) # Conflicts: # x-pack/plugins/synthetics/common/formatters/format_synthetics_policy.test.ts # x-pack/plugins/synthetics/server/synthetics_service/project_monitor/normalizers/http_monitor.ts # x-pack/test/api_integration/apis/synthetics/sample_data/test_policy.ts
- Loading branch information
1 parent
4c24924
commit 1d792ba
Showing
15 changed files
with
1,891 additions
and
364 deletions.
There are no files selected for viewing
1,319 changes: 1,319 additions & 0 deletions
1,319
x-pack/plugins/synthetics/common/formatters/format_synthetics_policy.test.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.