llama-stack-mirror/llama_stack/distribution/server
grs 87a4b9cb28
fix: synchronize concurrent coroutines checking & updating key set (#2215)
# What does this PR do?

This PR adds a lock to coordinate concurrent coroutines passing through
the jwt verification. As _refresh_jwks() was setting _jwks to an empty
dict then repopulating it, having multiple coroutines doing this
concurrently risks losing keys. The PR also builds the updated dict as a
separate object and assigns it to _jwks once completed. This avoids
impacting any coroutines using the key set as it is being updated.

Signed-off-by: Gordon Sim <gsim@redhat.com>
2025-05-20 10:00:44 -07:00
..
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
auth.py feat: introduce OAuth2TokenAuthProvider and notion of "principal" (#2185) 2025-05-18 17:54:19 -07:00
auth_providers.py fix: synchronize concurrent coroutines checking & updating key set (#2215) 2025-05-20 10:00:44 -07:00
endpoints.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
server.py feat: Propagate W3C trace context headers from clients (#2153) 2025-05-19 18:56:54 -07:00