Authentication Issues
This guide covers common authentication and authorization problems.JWT Token Validation Fails
Symptom:401 Unauthorized or Invalid token
Diagnosis:
1. Token Expired
2. Wrong Public Key
3. Missing Required Claims
Keycloak Connection Refused
Symptom:ConnectionError: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))
Solutions:
1. Keycloak Not Ready
2. Wrong Keycloak URL
3. Keycloak Admin Credentials Invalid
OpenFGA Authorization Denied
Symptom:403 Forbidden or OpenFGA authorization check failed
Diagnosis:
1. Store ID Not Set
2. Missing Relationship Tuples
3. Authorization Model Not Set
Service Principal Authentication Failed
Symptom:403 Forbidden when using API key or service principal token
Diagnosis:
1. API Key Not Active
2. Service Principal Disabled
3. Incorrect Scopes
CORS Errors
Symptom:Access-Control-Allow-Origin errors in browser console
Solution:
Still Having Issues?
If you’re still experiencing authentication problems:- Enable Debug Logging: Set
LOG_LEVEL=DEBUGto see detailed auth flow - Check Network: Ensure services can communicate (DNS, firewall)
- Review Configuration: Verify all auth-related environment variables
- Search Issues: Check GitHub Issues