# No SAN option available in verbose mode of elasticsearch-certutil

**URL:** <https://discuss.elastic.co/t/no-san-option-available-in-verbose-mode-of-elasticsearch-certutil/347115>\
**Category:** Elasticsearch\
**Created:** [November 14, 2023, 12:10pm UTC](https://discuss.elastic.co/t/no-san-option-available-in-verbose-mode-of-elasticsearch-certutil/347115 "2023-11-14T12:10:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carel0x53](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carel0x53/32/127511_2.png) [@carel0x53](https://discuss.elastic.co/u/carel0x53)\
**Post date:** [November 14, 2023, 12:10pm UTC](https://discuss.elastic.co/t/no-san-option-available-in-verbose-mode-of-elasticsearch-certutil/347115/1 "2023-11-14T12:10:45Z")

</div>

I was setting up the SSL certificates for Kibana, and when I tried to generate a enrollment token, using this command:

```auto
(as root)
/usr/share/elasticsearch# bin/elasticsearch-create-enrollment-token -s kibana

```

I got the following error:

```auto
java.security.cert.CertificateException: No subject alternative names present

```

Looking some topics, I found out that to solve this I have to re-generate the certificate adding the SAN. But using certutil there's no mention to any option that allows to fill this field, except if I use the silent mode (that allows to set some parameters within a .yml that in the end results in filling the SAN field)

I don't want to create a .yml, because I'm doing in a single node cluster for only localhost server, and start all the process again of configuring the SSL connection.

Any Ideas why? How can I generate a proper certification using certutil in verbose mode?

Thank you

---

<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:** [November 16, 2023, 3:35am UTC](https://discuss.elastic.co/t/no-san-option-available-in-verbose-mode-of-elasticsearch-certutil/347115/2 "2023-11-16T03:35:58Z")

</div>

`elasticsearch-create-enrollment-token` is only designed to work on clusters where security was auto configured.  
You _might_ make it work by updating your certificates to have the required SAN entries, but I can't guarantee it - you might just run into a new problem after that.

A "SAN" isn't really a single thing. It's one section (extension) in the certificate but it has multiple field types within it, so there isn't a way to tell certutil to "add a SAN" you need to be explicit about which type of field you want to add.

The relevant command line options to [certutil](https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html) are:

> - `--ip <IP_addresses>`
> - `--dns <domain_name>`

---

<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:** [December 14, 2023, 3:36am UTC](https://discuss.elastic.co/t/no-san-option-available-in-verbose-mode-of-elasticsearch-certutil/347115/3 "2023-12-14T03:36:48Z")

</div>

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