--- title: Elasticsearch migrate to oss 盤點 tags: Elasticsearch description: View the slide with "Slide Mode". --- # Elasticsearch migrate to oss盤點 1. [User](#User-created-by-API) 1. elasticsearch.yml [相容] 1. jvm.options [相容] 1. log4j2.properties [相容] 1. elasticsearch.keystore [相容] 1. setting/mapping/template/analyzer 2. kibana space 3. kibana saved object | Elastic | Open distro | | -------- | -------- | | users.yml | internal_users.yml | | users_roles | | | role_mapping.yml | | | .kibana index | | ## User created by API ```json= # Elasticsearch { "_index" : ".security-7", "_type" : "_doc", "_id" : "user-user2", "_score" : 1.0, "_source" : { "username" : "user2", "password" : "$2a$10$cAcvBY4u7CX70u7iZSDN5O5HpbReAwUexTPcR2euBPepL7nylg/6e", "roles" : [ "my_test_role" ], "full_name" : "Jack Nicholson_v222222", "email" : "user2@example.com", "metadata" : { "intelligence" : 7 }, "enabled" : true, "type" : "user" } ``` #### open distro `curl --insecure -u admin -XGET https://192.168.8.34:9200/_opendistro/_security/api/internalusers?pretty` ```json= # open distro "user-test1" : { "hash" : "", "reserved" : false, "hidden" : false, "backend_roles" : [ ], "attributes" : { "full_name" : "YQ chen", "email" : "od-testuser@example.com" }, "opendistro_security_roles" : [ "alerting_crud_alerts", "test_role" ], "static" : false } ``` ### user 轉置 | 轉置欄位 | Elasticsearch | Open distro | | -------- | -------- | -------- | | | username | Rest API 指定 | | | password | hash | | | roles | opendistro_security_roles | | | full_name | attributes | | | email | attributes | | X | metadata | 要拆解一層到attributes | | | type | 對應Rest API | | X | enabled | attributes |