---------------------------------安裝es的search-guard------------------------------------------------------------------
1、下載對應的版本並運行安裝命令(https://docs.search-guard.com/6.x-25/search-guard-versions)
.\bin\elasticsearch-plugin install -b file:///C:\Users\Administrator\Downloads\search-guard-6-6.8.3-25.5.zip
2、https://downloads.search-guard.com/resources/certificates/certificates.zip下載測試證書解壓並放置到es的config目錄下
3、修改elasticsearch.yml
--------------------------
xpack.security.enabled: false
searchguard.ssl.transport.pemcert_filepath: esnode.pem
searchguard.ssl.transport.pemkey_filepath: esnode-key.pem
searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.http.enabled: true
searchguard.ssl.http.pemcert_filepath: esnode.pem
searchguard.ssl.http.pemkey_filepath: esnode-key.pem
searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem
searchguard.allow_unsafe_democertificates: true
searchguard.allow_default_init_sgindex: true
searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test,C=de
searchguard.enable_snapshot_restore_privilege: true
searchguard.check_snapshot_restore_write_privileges: true
searchguard.restapi.roles_enabled: ["sg_all_access"]
--------------------------
4、啟動es訪問 https://localhost:9200/ 用戶名密碼 admin\admin
5、使用sgadmin tool更新應用配置切換到目錄plugins\search-guard-6\tools
執行 .\sgadmin.bat -cd ..\sgconfig -key ..\..\..\config\kirk-key.pem -cert ..\..\..\config\kirk.pem -cacert ..\..\..\config\root-ca.pem -nhnv -icl
#.\sgadmin.bat -icl -nhnv -cd ..\sgconfig -cacert ..\..\..\config\root-ca.pem -cert ..\..\..\config\kirk.pem -key ..\..\..\config\kirk.key -keypass XtHB8KsoVFhy
6、配置社區版本 ,修改elasticsearch.yml
-----------------------------------
searchguard.enterprise_modules_enabled: false
-----------------------------------
7、校驗版本 https://localhost:9200/_searchguard/license
-------------------------------------ssl證書下載以及配置--------------------------------------------------------------------------
1、下載offline TLS tool(https://search.maven.org/search?q=a:search-guard-tlstool)
-------------------------------------安裝kibana的search-guard---------------------------------------------------------------------------
1、下載對應的版本並運行安裝命令(https://docs.search-guard.com/6.x-25/search-guard-versions)
.\bin\kibana-plugin install file:///C:\Users\Administrator\Downloads\search-guard-kibana-plugin-6.8.3-18.5.zip
2、修改kibana.yml
---------------------------------------
xpack.security.enabled: false
# Use HTTPS instead of HTTP
elasticsearch.hosts: ["https://localhost:9200"]
# Configure the Kibana internal server user
elasticsearch.username: "admin"
elasticsearch.password: "admin"
# Disable SSL verification because we use self-signed demo certificates
elasticsearch.ssl.verificationMode: none
# Whitelist the Search Guard Multi Tenancy Header
elasticsearch.requestHeadersWhitelist: [ "Authorization", "sgtenant" ]
---------------------------------------
3、啟動kibana並訪問http://localhost:5601/
參考資料
https://github.com/floragunncom/
https://docs.search-guard.com/6.x-25/
https://github.com/liyifan687/Elasticsearch
https://blog.csdn.net/wangkai_123456/article/details/95938714
https://docs.search-guard.com/6.x-25/offline-tls-tool
https://github.com/beshu-tech/readonlyrest-docs/blob/master/elasticsearch.md#rules
https://www.aboutyun.com/forum.php?mod=viewthread&tid=27241&ordertype=1
---------------------------------安裝es的search-guard------------------------------------------------------------------
1、下載對應的版本並運行安裝命令(https://docs.search-guard.com/6.x-25/search-guard-versions).\bin\elasticsearch-plugin install -b file:///C:\Users\Administrator\Downloads\search-guard-6-6.8.3-25.5.zip
2、https://downloads.search-guard.com/resources/certificates/certificates.zip下載測試證書解壓並放置到es的config目錄下
3、修改elasticsearch.yml--------------------------xpack.security.enabled: false
searchguard.ssl.transport.pemcert_filepath: esnode.pemsearchguard.ssl.transport.pemkey_filepath: esnode-key.pemsearchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pemsearchguard.ssl.transport.enforce_hostname_verification: falsesearchguard.ssl.http.enabled: truesearchguard.ssl.http.pemcert_filepath: esnode.pemsearchguard.ssl.http.pemkey_filepath: esnode-key.pemsearchguard.ssl.http.pemtrustedcas_filepath: root-ca.pemsearchguard.allow_unsafe_democertificates: truesearchguard.allow_default_init_sgindex: truesearchguard.authcz.admin_dn: - CN=kirk,OU=client,O=client,L=test,C=desearchguard.enable_snapshot_restore_privilege: truesearchguard.check_snapshot_restore_write_privileges: truesearchguard.restapi.roles_enabled: ["sg_all_access"]
--------------------------
4、啟動es訪問 https://localhost:9200/ 用戶名密碼 admin\admin
5、使用sgadmin tool更新應用配置切換到目錄plugins\search-guard-6\tools
執行 .\sgadmin.bat -cd ..\sgconfig -key ..\..\..\config\kirk-key.pem -cert ..\..\..\config\kirk.pem -cacert ..\..\..\config\root-ca.pem -nhnv -icl
.\sgadmin.bat -icl -nhnv -cd ..\sgconfig -cacert ..\..\..\config\root-ca.pem -cert ..\..\..\config\kirk.pem -key ..\..\..\config\kirk.key -keypass XtHB8KsoVFhy
6、配置社區版本 ,修改elasticsearch.yml-----------------------------------searchguard.enterprise_modules_enabled: false-----------------------------------7、校驗版本 https://localhost:9200/_searchguard/license
-------------------------------------ssl證書下載以及配置--------------------------------------------------------------------------
1、下載offline TLS tool(https://search.maven.org/search?q=a:search-guard-tlstool)
-------------------------------------安裝kibana的search-guard---------------------------------------------------------------------------
1、下載對應的版本並運行安裝命令(https://docs.search-guard.com/6.x-25/search-guard-versions).\bin\kibana-plugin install file:///C:\Users\Administrator\Downloads\search-guard-kibana-plugin-6.8.3-18.5.zip
2、修改kibana.yml---------------------------------------xpack.security.enabled: false
# Use HTTPS instead of HTTPelasticsearch.hosts: ["https://localhost:9200"]
# Configure the Kibana internal server userelasticsearch.username: "admin"elasticsearch.password: "admin"
# Disable SSL verification because we use self-signed demo certificateselasticsearch.ssl.verificationMode: none
# Whitelist the Search Guard Multi Tenancy Headerelasticsearch.requestHeadersWhitelist: [ "Authorization", "sgtenant" ]---------------------------------------
3、啟動kibana並訪問http://localhost:5601/
參考資料 https://github.com/floragunncom/https://docs.search-guard.com/6.x-25/https://github.com/liyifan687/Elasticsearchhttps://blog.csdn.net/wangkai_123456/article/details/95938714https://docs.search-guard.com/6.x-25/offline-tls-tool
https://github.com/beshu-tech/readonlyrest-docs/blob/master/elasticsearch.md#ruleshttps://www.aboutyun.com/forum.php?mod=viewthread&tid=27241&ordertype=1