# Unable to find valid sertification path to requested target

**URL:** <https://discuss.elastic.co/t/unable-to-find-valid-sertification-path-to-requested-target/334810>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, elastic-stack-alerting\
**Created:** [May 31, 2023, 1:44pm UTC](https://discuss.elastic.co/t/unable-to-find-valid-sertification-path-to-requested-target/334810 "2023-05-31T13:44:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddoroshenko](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@ddoroshenko](https://discuss.elastic.co/u/ddoroshenko)\
**Post date:** [May 31, 2023, 1:44pm UTC](https://discuss.elastic.co/t/unable-to-find-valid-sertification-path-to-requested-target/334810/1 "2023-05-31T13:44:16Z")

</div>

Hi,

I have a watcher with webhook action. And get an error when the watcher is firing

```auto
"type": "s_s_l_handshake_exception",
"reason": " PKIX path building failed: sun.security.provider.certpath.SunCertPathBuildException: unable to find valid sertification path to requested target"

```

I have the following configuration in my elasticsearch.yaml file

```auto
xpack:
  security:
    http:
      ssl:
        enabled: false
        certification_authorities:
        - /path/to/ca_root.pem
        - /path/to/sub_ca.pem

```

Both certificates have `r` permissions for the ES user

What could be a problem?

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [June 1, 2023, 1:58am UTC](https://discuss.elastic.co/t/unable-to-find-valid-sertification-path-to-requested-target/334810/2 "2023-06-01T01:58:33Z")

</div>

You got the error because watcher did not trust the certificate provided by the server which the webhook action tries to hit. It has nothing to do with `xpack.security.http.ssl.xxx` configuration. Please refer to the [watcher specific SSL documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/notification-settings.html#ssl-notification-settings) to configure the SSL trust.

---

<div class="post-metadata">

**Author:** ![ddoroshenko](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@ddoroshenko](https://discuss.elastic.co/u/ddoroshenko)\
**Post date:** [June 5, 2023, 8:20am UTC](https://discuss.elastic.co/t/unable-to-find-valid-sertification-path-to-requested-target/334810/3 "2023-06-05T08:20:37Z")

</div>

@Yang_Wang thank you very much! Now it works 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 3, 2023, 8:21am UTC](https://discuss.elastic.co/t/unable-to-find-valid-sertification-path-to-requested-target/334810/4 "2023-07-03T08:21:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
