elasticsearch-tls
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| elasticsearch-tls [2020/11/07 12:08] – baumi | elasticsearch-tls [2020/11/08 12:41] (current) – baumi | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| - Shutdown elk-cluster | - Shutdown elk-cluster | ||
| - Add certificate path to elasticsearch config in docker-compose.yml< | - Add certificate path to elasticsearch config in docker-compose.yml< | ||
| - | volumes: | + | services: |
| - | - ./ | + | |
| + | volumes: | ||
| + | | ||
| </ | </ | ||
| - Start elasticsearch< | - Start elasticsearch< | ||
| Line 21: | Line 23: | ||
| Please enter the desired output file [elastic-stack-ca.zip]: | Please enter the desired output file [elastic-stack-ca.zip]: | ||
| [root@elk-test-elasticsearch elasticsearch]# | [root@elk-test-elasticsearch elasticsearch]# | ||
| + | Archive: | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| [root@elk-test-elasticsearch elasticsearch]# | [root@elk-test-elasticsearch elasticsearch]# | ||
| Line 151: | Line 157: | ||
| - ./ | - ./ | ||
| </ | </ | ||
| - | - Copy P12 file to correct place< | + | - Copy P12 file to correct place< |
| + | $ cp certs/ | ||
| + | $ sudo chown 1000:1000 elasticsearch/ | ||
| + | $ sudo chmod 600 elasticsearch/ | ||
| + | </ | ||
| - Update elasticsearch.yml< | - Update elasticsearch.yml< | ||
| $ grep xpack elasticsearch/ | $ grep xpack elasticsearch/ | ||
| Line 193: | Line 203: | ||
| PASSWORD elastic = *** | PASSWORD elastic = *** | ||
| </ | </ | ||
| - | | + | ===== Configure Kibana for TLS and User Authentication ===== |
| + | | ||
| + | $ cp certs/ | ||
| + | - Add CA file mount do docker-compose.yml< | ||
| + | services: | ||
| + | kibana: | ||
| + | volumes: | ||
| + | - ./ | ||
| + | </ | ||
| + | - Add TLS & authentication information to kibana.yml< | ||
| + | elasticsearch: | ||
| + | hosts: [ " | ||
| + | ssl.certificateAuthorities: | ||
| + | username: " | ||
| + | password: " | ||
| + | </ | ||
| + | - Restart elk-stack< | ||
| + | $ docker-compose up -d && docker-compose logs -f | ||
| + | </ | ||
| + | |||
| + | ===== Move username & password from Kibana Config ===== | ||
| + | |||
| + | - Create Keystore and populate with logon information< | ||
| + | $ docker exec -it elk-test-kibana bash | ||
| + | bash-4.2$ bin/ | ||
| + | Created Kibana keystore in / | ||
| + | bash-4.2$ bin/ | ||
| + | Enter value for elasticsearch.username: | ||
| + | bash-4.2$ bin/ | ||
| + | Enter value for elasticsearch.password: | ||
| + | </ | ||
| + | - Copy keystore to persistent storage< | ||
| + | $ docker cp elk-test-kibana:/ | ||
| + | </ | ||
| + | - Adjust docker-compose.yml for bind mount of keystore file< | ||
| + | services: | ||
| + | kibana: | ||
| + | volumes: | ||
| + | - ./ | ||
| + | </ | ||
| + | - Remove elasticsearch.username and elasticsearch.username from kibana.yml | ||
| + | - Restart kibana | ||
| + | |||
| {{tag>kb elasticsearch}} | {{tag>kb elasticsearch}} | ||
elasticsearch-tls.1604747323.txt.gz · Last modified: by baumi
