# SSL certificate - x509: certificate signed by unknown authority (Solved)

**URL:** https://discuss.elastic.co/t/ssl-certificate-x509-certificate-signed-by-unknown-authority-solved/328011
**Category:** Elastic Agent
**Created:** [March 19, 2023, 8:15am UTC](https://discuss.elastic.co/t/ssl-certificate-x509-certificate-signed-by-unknown-authority-solved/328011 "2023-03-19T08:15:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nicolas\_Pelletier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicolas_pelletier/32/118570_2.png) [@Nicolas\_Pelletier](https://discuss.elastic.co/u/Nicolas_Pelletier)
#### Post date: [March 19, 2023, 8:15am UTC](https://discuss.elastic.co/t/ssl-certificate-x509-certificate-signed-by-unknown-authority-solved/328011/1 "2023-03-19T08:15:24Z")

</div>

I've deployed a standalone elastic-agent on my host machine where ELK is running.  
I've add the MISP integration policy to this standalone agent with [https://localhost](https://localhost) as MISP url variable. It's self signed certificate.

The following error `"message":"Post \"https://localhost/events/restSearch\": x509: certificate signed by unknown authority" `

```auto
{"log.level":"error","@timestamp":"2023-03-18T22:33:55.333+0100","message":"request failed","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"httpjson-default","type":"httpjson"},"log":{"source":"httpjson-default"},"log.origin":{"file.line":553,"file.name":"go-retryablehttp@v0.6.6/client.go"},"service.name":"filebeat","id":"httpjson-ti_misp.threat-5a6d0281-31a7-4cf9-b069-7c9610e62eb9","method":"POST","log.logger":"input.httpjson-cursor.retryablehttp","input_source":"https://localhost/events/restSearch","input_url":"https://localhost/events/restSearch","error":{"message":"Post \"https://localhost/events/restSearch\": x509: certificate signed by unknown authority"},"url":"https://localhost/events/restSearch","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-03-18T22:33:55.333+0100","message":"Error while processing http request: failed to execute rf.collectResponse: failed to execute http client.Do: failed to execute http client.Do: failed to read http.response.body: Post \"https://localhost/events/restSearch\": Post \"https://localhost/events/restSearch\": x509: certificate signed by unknown authority","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"httpjson-default","type":"httpjson"},"log":{"source":"httpjson-default"},"service.name":"filebeat","input_url":"https://localhost/events/restSearch","log.origin":{"file.line":135,"file.name":"httpjson/input.go"},"id":"httpjson-ti_misp.threat-5a6d0281-31a7-4cf9-b069-7c9610e62eb9","input_source":"https://localhost/events/restSearch","ecs.version":"1.6.0","log.logger":"input.httpjson-cursor","ecs.version":"1.6.0"}

```

Is there a way to put it insecure in `elastic-agent.yml` config file like when we `curl` with `-k` argument ?

**Update Post**

Unfortunately you can't reach the misp server using `http`it has to be `https`.  
I've found the following files related to `misp certificate`:

```auto
sudo find /etc -name "*misp*": 
/etc/ssl/private/misp.local.crt
/etc/ssl/private/misp.local.key

```

Ok i think i found it. There is a `ssl.verification_mode` setting in the MISP integration policy that i have to attach to elastic agent.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06543113e4d2e4d794526a8f8189f151b8affd6c.png)

Basically you just have to replace in `elastic-agent.yml` config file this line:  
`request.ssl: null`  
by these lines:

```auto
request.ssl:
          verification_mode: none

```

Then you have to make a `./elastic-agent install` then the error disapear and a new one comes up 😉

---

<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: [April 16, 2023, 8:15am UTC](https://discuss.elastic.co/t/ssl-certificate-x509-certificate-signed-by-unknown-authority-solved/328011/2 "2023-04-16T08:15:50Z")

</div>

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