# How to skip SSL validation for creating S3 repository?

**URL:** https://discuss.elastic.co/t/how-to-skip-ssl-validation-for-creating-s3-repository/165797
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [January 25, 2019, 3:20pm UTC](https://discuss.elastic.co/t/how-to-skip-ssl-validation-for-creating-s3-repository/165797 "2019-01-25T15:20:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iamadeveloper](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@iamadeveloper](https://discuss.elastic.co/u/iamadeveloper)
#### Post date: [January 25, 2019, 3:20pm UTC](https://discuss.elastic.co/t/how-to-skip-ssl-validation-for-creating-s3-repository/165797/1 "2019-01-25T15:20:56Z")

</div>

I am trying to create S3 repository. But Certificate to S3 endpoint is invalid. How do I skip SSL verification?

```
curl -X PUT "172.16.2.54:9200/_snapshot/my_s3_repository?pretty" -H 'Content-Type: application/json' -d'
{
  "type": "s3",
  "settings": {
    "bucket": "COS_bucket"
  }
}
'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_exception",
        "reason" : "[my_s3_repository] failed to create repository"
      }
],
"type" : "repository_exception",
"reason" : "[my_s3_repository] failed to create repository",
"caused_by" : {
  "type" : "sdk_client_exception",
  "reason" : "Unable to execute HTTP request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
  "caused_by" : {
    "type" : "s_s_l_handshake_exception",
    "reason" : "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
    "caused_by" : {
      "type" : "validator_exception",
      "reason" : "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
      "caused_by" : {
        "type" : "sun_cert_path_builder_exception",
        "reason" : "unable to find valid certification path to requested target"
      }
    }
  }
}
  },
  "status" : 500
}
```

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [January 28, 2019, 11:57pm UTC](https://discuss.elastic.co/t/how-to-skip-ssl-validation-for-creating-s3-repository/165797/2 "2019-01-28T23:57:12Z")

</div>

You cannot skip SSL verification.

What is wrong with the endpoint on your repository?  
If it's just that the issuer is untrusted, then you could add it to your `cacerts` for your JRE.  
If it's genuinely invalid (e.g. wrong hostname) then you'll need to fix it.

---

<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: [February 25, 2019, 11:57pm UTC](https://discuss.elastic.co/t/how-to-skip-ssl-validation-for-creating-s3-repository/165797/3 "2019-02-25T23:57:13Z")

</div>

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