DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • The Tectonic AI Platform: A Framework for Taming App Sprawl and Data Fragmentation
  • SelfService HR Dashboards with Workday Extend and APIs
  • How We Reduced LCP by 75% in a Production React App
  • Shipping GenAI Into an Existing App: How to Integrate AI Features Without Rewriting Your Stack

Trending

  • Scaling Teams, Scaling Systems: Unlocking Developer Productivity With Platform Engineering
  • The Middleware Gap in AI Agent Frameworks
  • AI and Agentic: Promise, Peril, and Predictability
  • The Future Is Headless: Building Modern E-Commerce Experiences With Magento 2 and GraphQL

Anypoint Platform Connected Apps

In this article, we are going to learn what is a connected app, supported authentication protocols, its benefits, and how to create your Anypoint Platform connected app.

By 
Kuldeep Rana user avatar
Kuldeep Rana
·
Jan. 13, 22 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
6.4K Views

Join the DZone community and get the full member experience.

Join For Free

What Is a Connected App?

The connected App feature provides you the option to integrate an external application with the Anypoint platform without sharing your user credentials with the help of OAuth 2.0 or OpenID Connect.

Authentication Protocol Supported by Connected Apps 

1. OAuth 2.0: OAuth (Open Authorization) is an open protocol that enables secure API authorization from applications in a standardized way. It can authorize resource access without revealing user credentials to apps.

2. OpenID Connect: OpenID Connect identifies the end-user and obtains information to pass to OAuth 2.0 connected apps.

Connected Apps Benefits 

There are a number of benefits of connected apps that include:

1. Integrate external applications with Anypoint Platform.

2. An organization can own up to 200 Connected Apps.

3. Each connected app can have up to 1000 scopes.

4. Granted access/ Revoke Access.

5. Connected Apps usage can be tracked and is auditable.

How to Create Connected Apps

1. Sign in to your Anypoint Platform Account, navigate to the Access Management section and Click on Connected Apps.    

Anypoint Platform Account


If you are not at the root level of the organization or are at any other level except the root organization, then you won't be able to see the connected apps option in the access management of your Anypoint Platform account.

3.  Under Owned Apps section, click on Create App. Type the app name in the Name section and then select App acts on its own behalf (client credentials).

Creating App in the Owned Apps section

4. Click on Add scopes and add the necessary scopes required for the user to use the Anypoint Platform features(design center privileges, exchange privileges, runtime manager privileges, and others as well).

Adding the necessary scopes required for the user

5. Once you have selected all the scopes, click on Next. Select the Business Group and also choose the environments you want to add.

Selecting groups and environments

6. Click on Review and then Add Scope. At last, Click on SAVE. Navigate to the Connected Apps section and verify the app created.

Verifying app creation


Deploy Mule Application to Cloudhub Using Connected Apps

  • Add the following code snippet to pom.xml inside the plugins section.
XML
 
<plugin>
	<groupId>org.mule.tools.maven</groupId>
	<artifactId>mule-maven-plugin</artifactId>
	<version>3.4.2</version>
	<extensions>true</extensions>
	<configuration>
		<cloudHubDeployment>
			<uri>https://anypoint.mulesoft.com</uri>
			<muleVersion>${app.runtime}</muleVersion>
			<connectedAppClientId>${connectedApp-ClientID}</connectedAppClientId>
			<connectedAppClientSecret>${connectedApp-ClientSecret}</connectedAppClientSecret>
			<connectedAppGrantType>client_credentials</connectedAppGrantType>
			<applicationName>${cloudhub.application.name}</applicationName>
			<environment>${environment}</environment>
			<region>${region}</region>
			<workers>${workers}</workers>
			<workerType>${workerType}</workerType>
			<objectStoreV2>true</objectStoreV2>
		</cloudHubDeployment>
	</configuration>
</plugin>


  • The values for connectedAppClientId and connectedAppClientSecret can be taken from the connected apps section.

Adding values from connected app section

  • Use the following command to deploy your mule application to Cloudhub using maven: mvn clean package deploy -DmuleDeploy 

References

https://docs.mulesoft.com/access-management/connected-apps-overview
https://blogs.mulesoft.com/news/anypoint-platform/introducing-connected-apps/

app

Opinions expressed by DZone contributors are their own.

Related

  • The Tectonic AI Platform: A Framework for Taming App Sprawl and Data Fragmentation
  • SelfService HR Dashboards with Workday Extend and APIs
  • How We Reduced LCP by 75% in a Production React App
  • Shipping GenAI Into an Existing App: How to Integrate AI Features Without Rewriting Your Stack

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook