Set the Security Credentials Using Gradle

Overview

MarkLogic Data Hub creates the following roles:

  • data-hub-admin-role
  • flow-developer-role
  • flow-operator-role

For more information on roles, see Users and Roles

You can specify the usernames and passwords of the accounts associated with these roles, either in the appropriate gradle*.properties file or through the mlUsername and mlPassword options at the command line.

Before you begin

You need:

Procedure

  • Add the credentials to a gradle*.properties file.
       # You must update this username and password manually.
      # The recommended account to use is one assigned to flow-developer-role.
      mlUsername=flow-developer
      mlPassword=your-flow-developer-password
      ...
      # The flow-developer user is automatically generated by DHF.
      mlFlowDeveloperRole=flow-developer-role
      mlFlowDeveloperUserName=flow-developer
      mlFlowDeveloperPassword=your-flow-developer-password
      ...
      # The flow-operator user is automatically generated by DHF.
      mlFlowOperatorRole=flow-operator-role
      mlFlowOperatorUserName=flow-operator
      mlFlowOperatorPassword=your-flow-operator-password
    
    • If the account is specific to an environment, add the credentials to gradle-{env}.properties, where {env} is the environment you are setting up.
    • If the same account is used in all environments, add the credentials to gradle.properties.
  • If you do not want to save the credentials in a file, you can specify the credentials when running the Gradle task at the command line.
    ./gradlew ... -PmlUsername=your-data-hub-admin-username -PmlPassword=your-data-hub-admin-password -PmlFlowDeveloperRole=flow-developer-role -PmlFlowDeveloperUserName=flow-developer -PmlFlowDeveloperUserPassword=your-flow-developer-password -PmlFlowOperatorRole=flow-operator-role -PmlFlowOperatorUserName=flow-operator -PmlFlowOperatorUserPassword=your-flow-operator-passwordgradlew.bat ... -PmlUsername=your-data-hub-admin-username -PmlPassword=your-data-hub-admin-password -PmlFlowDeveloperRole=flow-developer-role -PmlFlowDeveloperUserName=flow-developer -PmlFlowDeveloperUserPassword=your-flow-developer-password -PmlFlowOperatorRole=flow-operator-role -PmlFlowOperatorUserName=flow-operator -PmlFlowOperatorUserPassword=your-flow-operator-password