Boomi

Implement API-KEY Controlled Authentication In Boomi

In this blog, we will see how to implement API-KEY-controlled authentication in Boomi

What is meant by API KEY?

An application programming interface (API) key is a code used to identify and authenticate an application or user. API keys are available through platforms, such as a white-labeled internal marketplace. They also act as a unique identifier and provide a secret token for authentication purposes.

An API key is passed by an application, which then calls the API to identify the user, developer, or program attempting to access a website. It can help break development silos and will typically be accompanied by a set of access rights that belong to the API the key is associated with. 

Why Use API Keys

API keys are commonly used to control the utilization of the API’s interface and track how it is being used. This is often as a precaution to prevent abuse or malicious use.

In this use case, We will see how to expose an API having API-KEY-Controlled authentication in Boomi

Step 1: Now, log onto the Boomi platform (https://platform.boomi.com/) with the required credentials i.e. Email Address and Password.

Step 2: Now Click on Integration

Step 3: Create a Component

Step 4: Choose a start shape of connecter type.

Step 5: Choose Web Services Server as Connector, because we are exposing an API.

Step 6: Click on Operations, Give Operation a name, choose operation type, give a value to object and we are choosing the response output type as Single Data.

Step 7: Here, we have taken a message shape to get a response as Single Data.

Step 8: Inside Message Shape We will write a message just to get a response as we have written here.

Step 9: After configuring the message shape we will attach a return document shape with it to get the response.

Step 10: We will give a name to our process.

Step 11: Now we have to package this component by clicking on create package component.

Step 12: Now click on Add details

Step 13: Now click on create package component, We can also give version number and package notes.

Step 14: After that we get a Pop-up to deploy the Process and we have to click on deploy.

Step 15: After that we have to Select an environment where our atom is attached and click on next select version.

Step 16: After that we have to click on next review.

Step 17: After that click on deploy.

Step 18: After that a pop-up will come view deployment by clicking on it we can see our deployed component.

Step 19: Now that our API has been exposed, we have to use API Service Component and Gateways to give an API-KEY-Controlled authentication. In this step, we will configure the API Service Component, in component type we will choose API Service and click on create.

Step 20: After that we have to give a name to our API Service component and Published API title, version number and base API path and then click on Import an Endpoint.

Step 21: Choose use an existing process and click on next.

Step 22: Choose your process and in the API type the API you want to be exposed You can choose multiple options but I have chosen Rest here and then click on Finish.

Step 23: Now click on Rest tab and we can see our End point here and click on save.

Step 24: Now we have to create package component and deploy API Service Component too for that you can follow Step-11 to Step-18

Step 25: Now for API -Key Controlled we need to make the API type as advanced and the authentication type as Gateway and click on save.

For this, Go to Manage>Atom Management>Shared Web Server.

Step 26: Now click on Services and the API Management for configuring Gateway.

Step 27: Now click on Configure Server and the click on Gateways

Step 28: Click on Add a Gateway

Step 29: Choose your operating system and click on Generate token a token will be generated copy that token and paste it somewhere to reuse it and click on Download Installer.

Step 30: Your gateway will be downloaded.Right click and choose Run as Administration.

Step 31: Click on Run Anyway

Step 32: Click on next

Step 33: Choose token and paste your token and then click on Next

Step 34: Click on Next.

Step 35: Click on Next

Step 36: Click on Finish your Gateways is installed.

Step 37: You can see your gateway in Boomi now.

Step 38: Now we have to migrate our Gateway to our environment.

Click on Environment Migration.

Step 39: Click on Create a new migration.

Step 40: Choose your Environment and Click on Create Migration.

Step 41: Choose your Gateway and Click on Save and Continue

Step 42: You can edit your End Points here then again Click on Save and Continue

Step 43: Again click on Save and Continue.

Step 44: You can see your Gateway status now and then Click on Save and Continue.

Step 45: Click on Save and Continue again.

Step 46: Now we can see our deployed APIs here and now click on Save and Continue.

Step 47: Click on Migrate and your Gateway will be migrated to your environment.

Step 48: Click on Configure server and then click on Plans to configure Plans.

Step 49: Click on Create a Plan

Step 50: Give a Plan name and set Quota limit, Message Limit, Rate Limit and click on save.

Your Plan is created.

Step 51:Click on Configure APIs and Applications and then click on Deployed APIs to enable your plan.

Step 52: Search your Gateway in Deployed APIs and Click on Plan.

Step 53: Search for your Plan.

Step 54: Click on Add to API Deployment.

Step 55: Click on Save and your plan will be added to your Deployed API.

Step 56: Now we have to create an Application for that click on Configure APIs and Applications and the click on Applications.

Step 57: Click on Create an Application.

Step 58: Choose your Gateway and Give application a name and fill the Application owner info and click on save

Step 59: You can see your Application here.

Step 60: Click on Subscriptions.

Step 61: Click on Subscribe to subscribe to an API

Step 62: Choose your API Service Component that has been Deployed and click on next.

Step 63: Choose your Plan and click on next.

Step 64: Choose a specific date range till you want user to be subscribed to this plan and click on finish.

Step 65: Your subscription is been added now you can see your API-KEY here just copy and save it to reuse it.

Step 66: Go back to Deployed APIs and search your Gateway and Click on View.

Step 67: Click on Rest tab and copy your endpoint.

Step 68: Open Postman to consume your API paste your endpoint here and choose authorization as API Key and paste the value of API Key that we got on 65th Step on the Value section and click on Send to consume your API.

Step 69: You can see you API response here.

Author

Adil

Leave a comment

Your email address will not be published. Required fields are marked *