Set the Security Credentials Using Gradle


MarkLogic Data Hub provides default roles:

Learn more: Users and Roles

The security role definitions are stored as JSON files in your local project directory under your-project-root/src/main/hub-internal-config/security/roles. Learn more: Project Structure

You can set the user credentials in the appropriate gradle*.properties file or you can specify them at the command line when running the Gradle task.

Before you begin

You need:


  • Add or update the credentials in your gradle*.properties file.
       # You must update this username and password manually.
      # The recommended account to use is one assigned to flow-developer-role.
    • If the account is specific to an environment, add or update the credentials in, where env is the environment you are setting up.
    • If the same account is used in all environments, add or update the credentials in
  • 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-username -PmlPassword=your-password -igradlew.bat ... -PmlUsername=your-username -PmlPassword=your-password -i
    Remember: The credentials must be for a user with the appropriate role to perform the task.