How to skip SSL validation for creating S3 repository?

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
}

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.

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