I am using the Camunda 8 self managed Docker Compose full configuration:
include:
- path: ./services/camunda/docker-compose/8.9/docker-compose-full.yaml
env_file: ./services/camunda/docker-compose/8.9/.env
services:
...
I can request an access token using client credentials:
export ACCESS_TOKEN=$(curl -s POST 'http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d "client_id=orchestration" \
-d "client_secret=secret" \
-d "audience=orchestration-api" \
-d 'grant_type=client_credentials' | jq -r '.access_token')
And use the access token in API requests:
curl -s GET 'http://localhost:8080/v2/topology' \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" | jq .
For example:
{
"brokers": [
{
"nodeId": 0,
"host": "0.0.0.0",
"port": 26501,
"partitions": [
{
"partitionId": 1,
"role": "leader",
"health": "healthy"
}
],
"version": "8.9.12"
}
],
"clusterId": "d4a1af66-ff1c-4b92-b77d-5b409a57555a",
"clusterSize": 1,
"partitionsCount": 1,
"replicationFactor": 1,
"gatewayVersion": "8.9.12",
"lastCompletedChangeId": "-1"
}
However, if I use the access token for BearerAuth in the Swagger UI the server response is 401?