# How to authenticate with X.509 PEM certificates and PKCS #8 keys

**URL:** <https://discuss.elastic.co/t/how-to-authenticate-with-x-509-pem-certificates-and-pkcs-8-keys/189063>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, es-hadoop\
**Created:** [July 5, 2019, 9:42am UTC](https://discuss.elastic.co/t/how-to-authenticate-with-x-509-pem-certificates-and-pkcs-8-keys/189063 "2019-07-05T09:42:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tzqtzq](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@tzqtzq](https://discuss.elastic.co/u/tzqtzq)\
**Post date:** [July 5, 2019, 9:42am UTC](https://discuss.elastic.co/t/how-to-authenticate-with-x-509-pem-certificates-and-pkcs-8-keys/189063/1 "2019-07-05T09:42:01Z")

</div>

my Component Version  
ES 5.4.3  
ES-hadoop 5.4.3  
SearchGuard 5.4.3  
in [es-hadoop-security](https://www.elastic.co/guide/en/elasticsearch/hadoop/5.0/security.html) Only supported Username/Password or PKI/X.509 ，I don't know how to configure the path of the pem and key files.  
Just like the following code is implemented in es-hadoop：

Settings settings = Settings.builder() .put(SSLConfigConstants.SEARCHGUARD\_SSL\_TRANSPORT\_PEMKEY\_FILEPATH,"/home/lixiang/tzq/clinet1.key") .put(SSLConfigConstants.SEARCHGUARD\_SSL\_TRANSPORT\_PEMCERT\_FILEPATH,"/home/lixiang/tzq/clinet1.pem") .put(SSLConfigConstants.SEARCHGUARD\_SSL\_TRANSPORT\_PEMTRUSTEDCAS\_FILEPATH, "/home/lixiang/tzq/root-ca.pem") .put(SSLConfigConstants.SEARCHGUARD\_SSL\_TRANSPORT\_PEMKEY\_PASSWORD, "nit6hwlmtNIL") .put(SSLConfigConstants.SEARCHGUARD\_SSL\_TRANSPORT\_ENFORCE\_HOSTNAME\_VERIFICATION, false) .put("client.transport.sniff",false) .put("cluster.name","my-es" ).build();  
Please help me！

---

<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:** [August 2, 2019, 9:42am UTC](https://discuss.elastic.co/t/how-to-authenticate-with-x-509-pem-certificates-and-pkcs-8-keys/189063/2 "2019-08-02T09:42:02Z")

</div>

Closed on August 2, 2019, 9:42am UTC

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