Amplify Central/Unified Catalog tag-based API Discovery – filter based on tag name

Amplify Central/Unified Catalog tag-based API Discovery

You can use API Gateway tags to control discovery by the Amplify Agents as described here.

While Amplify provides for flexible, robust, and granular control, in this introductory example, we’ll rely on the presence of a tag to control whether or not an AWS API Gateway API is discovered or not. This is referred to as Filter based on tag name. The same principles apply to other Gateways.

The AWS discovery agent environment variable is AWS_FILTER as described here. The tag I’ll use is SHOULD_DISCOVER. For my example, I don’t need a value as we’ll simply check to see if the tag exists. As such, only AWS APIs that you want to be discovered should have this tag set.

Setting up the API Tags

For example, my AWS API Gateway API’s are shown below:

AWS API Gateway APIs

I only want PetStore and ZooStore API’s to be discovered so I will set tags on these two APIs:

Add SHOULD_DISCOVER Tag to PetStore API
Add SHOULD_DISCOVER Tag to ZooStore API

but not the third as follows:

SHOULD_DISCOVER Tag NOT ADDED to the Third API

Discovery Agent Environment File

Add the following line to your da_env_vars.env file:

AWS_FILTER=tag.SHOULD_DISCOVER.Exists() == true

Refer to the Axway APIM and Azure Gateway Agent Configuration docs for configuring those agents.

Run your discovery agent and you will see that only the APIs with the SHOULD_DISCOVER tag (‘PetStore’ and ‘ZooStore’ but NOT ‘AWS HW API’) will be discovered as shown below:

Discovered APIs in the Axway Unified Catalog

Summary

In this post, we looked at using Gateway tags to control discovery. We looked at a simple example, Filter based on tag name. In future blog posts, we’ll look at other ways to leverage tags for discovery.

Learn more about API Gateways.

Previous articleKey takeaways on mitigating the OWASP® API Top 10 threats (webinar)
Next articleSet up your Amplify organization with the Okta IdP
Principal Presales Architect II – Leor Brenman has over 12 years’ experience in Enterprise Software and more than 30 years working in the tech industry for companies like Vaultus, Antenna, Appcelerator and Axway. He has a strong technology background and specializes in mobile, API, integration and enterprise applications. Leor has a BS and MS in Electrical Engineering from Rutgers University in NJ, USA.

LEAVE A REPLY

Please enter your comment!
Please enter your name here