Credentials Configuration
May 20, 2026 ยท View on GitHub
The credentials.yml file is used to define and manage authentication profiles for clients connecting to the application.
The application utilizes a background virtual thread to continuously monitor this file for modifications. When you update the file, the system detects the change (with a 200ms debounce delay) and automatically "hot reloads" the credentials into memory without requiring a service restart.
๐ Available Fields
Each credential entry in the YAML list supports the following properties:
| Field | Type | Description |
|---|---|---|
type | String | The protocol type for the credential. Must be either SMPP or HTTP. |
systemId | String | The username or system identifier used for authentication. |
password | String | The password associated with the systemId. |
apiKey | String | Optional HTTP credential lookup key for integrations that support API-key style authentication. The Kannel-compatible /sendsms endpoint currently uses username/password query parameters. |
allowedIps | List | A list of explicit IP addresses allowed to connect using this credential. |
accountId | String | An optional identifier linking the credential to a specific account. |
product | String | An optional tag to associate the credential with a specific product. |
โ Validation Rules
To be considered valid and loaded into memory, credentials must meet specific criteria based on their type:
- SMPP Credentials: Must provide both a
systemIdand apassword. The system will use thesystemIdas the primary lookup key when authenticating clients. - HTTP Credentials: Must provide either an
apiKey, OR both asystemIdandpassword. The credentials loader will prioritize theapiKeyas the lookup key if it exists; otherwise, it will fall back to using thesystemId. For the Kannel-compatible/sendsmsendpoint, configuresystemIdandpasswordand submit them asusername/passwordoruser/pass.
๐ IP Whitelisting (allowedIps)
You can enhance security by restricting which IP addresses are permitted to use a specific credential.
- If you define IPs under
allowedIps, the application will strictly reject connections originating from unlisted IPs. - Default Behavior: If the
allowedIpslist is omitted or left empty, the application defaults to an "allow all" policy, permitting connections from any IP address.
๐ Example Configuration
credentials:
# Standard SMPP credential requiring System ID and Password
- type: SMPP
systemId: "306910000000"
password: "123qwe"
# HTTP credential using Basic Auth (System ID and Password)
- type: HTTP
systemId: "306910000001"
password: "123qwe"
# HTTP credential using an API Key, restricted to a specific IP
- type: HTTP
apiKey: "ak_live_abcdef1234567890"
allowedIps:
- "203.0.113.50"