Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

Generate JWT token with Keycloak auth manager

Note

This guide only applies if your environment is configured with Keycloak auth manager.

In order to use the Airflow public API, you need a JWT token for authentication. You can then include this token in your Airflow public API requests. To generate a JWT token, use the Create Token API in Keycloak auth manager token API.

Example

ENDPOINT_URL="http://localhost:8080"
curl -X 'POST' \
    "${ENDPOINT_URL}/auth/token" \
    -H 'Content-Type: application/json' \
    -d '{
    "username": "<username>",
    "password": "<password>"
    }'

This process will return a token that you can use in the Airflow public API requests.

Was this entry helpful?