How to use a shared resource in an API¶
By using a shared resource (TLS certificate), you can ensure security for the communication established between the API gateway and the backend. Create certificates in Shared Resources, then attach them when you create or edit an Upstream target.
In this tutorial, you’ll learn how to use a Shared Resource with an Upstream that your APIs select during onboarding or on the API Details page.
Note
To proceed with the following instructions, ensure you’re a user with the platform-admin, api-product-manager or api-developer role.
Steps to use a shared resource¶
Step 1: Create the shared resource¶
- Create a TLS certificate resource if you do not already have one. See How to create a shared resource.
Step 2: Attach the certificate on Upstream¶
- Go to
Gateway Control → Upstream. - Create an Upstream or open Edit on an existing target.
- Under TLS / Security, turn on TLS Enabled.
- In Client Certificate, select the shared resource (placeholder:
Select here). - Complete other Upstream fields as needed, then select Create or Update.
Step 3: Select the Upstream on the API¶
- Go to
Manage APIs → My APIsand open the API (API Details), or onboard a new one. - Under Configure Upstream Servers, select the Upstream that has the certificate attached, then Update.
This binds the API to the Upstream that uses your shared certificate for backend TLS.
How to stop using a shared resource¶
To stop using a certificate on a backend target:
- Go to
Gateway Control → Upstream. - Edit the Upstream that references the certificate.
- Clear Client Certificate, or turn off TLS Enabled if TLS is no longer required.
- Select Update.
If an API should use a different backend, change the Upstream selection under Configure Upstream Servers on that API and select Update.