Describe the bug
When creating a new elastic package profile, the Kibana certificates are not signed by a CA.
In-depth
When trying to debug Kibana and run the entire stack locally, the local integration registry cannot be accessed since the Kibana self-signed certificate is not verified by a CA.
Steps to reproduce
- Create a new elastic-package profile (for example
elastic-package profiles create debug_kibana)
- From the
integration local repository Run the entire stack using elastic package elastic-package stack up --version 8.5.0-SNAPSHOT -v -d -p debug_kibana
- Kill the Kibana docker
- Run Kibana locally with
NODE_EXTRA_CA_CERTS=/Users/<your_user_name>/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem yarn start --no-base-path
- Open Kibana and go to the
Integration page
- Integration registry couldn't be accessed due to
Error connecting to package registry: request to https://localhost:8080/search?experimental=true&kibana.version=8.5.0 failed, reason: self signed certificate in certificate chain
My Kibana configuration (kibana.dev.yml)
# connect to stack:
elasticsearch.serviceAccountToken: 'AAEAAWVsYXN0aWMva2liYW5hL2VsYXN0aWMtcGFja2FnZS1raWJhbmEtdG9rZW46b2x4b051SWNRa0tYMHdXazdLWmFBdw'
elasticsearch.ssl.certificateAuthorities: "/Users/ofirlapid/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem"
elasticsearch.hosts: [ "https://localhost:9200" ]
#elasticsearch.ssl.verificationMode: none
xpack.fleet.agents.enabled: true
xpack.fleet.registryUrl: 'https://localhost:8080'
#xpack.fleet.registryUrl: 'https://epr-snapshot.elastic.co'
xpack.fleet.agents.fleet_server.hosts: [ "https://localhost:8220" ]
xpack.encryptedSavedObjects.encryptionKey: '12345678901234567890123456789012'
monitoring.ui.container.elasticsearch.enabled: true
server.ssl.enabled: true
server.ssl.certificate: "/Users/ofirlapid/.elastic-package/profiles/debug_kibana/certs/kibana/cert.pem"
server.ssl.key: "/Users/ofirlapid/.elastic-package/profiles/debug_kibana/certs/kibana/key.pem"
server.ssl.certificateAuthorities: ["/Users/ofirlapid/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem"]
Workarounds
I find two workarounds to solve it:
-
Verifying the certificates myself.
a. Go to the location of the certificates (/Users/<your_user_name>/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem)
b. Verifying the certificates openssl verify -verbose -x509_strict -CAfile ca-cert.pem cert.pem key.pem
-
When running Kibana you can use the default certificate which is verified.
So instead of
Run Kibana locally with NODE_EXTRA_CA_CERTS=/Users/<your_user_name>/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem yarn start --no-base-path
You can run NODE_EXTRA_CA_CERTS=/Users/<your_user_name>/.elastic-package/profiles/**default**/certs/kibana/ca-cert.pem yarn start --no-base-path
My environment
Desktop
OS: MacOS
Browser: Chrome
Kibana Version: main branch
SHA: 875a624179a1191f4219da11aa9740b2f6c15f8b
Elastic-package - v0.60.0, darwin_arm64
Suggested solution
I guess that when creating a new profile, we need to add one more step which verifies the relevant certificates.
Describe the bug
When creating a new elastic package profile, the Kibana certificates are not signed by a CA.
In-depth
When trying to debug Kibana and run the entire stack locally, the local integration registry cannot be accessed since the Kibana self-signed certificate is not verified by a CA.
Steps to reproduce
elastic-package profiles create debug_kibana)integrationlocal repository Run the entire stack using elastic packageelastic-package stack up --version 8.5.0-SNAPSHOT -v -d -p debug_kibanaNODE_EXTRA_CA_CERTS=/Users/<your_user_name>/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem yarn start --no-base-pathIntegrationpageError connecting to package registry: request to https://localhost:8080/search?experimental=true&kibana.version=8.5.0 failed, reason: self signed certificate in certificate chainMy Kibana configuration (kibana.dev.yml)
Workarounds
I find two workarounds to solve it:
Verifying the certificates myself.
a. Go to the location of the certificates (/Users/<your_user_name>/.elastic-package/profiles/debug_kibana/certs/kibana/ca-cert.pem)
b. Verifying the certificates
openssl verify -verbose -x509_strict -CAfile ca-cert.pem cert.pem key.pemWhen running Kibana you can use the default certificate which is verified.
So instead of
You can run
NODE_EXTRA_CA_CERTS=/Users/<your_user_name>/.elastic-package/profiles/**default**/certs/kibana/ca-cert.pem yarn start --no-base-pathMy environment
Desktop
OS: MacOS
Browser: Chrome
Kibana Version:
mainbranchSHA: 875a624179a1191f4219da11aa9740b2f6c15f8b
Elastic-package - v0.60.0, darwin_arm64
Suggested solution
I guess that when creating a new profile, we need to add one more step which verifies the relevant certificates.