2

According to https://www.elastic.co/guide/en/shield/current/kibana.html, I need to set

server.ssl.key: /path/to/your/server.key
server.ssl.cert: /path/to/your/server.crt

Where could I find the path for the key and cert in Windows Environment? Or how should I make one and find the key and path?

Kennedy Kan
  • 273
  • 1
  • 7
  • 20

1 Answers1

5

You need to generate your own self-signed certificate or request a certificate to a Trusted Authority. After this you will get the .key (the private key of the certificate) and .crt (the public part of the certificate)

To create a self signed certificate follow this link How to create a self-signed certificate with openssl?

You will need openssl

openssl genrsa -des3 -out server.key 2048
openssl rsa -in server.key -out server.key
openssl req -sha256 -new -key server.key -out server.csr -subj "/CN=localhost"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Replace 'localhost' with your domain name. Run commands one by one because openssl will prompt you same values for certificate generation

If you need a trusted certificate, request one to a trusted authority like letsencrypt.org

Rikki
  • 3,338
  • 1
  • 22
  • 34
pedrofb
  • 37,271
  • 5
  • 94
  • 142
  • 1
    I have use cygwin64 to run those commancds but I could not find back where those keys and certs have been created at. – Kennedy Kan Jun 22 '16 at 06:36
  • I do not know where is the HOME directory of cygwin. Try this link http://www.voxforge.org/home/docs/cygwin-cheat-sheet or this http://superuser.com/questions/388397/how-do-i-change-the-default-startup-directory-in-cygwin or look for openssl `openssl version -d` – pedrofb Jun 22 '16 at 06:47
  • Yes, this helps a lot. Great thanks. – Kennedy Kan Jun 22 '16 at 06:51
  • Hi @Kennedy Kan if this or any answer has solved your question please consider accepting it by clicking the check-mark or upvote if it has been helpful – pedrofb Jun 28 '16 at 06:00
  • Sure, thanks for your help. – Kennedy Kan Jun 28 '16 at 06:19