top of page
lp.jpeg

Blog

Tags:

Part 5: CI/CD pipeline with MuleSoft and GitHub Actions - Enabling MFA through a Connected App



 

In this post:

 


So far we’ve been setting up our CI/CD pipelines using our Anypoint Platform username and password. However, if you’re using an enterprise account, most likely you’re using MFA or Multi-Factor Authentication for your account. The process to create your CI/CD pipeline with this authentication method is quite different.


If you haven’t been following the series or you’re not familiar with GitHub Actions, we recommend you start from the first article to understand how we are setting up all the configurations we need.


In this post, we’ll learn how to set up our pipeline with a connected app, which is useful when you have multi-factor authentication activated in Anypoint Platform.




Prerequisites


You should already understand the basic CI/CD setup we’ve been doing in the previous articles. In summary, this is what you should already know:

  • How to configure and run the build.yml file for the pipeline under .github/workflows.

  • How to configure secrets in your GitHub repository.


ℹ️ Note: The code for this article is not located on the main branch of the github-actions repository. Instead, a new branch was created to avoid confusion: connected-app. If you want to check the rest of the files we discuss here, like pom or build, please refer to that branch.


Create a connected app in Anypoint Platform


Because we are signing in to Anypoint Platform using MFA (through an app on your phone or an SMS code, for example), we can no longer rely on just our username and password. We have to create something called Connected App. To do this, sign in to Anypoint Platform and navigate to Access Management > Connected Apps.



Click on Create app. Add any name you want to identify this app, like github-actions. Select App acts on its own behalf and click on Add Scopes.


Select the following scopes for your current business group and the Sandbox environment (since this is the one we’re using for this demo):

  • Design Center Developer

  • View Environment

  • View Organization

  • Profile

  • Cloudhub Organization Admin

  • Create Applications

  • Delete Applications

  • Download Applications

  • Read Applications

  • Read Servers