This guide explains how to implement a custom authentication backend for the Integration Control Plane (ICP).
The ICP authentication architecture separates credential verification from the main application. You can integrate any user store (databases, LDAP, IdPs, etc.) by implementing a simple REST API.
See auth-backend-openapi.yaml for the complete API specification.
Your authentication backend must implement the following endpoints. ICP will send the specified fields; your backend should update your user store accordingly and return the specified fields. The exact implementation and storage technology are entirely up to you.
- ICP sends:
username,password - You return:
authenticated,userId,displayName,timestamp
- ICP sends:
username,displayName,password - You add this user to your user store and return:
userId,username,displayName
- ICP sends:
userId,currentPassword,newPassword - You validate the current credentials, update the password in your user store, and return a success message
- All requests include
X-API-Keyfor backend authentication - Use HTTPS in production
Return appropriate HTTP status codes with a standard error body { "message": "..." }.
200/201: Success400: Validation or bad request401: Unauthorized (e.g., invalid API key or credentials)500: Internal server error
You can use any user store. ICP does not mandate schemas or technologies. Ensure you can:
- Verify credentials in
/authenticate - Create users in
/users - Change passwords in
/change-password
Authentication
curl -X POST https://localhost:9447/authenticate \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "admin"}' -k
Create User
curl -X POST https://localhost:9447/users \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{"username": "johndoe", "displayName": "John Doe", "password": "securepassword123"}' -k
Change Password
curl -X POST https://localhost:9447/change-password \
-H "X-API-Key: <api-key>" \
-H "Content-Type: application/json" \
-d '{"userId": "<uuid>", "currentPassword": "old", "newPassword": "newsecret"}' -k
- Ensure API keys match between ICP and your backend
- Return exactly the fields specified above for each endpoint
- Use clear error messages in
{ "message": "..." }
Apache License 2.0