Technology Blog Posts by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
HammadSharif1
Explorer
11,609

Introduction:
SAP API Management is one of the core capabilities of the Integration Suite, it is used for API Provisioning, API Security, Traffic Management, API Analytics and API Life cycle management. Its benefits include enhanced communication, increased agility, improved security and scalability. It provides a self-service portal to discover, test, and subscribe to APIs.

loiof6313796e65649719094f58b361a551f_LowRes.png

In this blog, we will discuss  API masking using SAP API Management by routing the API through an API management URL. This way, the consumer won't see the actual endpoint, and API Management will handle the communication with the backend service. In this way, we can ensure the direct access of the API is not exposed to the outside world, protection layer is in between which can be further protected with the endless possibilities through the API management policies although we have covered a basic understanding of this concept.

loioe1368681f8b74516a5113639d749f666_LowRes.png


Pre-Requisites:

Below are the required prerequisites for this process,

1. Get access to SAP Integration Suite.

Reference Link: Integration Suite Capabilities 

2. Activate API Management capability of Integration Suite.

Reference Link: Activating and Managing Capabilities 

In this Blog, we will discuss how the API Masking is done using the SAP API Management,

We will use the API Proxy in order to implement the concept of API Masking via API Management. An API Proxy can be created through the below, we will create it via API Provider
1. Via API Provider
2. Via URL
3. Via API Proxy Itself

HammadSharif1_0-1723371961021.png

 

Procedure for API Masking:

Step 1:

Open SAP Integration Suite, go to Configure, and create an API Proxy.

HammadSharif1_0-1723128458227.png

Step 2:

Create an API Proxy as shown in the below screenshot,

HammadSharif1_1-1723128458234.png

Step 3:

Save and Deploy

HammadSharif1_0-1723132148562.png

HammadSharif1_3-1723128458245.png

Step 4:

Applying API Masking Policies:

Once Deployed, click on the policies, apply the APIKey Policy and use the below Code in order to validate the APIKey in the header request

HammadSharif1_1-1723132196426.png

HammadSharif1_5-1723128458253.png

Policy Code:

 

<VerifyAPIKey async='true' continueOnError='false' enabled='true' xmlns='http://www.sap.com/apimgmt'>
	<APIKey ref='request.header.APIKey'/>
</VerifyAPIKey>

 

Step 5:

Create a Product by giving a meaningful name as per your scenario,

HammadSharif1_7-1723128458262.png

Step 6:

Add the API to the Product:
Adding APIs to products helps in grouping them into logical bundles so it becomes easier to manage Bulk APIs. Along with this, policies, access controls and settings can be applied at product levels rather than managing them individually.

HammadSharif1_8-1723128458264.png

Step 7:

Save and Publish it, once the product is published, you can see it in the API Hub.

HammadSharif1_0-1723131749420.png

Step 8:

Assign the Product to the Application and get the APIKey for secured communication

HammadSharif1_11-1723129769241.png

Step 9:

Testing the API via Postman:

Once the API has been masked, you can invoke various resources within the same API by appending the appropriate endpoints to the base URL in accordance with your specific requirements. This allows you to retrieve a targeted dataset.

HammadSharif1_5-1723388177848.png

In the similar fashion, you can access specific entities like 'Products' or 'Employees' by appending their respective endpoints.

HammadSharif1_1-1723385434946.png

HammadSharif1_2-1723385531056.png

HammadSharif1_3-1723386299602.png

HammadSharif1_4-1723387104965.png

 

Conclusion

Implementing API masking via an API proxy in SAP API Management is a robust way to protect sensitive data in your APIs and hide the actual endpoint from consumers. By following the steps outlined in this guide, you can create a secure API proxy that masks sensitive information, ensuring compliance with data protection regulations and safeguarding user trust.

With SAP API Management, you can easily manage and secure your APIs, providing a scalable and flexible solution for API governance and security.

 

 

Additional Resources

For more information on SAP API Management and API masking, check out the following resources:

By leveraging these resources and following the steps in this guide, you'll be well on your way to mastering API masking in SAP API Management.

 

2 Comments
Labels in this area