-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed
Labels
:Security/SecuritySecurity issues without another labelSecurity issues without another label>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Description
Original comment by @gmoskovicz:
x-pack version: 6.0 and 6.1
If you run the migration tool command without a password you get a NullPointerException:
bin/x-pack/migrate native -U http://localhost:9200 -u elastic
Response:
starting migration of users and roles...
importing users from [/Users/Gabriel/Documents/ElasticSearch/elasticsearch-6.0.0/config/x-pack/users]...
Exception in thread "main" ElasticsearchException[failed to get users that already exist, skipping user import]; nested: NullPointerException;
at org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.importUsers(ESNativeRealmMigrateTool.java:272)
at org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.execute(ESNativeRealmMigrateTool.java:149)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool.main(ESNativeRealmMigrateTool.java:91)
Caused by: java.lang.NullPointerException
at org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.postURL(ESNativeRealmMigrateTool.java:179)
at org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.getUsersThatExist(ESNativeRealmMigrateTool.java:218)
at org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool$MigrateUserOrRoles.importUsers(ESNativeRealmMigrateTool.java:270)
... 7 more
This is because LINK REDACTED
new SecureString(password.value(options).toCharArray())));
Metadata
Metadata
Assignees
Labels
:Security/SecuritySecurity issues without another labelSecurity issues without another label>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme