Skip to main content
Version: 1.22.0

Configure basic auth

Basic auth enables password-based authentication for Data Migrator and Hive Migrator.

info

To configure basic authentication and allow the UI to connect successfully to the REST API endpoints:

  • Complete the configuration for all components, Data Migrator, Hive Migrator, and UI.
  • Use the same username and password combination for Data Migrator and Hive Migrator.
  • Use an unencrypted password for hivemigrator.integration.liveDataMigrator.password.

Enable Basic authentication (Data Migrator)

Use the following steps to enable basic auth:

  1. Open /etc/wandisco/livedata-migrator/application.properties in a text editor.

  2. Comment out security.type=off.

    #security.type=off
  3. Uncomment the following security parameters to make them apply.

    security.type=basic
    security.basic.user=admin
    security.basic.password={bcrypt}$2a$10$kXzfqwiiCY/ZW9e9BboNmuIbe5xe2kNjdk1YNUxmsCaQ7PlBLCe4W

    The default username is admin. If you provide your own username, it must not include empty spaces.

    note

    To allow the UI to connect successfully, use the same username and password combination for Data Migrator and Hive Migrator.

  4. Replace the example security.basic.password with your own bcrypt-encrypted password.

  5. Save and close the file.

  6. Restart the Data Migrator service. See System service commands.

note

When basic authentication is enabled, enter the username and password when prompted to connect to Data Migrator with the CLI.

Enable Basic authentication (Hive Migrator)

Use the following steps to enable basic authentication on the Hive Migrator REST API:

  1. Open /etc/wandisco/hivemigrator/application.properties.

  2. Ensure micronaut.security.enabled is "true".

    micronaut.security.enabled=true
  3. View the Integration with LDM section:

    # Integration with LDM
    # hivemigrator.integration.liveDataMigrator.host=localhost
    hivemigrator.integration.liveDataMigrator.port=18080
    hivemigrator.integration.liveDataMigrator.useSsl=false
    # hivemigrator.integration.liveDataMigrator.username=
    # hivemigrator.integration.liveDataMigrator.password=
    # hivemigrator.integration.liveDataMigrator.trustStore.path=
    # hivemigrator.integration.liveDataMigrator.trustStore.password=
    # hivemigrator.integration.liveDataMigrator.trustStore.type=
  4. Uncomment and provide a username for hivemigrator.integration.liveDataMigrator.username. For example:

    hivemigrator.integration.liveDataMigrator.username=admin
  5. Uncomment and provided 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.

  6. Under Credentials used for REST authentication, uncomment and complete Hive Migrator user credentials hivemigrator.username and hivemigrator.password. For example:

    micronaut.security.enabled=true
    hivemigrator.username=admin
    hivemigrator.password=$2aBCRYPTPASSWORDSTRING.eMyOt67yEM6TVkz1qeIxDMfaCnI8SjFaRUy

    The hivemigrator.password string needs to be encrypted using a bcrypt generator that provides a "2a" prefix at the beginning of the encrypted password.

    note

    To allow the UI to connect successfully, use the same username and password combination for Data Migrator and Hive Migrator.

  7. Restart the Hive Migrator service. See System service commands.

note

When basic authentication is enabled, enter the username and password when prompted to connect to Hive Migrator with the CLI.

Update basic auth settings

Update your basic auth settings using the UI or CLI.

Use the following steps to set UI basic auth credentials through the UI:

  1. Sign in to the UI and select the Dashboard on the menu.

  2. Select your existing instance from the Products panel.

  3. Select the LiveData Migrator option from the Configuration Menu.

  4. Select Remove. When asked to confirm the removal, select Remove. The Data Migrator instance has now been removed.

  5. Select the plus in the corner of the Products panel.

  6. Enter your Data Migrator details, including new basic auth credentials.

  7. Select Connect.

info

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.