Skip to main content

Authentication Issues

This guide covers common authentication and authorization problems.

JWT Token Validation Fails

Symptom: 401 Unauthorized or Invalid token Diagnosis:
Common Causes:

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:
Common Issues:

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:
Solutions:

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:
  1. Enable Debug Logging: Set LOG_LEVEL=DEBUG to see detailed auth flow
  2. Check Network: Ensure services can communicate (DNS, firewall)
  3. Review Configuration: Verify all auth-related environment variables
  4. Search Issues: Check GitHub Issues