AuthZ Traefik Gateway is a custom authorization middleware plugin for Traefik that validates access permissions using Keycloak and the UMA 2.0 protocol.
It works by extracting the request path and method (e.g. GET /api/v1/user) and converting it into a permission format like user#get, then querying Keycloak’s token endpoint using a valid access token and the uma-ticket flow to determine if the user has access.
- 🔧 Authorization based on resource + scope
- 🔄 Uses
uma-ticketgrant type for permission evaluation - ✅ Works with any token issued by Keycloak
- 🚀 Lightweight and easy to plug into your Traefik stack
http:
middlewares:
keycloak-authz:
plugin:
authztraefikgateway:
keycloakURL: "https://keycloak.local/realms/demo/protocol/openid-connect/token"
keycloakClientId: "traefik-gateway-client"