To Deploy the Provider to a Remote Server

To use the access token to call an API managed by the OAuth 2.0 Access Token Enforcement Using External Provider policy, you first have to deploy the provider on a server. In this procedure, you deploy the provider to CloudHub. When you deploy the sample OAuth 2.0 provider, you set the client ID and client secret using Settings > Properties in Runtime Manager. Setting the client ID and client secret in Studio preferences does not suffice. The preferences are not synched with Runtime Manager property settings.

  1. In Studio, select File > Export.

    The Select dialog appears.

  2. Expand the Mule directory, and select Anypoint Studio Project to Mule Deployable Archive. Click Next.

    The Export Mule Project dialog appears.

  3. Select the project, browse to a location for saving the archive, name the archive, select Attach project sources, and click Finish.

  4. In Anypoint Platform, in Runtime Manager, click Deploy Application.

    The Deploy Application page appears.

  5. Configure the following settings:

    • Application Name—​Fill in an application name, for example auth-provider-testing.

    • Deployment Target—​Accept CloudHub as the deployment target.

    • Application File—​Choose the archive you exported from Studio.

    • Runtime version—​Select 3.8.0 or later for this example.

    • Worker size—​Select a worker size such as 0.1 vCores.

  6. On the Properties tab, add your client_id and client_secret. Use the following syntax, replacing the values shown in this example with your own client_id and client_secret:


    CloudHub requires these credentials. The credentials you entered in Anypoint Studio preferences earlier do not suffice because these credentials are not transferred to CloudHub.

  7. Click Deploy Application.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Submit your feedback!
Share your thoughts to help us build the best documentation experience for you!
Take our latest survey!