Configure basic auth
Basic auth enables password-based authentication for Data Migrator and Hive Migrator.
note
If basic auth is enabled for Hive Migrator or its REST API, ensure that the username and password match those used for Data Migrator.
Basic auth for Data Migrator is set in the following section of /etc/wandisco/livedata-migrator/application.properties
# security configuration for basic authenticationsecurity.type=off#security.type=basic#security.basic.user=admin#security.basic.password=$2aBCRYPTPASSWORDSTRING.eMyOt67yEM6TVkz1qeIxDMfaCnI8SjFaRUy
#
Enable Basic authentication (Data Migrator)Use the following steps to enable basic auth:
Open
/etc/wandisco/hivemigrator/application.properties
in a text editor.Comment out
security.type=off
.#security.type=off
Uncomment the following security parameters to make them apply.
security.type=basicsecurity.basic.user=adminsecurity.basic.password={bcrypt}$2a$10$kXzfqwiiCY/ZW9e9BboNmuIbe5xe2kNjdk1YNUxmsCaQ7PlBLCe4W
The default username is
admin
. If you provide your own username, it must not include empty spaces.Replace the example
security.basic.password
with your own bcrypt-encrypted password. Paste your password after the prefix{bcrypt}
.Save and close the file.
Restart the Data Migrator service. See System service commands.
#
Enable Basic authentication (Hive Migrator)Use the following steps to enable basic authentication on the Hive Migrator REST API:
Open
/etc/wandisco/hivemigrator/application.properties
.Under the security section, ensure
micronaut.security.enabled
is "true".micronaut.security.enabled=true
View the Integration with LDM section:
# Integration with LDM# hivemigrator.integration.liveDataMigrator.host=localhosthivemigrator.integration.liveDataMigrator.port=18080hivemigrator.integration.liveDataMigrator.useSsl=false# hivemigrator.integration.liveDataMigrator.username=# hivemigrator.integration.liveDataMigrator.password=password# hivemigrator.integration.liveDataMigrator.trustStore.path=# hivemigrator.integration.liveDataMigrator.trustStore.password=# hivemigrator.integration.liveDataMigrator.trustStore.type=
Uncomment and provide a username for
hivemigrator.integration.liveDataMigrator.username
. For example:hivemigrator.integration.liveDataMigrator.username=admin
Uncomment and provide an unencrypted password for
hivemigrator.integration.liveDataMigrator.password
.note
These credentials are used by Hive Migrator to communicate with Data Migrator, so they must match the credentials used for Data Migrator.
Under Credentials used for REST authentication, uncomment and complete Hive Migrator user credentials
hivemigrator.username
andhivemigrator.password
. For example:hivemigrator.username=adminhivemigrator.password=$2aBCRYPTPASSWORDSTRING.eMyOt67yEM6TVkz1qeIxDMfaCnI8SjFaRUy
As with the above Data Migrator example, the
hivemigrator.password
string needs to be encrypted using a bcrypt generator that provides a "2a" prefix at the beginning of the encrypted password.Restart the Hive Migrator service. See System service commands.
After updating the basic auth settings for Data Migrator and Hive Migrator, the UI will show both filesystems as unhealthy and disconnected. To make them healthy, update the basic auth setting in the UI or CLI, as described in the next section.
#
Update basic auth settingsUpdate your basic auth settings using the UI or CLI.
- UI
- CLI
Use the following steps to set UI basic auth credentials through the UI:
Sign in to the UI and select the Dashboard on the menu.
Select your existing instance from the Products panel.
Select the LiveData Migrator option from the Configuration Menu.
Select Remove. When asked to confirm the removal, select Remove. The Data Migrator instance has now been removed.
Select the plus in the corner of the Products panel.
Enter your Data Migrator details, including new basic auth credentials.
Select Connect.
important
Repeatedly selecting the Remove button may cause the operation or the UI to hang.
In some cases, the Data Migrator configuration option for removing a Data Migrator instance may take much longer than expected. Repeatedly selecting the Remove button may cause the operation or the UI to hang. See the following knowledge base article - known issue.
Use the following steps to set UI basic auth credentials through the CLI:
#
Data MigratorOn the WANdisco UI host, run the following command:
# livedata-ui encryptor
Select option
3. Setup LDM Basic Auth
.Enter unencrypted
username
andpassword
values that were defined for thesecurity.basic.user
andsecurity.basic.password
properties in theapplication.properties
file.Select the
Exit
option once complete.Restart all services to apply changes. See System service commands.
#
Hive MigratorOn the WANdisco UI host, run the following command:
# livedata-ui encryptor
Select option
4. Setup HVM Basic Auth
.In plain text, enter the Hive Migrator
hivemigrator.username
andhivemigrator.password
values that appear in/etc/wandisco/hivemigrator/application.properties
.Select
Exit
.Restart the WANdisco UI for the updates to take effect. See System service commands.