{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/29847","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/29847/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/29847/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/29847/events","html_url":"https://github.com/elastic/elasticsearch/issues/29847","id":317448606,"node_id":"MDU6SXNzdWUzMTc0NDg2MDY=","number":29847,"title":"Security: Migrate tool throws a NPE when not using a password","user":{"login":"elasticmachine","id":15837671,"node_id":"MDQ6VXNlcjE1ODM3Njcx","avatar_url":"https://avatars3.githubusercontent.com/u/15837671?v=4","gravatar_id":"","url":"https://api.github.com/users/elasticmachine","html_url":"https://github.com/elasticmachine","followers_url":"https://api.github.com/users/elasticmachine/followers","following_url":"https://api.github.com/users/elasticmachine/following{/other_user}","gists_url":"https://api.github.com/users/elasticmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticmachine/subscriptions","organizations_url":"https://api.github.com/users/elasticmachine/orgs","repos_url":"https://api.github.com/users/elasticmachine/repos","events_url":"https://api.github.com/users/elasticmachine/events{/privacy}","received_events_url":"https://api.github.com/users/elasticmachine/received_events","type":"User","site_admin":false},"labels":[{"id":912838879,"node_id":"MDU6TGFiZWw5MTI4Mzg4Nzk=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Security/Security","name":":Security/Security","color":"0e8a16","default":false},{"id":23173,"node_id":"MDU6TGFiZWwyMzE3Mw==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Ebug","name":">bug","color":"b60205","default":false},{"id":110815527,"node_id":"MDU6TGFiZWwxMTA4MTU1Mjc=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/adoptme","name":"adoptme","color":"207de5","default":false},{"id":92913858,"node_id":"MDU6TGFiZWw5MjkxMzg1OA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/low%20hanging%20fruit","name":"low hanging fruit","color":"07569b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-29T12:01:28Z","updated_at":"2018-06-08T11:16:06Z","closed_at":null,"author_association":"NONE","body":"*Original comment by @gmoskovicz:*\n\nx-pack version: 6.0 and 6.1\r\n\r\nIf you run the migration tool command without a password you get a NullPointerException:\r\n\r\n```\r\nbin/x-pack/migrate native -U http://localhost:9200 -u elastic\r\n```\r\n\r\nResponse:\r\n\r\n```\r\nstarting migration of users and roles...\r\nimporting users from [/Users/Gabriel/Documents/ElasticSearch/elasticsearch-6.0.0/config/x-pack/users]...\r\nException in thread \"main\" ElasticsearchException[failed to get users that already exist, skipping user import]; nested: NullPointerException;\r\n\tat org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.importUsers(ESNativeRealmMigrateTool.java:272)\r\n\tat org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.execute(ESNativeRealmMigrateTool.java:149)\r\n\tat org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69)\r\n\tat org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)\r\n\tat org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)\r\n\tat org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)\r\n\tat org.elasticsearch.cli.Command.main(Command.java:90)\r\n\tat org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool.main(ESNativeRealmMigrateTool.java:91)\r\nCaused by: java.lang.NullPointerException\r\n\tat org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.postURL(ESNativeRealmMigrateTool.java:179)\r\n\tat org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.getUsersThatExist(ESNativeRealmMigrateTool.java:218)\r\n\tat org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.importUsers(ESNativeRealmMigrateTool.java:270)\r\n\t... 7 more\r\n```\r\n\r\nThis is because LINK REDACTED\r\n\r\n```\r\n                            new SecureString(password.value(options).toCharArray())));\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/395730550","html_url":"https://github.com/elastic/elasticsearch/issues/29847#issuecomment-395730550","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/29847","id":395730550,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTczMDU1MA==","user":{"login":"thiyagu06","id":2901614,"node_id":"MDQ6VXNlcjI5MDE2MTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2901614?v=4","gravatar_id":"","url":"https://api.github.com/users/thiyagu06","html_url":"https://github.com/thiyagu06","followers_url":"https://api.github.com/users/thiyagu06/followers","following_url":"https://api.github.com/users/thiyagu06/following{/other_user}","gists_url":"https://api.github.com/users/thiyagu06/gists{/gist_id}","starred_url":"https://api.github.com/users/thiyagu06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiyagu06/subscriptions","organizations_url":"https://api.github.com/users/thiyagu06/orgs","repos_url":"https://api.github.com/users/thiyagu06/repos","events_url":"https://api.github.com/users/thiyagu06/events{/privacy}","received_events_url":"https://api.github.com/users/thiyagu06/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T11:16:06Z","updated_at":"2018-06-08T11:16:06Z","author_association":"NONE","body":"Any working on this? Or shall I take it up?"}}
{"actor":{"display_login":"thiyagu06"}}