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

[Synthetics] ssl.certificate_authorities accepts only string not array #183300

Closed
devcorpio opened this issue May 13, 2024 · 2 comments · Fixed by #187952
Closed

[Synthetics] ssl.certificate_authorities accepts only string not array #183300

devcorpio opened this issue May 13, 2024 · 2 comments · Fixed by #187952
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Synthetics Team:obs-ux-management Observability Management User Experience Team

Comments

@devcorpio
Copy link
Contributor

Context

Kibana API returns an error when pushing (with the Synthetics agent) an HTTP monitor with the ssl.certificate_authorities set as an array.

Error: Invalid value "["/etc/ca.crt"]" supplied to "ssl.certificate_authorities"

Problem

The documentation states that ssl.certificate_authorities also accepts array values. Despite so, at the moment it only accepts string. This is contrary to the documented example which shows an array as a valid option and also contrary to the HB documentation which states the following:

"By default, you can specify a list of files that heartbeat will read, but you can also embed a certificate directly in the YAML configuration:"

heartbeat.yaml:

heartbeat.monitors:
- type: http
  name: Todos Lightweight
  id: todos-lightweight
  enabled: true
  urls: "https://elastic.github.io/synthetics-demo/"
  schedule: '@every 3m'
  timeout: 16s
  ssl:
    certificate_authorities: ['/etc/ca.crt']

Kibana endpoint:

https://YOUR_KIBANA_URL/s/default/api/synthetics/project/THE_NAME_OF_YOUR_PROJECT_MONITOR/monitors/_bulk_update

CURL example

curl -X PUT -H "Authorization: ApiKey YOUR_SYNTHETICS_API_KEY_HERE" -H "kbn-xsrf:true" -H "x-elastic-internal-origin:elastic-synthetics" -H "user-agent: Elastic/Synthetics 1.9.1"  -H "Content-Type: application/json" -d '{"monitors":[{"enabled":true,"locations":["australia-southeast1-a"],"tags":[""],"type":"http","name":"Todos Lightweight","id":"todos-lightweight","urls":"https://elastic.github.io/synthetics-demo/","schedule":3,"timeout":"16s","ssl":{"certificate_authorities":["/etc/ca.crt"]},"privateLocations":[],"params":{"url":"https://elastic.github.io/synthetics-demo/"},"hash":"h+mK8sg7CnBNbNJXRFjRo54rE85eu7jOlt4MmT6SnQY="}]}' "https://YOUR_KIBANA_URL/s/default/api/synthetics/project/THE_NAME_OF_YOUR_PROJECT_MONITOR/monitors/_bulk_update"

You will see below the associated SDH

@devcorpio devcorpio added bug Fixes for quality problems that affect the customer experience Synthetics Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels May 13, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@smith smith added Team:obs-ux-management Observability Management User Experience Team and removed Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Jul 8, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Synthetics Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants