Skip to content

Authentication

Login

In order to perform most operations in Enhanced Mule Tools, you will need to be authenticated, which you can do using either the login CLI command

emt login
mvn com.aeontronix.enhanced-mule:enhanced-mule-tools-maven-plugin:1.4.62:shell -Dcmd=login

This will launch a browser (or if it's unable to, use the URL that is provided as a response to the command), which will display the anypoint login.

You will need to login with your anypoint credentials, and after you have completed authentication you can close your browser page or tab.

Please note that the authentication will expire after some time, and you will need to re-login again.

Additionally, it will automatically add the bearer token to your settings.xml file under the id anypoint-exchange (if the default profile is used, otherwise it will use anypoint-exchange-[profileid]). ie:

<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
    <servers>
        <server>
            <id>anypoint-exchange</id>
            <username>~~~Token~~~</username>
            <password>5d821128-c927-45d8-85fd-a9d423421</password>
        </server>
    </servers>
</settings>

On-Premise Enhanced Mule Server

If you have your own Enhance Mule Server, you need to set the server URL using the command

emt config server <serverURL>

Connected Apps (Client Credentials)

Warning

Please note that at this time, those credentials cannot be used to create client applications.

In order to use connected apps for authentication, an org admin needs to be create a connected apps account under Access Management > Connected Apps.

This account needs to be of type App acts on its own behalf (client credentials), and should have the following scopes:

Connected Apps Scope List (click to view)

API Catalog

  • API Catalog Contributor

API Manager

  • Manage Policies
  • View Policies
  • Deploy API Proxies
  • Manage API Alerts
  • Manage APIs Configuration
  • Manage Contracts
  • View APIs Configuration
  • View Contracts

General

  • View Organization
  • View Environment
  • View Environments in a particular organization

Runtime Manager

  • Read Applications
  • Create Applications
  • Download Applications
  • Manage Settings
  • Manage Schedules
  • Manage Queues
  • Read Servers
  • Manage Alerts
  • Read Alerts

OpenID

  • Profile

Design Center

  • Design Center Developer

Exchange

  • Exchange Administrator
  • Exchange Contributor
  • Exchange Viewer
  • Exchange Creator

To save connected app credentials (client credential) in your configuration, use the CLI command:

emt config clientcreds <client-id> <client-secret>

Use the following properties to set the client app credentials

Name Property Description
clientId anypoint.client.id Anypoint authentication client id
clientSecret anypoint.client.secret Anypoint authentication client secret

Use the following parameters in the command line:

  -cc, --credential-credentials=<clientCreds> <clientCreds>
                  Credential Credentials  (first parameter is client id,
                    second is client password)

Bearer Token

To save a bearer token in your configuration, use the CLI command:

emt config bearer <bearertoken>

Use the following properties

Name Property Description
bearer anypoint.bearer Anypoint authentication bearer token

Use the following parameters in the command line:

  -bt, --bearer=<bearer>
                  Bearer token credentials

Username / Password

To save a username/password in your configuration, use the CLI command:

emt config upw <username> <password>

Use the following properties

Name Property Description
username anypoint.username Anypoint Username
password anypoint.password Anypoint Password

Use the following parameters in the command line:

  -upw, --username-password=<username> <password>
                  Username / Password credentials