Integrations
Overview
Integrations provide a secure mechanism for communicating with external systems during configuration sessions through the Combeenation server infrastructure. Rather than exposing sensitive credentials (such as authentication tokens) on the client side, this architecture stores secrets securely on the server, with all external API calls being proxied through Combeenation servers.
Never persist/store secrets on the client side
HTTP-Based Integrations
Combeenation supports HTTP-based integrations with multiple authentication methods, including Bearer Token and OAuth 2.0 authentication flows.
Configuration Requirements
Each integration requires the following configuration:
- Unique Name: An identifier for the integration (later used in CustomCode)
- Display Name: A human-readable name
- Anonymous users access: Define whether the integration can be used by all users or restricted to authenticated users only
- Valid Endpoints: Specify valid endpoint URLs that can be called through this integration, ensuring that only approved endpoints are accessible
Bearer Token Authentication
Bearer Token authentication enables standard token-based authentication by automatically including the configured secret in the Authorization header of all outgoing requests.
OAuth 2.0 Integration
Combeenation supports OAuth 2.0 authentication using the Client Credentials flow. This requires the following configuration:
- Client ID: The OAuth client identifier
- Client Secret: The OAuth client secret
- Token Endpoint: The authorization server's token endpoint URL
Token Management: Access tokens are automatically cached on the server to optimize performance and reduce load on the OAuth provider. Tokens are automatically refreshed when they expire, ensuring uninterrupted service.
Usage in Custom Code
Once an HTTP-based integration has been configured, it can be invoked from custom code using the CfgrUtils.executeIntegration() method:
import { CfgrUtils } from '@combeenation/custom-code-utils';
const response = await CfgrUtils.executeIntegration({
integrationName: 'CRM',
httpMethod: 'GET',
url: 'https://www.mycrmendpoint.com/api/v1/getAllCustomerData',
headers: {
'Content-Type': 'application/json'
}
});
if (!response.ok) {
logCrmError(`CRM fetch call failed for endpoint '${urlSegment}'`);
}