mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-06 18:40:57 +00:00
fix: nested claims mapping in OAuth2 token validation
The get_attributes_from_claims function was only checking for top-level
claim keys, causing token validation to fail when using nested claims
like "resource_access.llamastack.roles" (common in Keycloak JWT tokens).
Updated the function to support dot notation for traversing nested claim
structures. Give precedence to dot notation over literal keys with dots
in claims mapping.
Added test coverage.
Closes: #3812
Signed-off-by: Derek Higgins <derekh@redhat.com>
|
||
|---|---|---|
| .. | ||
| test_access_control.py | ||
| test_auth.py | ||
| test_auth_github.py | ||
| test_cors.py | ||
| test_quota.py | ||
| test_replace_env_vars.py | ||
| test_resolver.py | ||
| test_server.py | ||
| test_sse.py | ||