# Selfhosted Sharepoint Connector and self-signed Certs

**URL:** <https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522>\
**Category:** Elasticsearch\
**Created:** [December 5, 2024, 10:32am UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522 "2024-12-05T10:32:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fal77](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@fal77](https://discuss.elastic.co/u/fal77)\
**Post date:** [December 5, 2024, 10:32am UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522/1 "2024-12-05T10:32:59Z")

</div>

Hi everyone,  
I run ES 8.16.1 secured as to the documentation. Downloaded the source for the sharepoint connector and did a clean install.  
My config.yml looks like this:

```auto
connectors:
-
  connector_id: "cLzelZMBUWuJQBqZqfS4"
  service_type: "sharepoint_server"
  api_key: "b2d6ZWxaTUJLY282ZFJhUXF2d2c6TDQ0Uk9ScGdRc0dubWRTTFBubjhPQQ=="

elasticsearch:
  host: "https://172.17.20.96:9200"
  api_key: "b2d6ZWxaTUJLY282ZFJhUXF2d2c6TDQ0Uk9ScGdRc0dubWRTTFBubjhPQQ=="
  elasticsearch.ssl: true
  elasticsearch.verify_certs: true
  elasticsearch.ca_certs: "/root/connectors/certs/http_ca.crt"

```

The cert is copied from my first Node. When I run "make run", I get the  
error:

```auto
make run
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
Requirement already satisfied: pip in ./.venv/lib64/python3.12/site-packages (24.3.1)
.venv/bin/pip install --upgrade setuptools
Requirement already satisfied: setuptools in ./.venv/lib64/python3.12/site-packages (75.6.0)
.venv/bin/pip-licenses --format=plain-vertical --with-license-file --no-license-path > NOTICE.txt
Due to the length of these fields, this option is best paired with --format=json.
.venv/bin/elastic-ingest
[FMWK][09:48:35][INFO] Running connector service version 9.0.0
[FMWK][09:48:35][INFO] Loading config from /root/connectors/connectors/../config.yml
[FMWK][09:48:35][INFO] Running preflight checks
[FMWK][09:48:35][INFO] Waiting for Elasticsearch at https://172.17.20.96:9200 (so far: 0 secs)
[FMWK][09:48:35][ERROR] Could not connect to the Elasticsearch server
[FMWK][09:48:35][ERROR] Cannot connect to host 172.17.20.96:9200 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)')]

```

Can anybody point out, what's going wrong!? Thanks in advance

---

<div class="post-metadata">

**Author:** ![fal77](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@fal77](https://discuss.elastic.co/u/fal77)\
**Post date:** [January 7, 2025, 9:33am UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522/2 "2025-01-07T09:33:56Z")

</div>

Push  
Anything missing?

---

<div class="post-metadata">

**Author:** ![nfeekery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nfeekery/32/117349_2.png) [@nfeekery](https://discuss.elastic.co/u/nfeekery)\
**Post date:** [January 14, 2025, 11:05pm UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522/3 "2025-01-14T23:05:37Z")

</div>

@fal77 just confirming, is the main post's configuration still unchanged? Because it appears that there are two `elasticsearch` keys in the configuration, when there should be one. The cert values are effectively double-nested under `elasticsearch.elasticsearch.*`.

Can you try with this?

```auto
elasticsearch:
  host: "https://your-host:9200"
  api_key: <REDACTED>
  ssl: true
  verify_certs: true
  ca_certs: "/root/connectors/certs/http_ca.crt"

```

Also, be sure to rotate your API key if this isn't a local dev env. Sharing it here means anyone can use it.

---

<div class="post-metadata">

**Author:** ![fal77](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@fal77](https://discuss.elastic.co/u/fal77)\
**Post date:** [January 15, 2025, 7:27am UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522/4 "2025-01-15T07:27:47Z")

</div>

@nfeekery  
Hi Navarone,  
thanks for looking in this and no worries 🙂 It is a local dev environment and the api-key has expired immediately after I posted it.  
You are right, the cert values where double-nested ... my mistake. But even after changing this, the error remains.

---

<div class="post-metadata">

**Author:** ![nfeekery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nfeekery/32/117349_2.png) [@nfeekery](https://discuss.elastic.co/u/nfeekery)\
**Post date:** [January 15, 2025, 1:01pm UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522/5 "2025-01-15T13:01:45Z")

</div>

Glad to know they're dev credentials 🙂

In that case, can you confirm that the cert itself works with Elasticsearch?

```auto
curl -H "Authorization: ApiKey $API_KEY" --ca-cert /root/connectors/certs/http_ca.crt https://172.17.20.96:9200/

```

---

<div class="post-metadata">

**Author:** ![fal77](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@fal77](https://discuss.elastic.co/u/fal77)\
**Post date:** [January 16, 2025, 8:08am UTC](https://discuss.elastic.co/t/selfhosted-sharepoint-connector-and-self-signed-certs/371522/6 "2025-01-16T08:08:48Z")

</div>

No, it doesn't work ... same error message as above but this was the missing hint I needed 🙂 It is not the http\_ca.crt which was required but the ca.crt.  
Thanks again for your help!!!
