SAP connections in enmasse
SAP connections as YAML - the sap key, its fields, secrets through environment variables and exports.
Everything the Dashboard's SAP form configures can also be expressed as YAML and imported with enmasse - the same file moves connections between environments, keeps them in version control and feeds CI/CD pipelines.
The sap key
SAP connections live under the sap key (alias: outgoing_sap):
sap:
- name: SAP.Sample
address: https://example.com/sap/opu/odata/sap/API_BUSINESS_PARTNER
username: zato.technical.user
secret: Zato_Enmasse_Env.SAP_Sample_Password
- name: SAP.SuccessFactors
address: https://apisalesdemo2.successfactors.eu/odata/v2
auth_type: oauth2
token_url: https://apisalesdemo2.successfactors.eu/oauth/token
client_id: my-client-id
client_secret: Zato_Enmasse_Env.SAP_SF_Client_Secret
needs_csrf_token: false
Fields
| Name | Required | Description |
|---|---|---|
| name | Yes | Unique name of the connection |
| address | Yes | Service root URL, e.g. https://example.com/sap/opu/odata/sap/API_BUSINESS_PARTNER |
| odata_version | --- | OData version, 2.0 or 4.0 (default is 2.0) |
| auth_type | --- | Authentication type, one of no-auth, basic, bearer or oauth2 (default is basic) |
| username | --- | Username, for Basic Auth |
| secret | --- | Password or bearer token - can be set via an environment variable |
| token_url | --- | OAuth2 token URL |
| tenant_id | --- | OAuth2 tenant ID - when given, it is substituted into the token URL |
| client_id | --- | OAuth2 client ID |
| client_secret | --- | OAuth2 client secret - can be set via an environment variable |
| scopes | --- | OAuth2 scopes |
| needs_csrf_token | --- | Whether to exchange X-CSRF-Token headers for write operations (default is true) |
| page_size | --- | Server-driven page size requested via Prefer: odata.maxpagesize (default is 0, meaning the server decides) |
| timeout | --- | Connection timeout in seconds (default is 60) |
| pool_size | --- | Connection pool size (default is 1) |
| is_active | --- | Whether the connection is active (default is true) |
The defaults mirror the Dashboard's SAP form - OData 2.0 and CSRF tokens enabled - so a minimal entry needs only a name, an address and credentials.
Secrets through the environment
Values prefixed with Zato_Enmasse_Env. are read from environment variables at import time - the YAML file itself never contains passwords or client secrets. Set the variables for the container, e.g. SAP_Sample_Password, and import the file in the Dashboard under System → Config → Import enmasse, or mount it under /opt/hot-deploy/enmasse/enmasse.yaml to have it imported on start.
Exporting connections
Connections created in the Dashboard export back to the same format, ready to be imported elsewhere - the sap key appears in the output whenever SAP connections exist. Export from the Dashboard under System → Config → Export enmasse.