API Security
This document outlines key practices for securing APIs against threats and vulnerabilities. API security relies on authentication, which involves verifying identity with methods like API keys, tokens, or OAuth2, and authorization, which defines user permissions and enforces role-based access.
Supported security schemes
Choreo Integration primarily supports two security schemes for APIs: API Key and OAuth2.
API Key
API Key is a simple and widely used method for securing APIs. It involves generating a unique key that clients must include in their requests to access the API. The key is typically sent in the request header. You can customize the security header name based on your requirements.
OAuth2
OAuth2 is a robust and flexible authorization framework that allows third-party applications to access resources on behalf of a user. It involves obtaining an access token through various grant types, such as authorization code, client credentials, or implicit flow. OAuth2 provides better security and scalability for APIs, especially in scenarios involving multiple clients and users.
Configure security for an integration as an API
Follow the steps given below.
-
Sign in to the Choreo Cloud.
-
Open the integration as API you want to configure security for.
-
On the integration Overview page, click Configure security.

-
If the integration exposes more than one endpoint, pick one from the Endpoints list.
-
Select the Security scheme: API key or OAuth. Each scheme has its own Security header name, which you can customize.
-
With API key, clients must send a valid API key in that header.

-
With OAuth, clients must present a valid OAuth2 access token. Configure:
Field Description Token prefix The prefix clients send before the token in the security header, for example Bearer.Key manager The environment's key manager that must have issued the token. Currently, ThunderKeyManager is the only key manager supported by default. Audiences (optional) One or more audience values. A token must carry at least one of these in its audclaim; leave empty to accept any audience.
Under Backend, choose whether to forward the token to the backend, and if so, which header to forward it in, and whether to strip the token prefix before forwarding.
Under Scopes, for each operation you can require scopes the token must carry: All of (every listed scope is required) and Any of (at least one listed scope is required). An operation with no scopes configured accepts any valid token; a token missing a required scope gets a
401.
-
-
Click Apply to save the changes. Changes apply immediately to the Development environment; promote them to apply to later environments.
Was this page helpful?