llama-stack-mirror/llama_stack/distribution/server
ehhuang 21bae296f2
feat(auth): API access control (#2822)
# What does this PR do?
- Added ability to specify `required_scope` when declaring an API. This
is part of the `@webmethod` decorator.
- If auth is enabled, a user can access an API only if
`user.attributes['scope']` includes the `required_scope`
- We add `required_scope='telemetry.read'` to the telemetry read APIs.

## Test Plan
CI with added tests

1. Enable server.auth with github token
2. Observe `client.telemetry.query_traces()` returns 403
2025-07-24 15:30:48 -07:00
..
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
auth.py feat(auth): API access control (#2822) 2025-07-24 15:30:48 -07:00
auth_providers.py feat(auth): support github tokens (#2509) 2025-07-08 11:02:36 -07:00
quota.py feat: drop python 3.10 support (#2469) 2025-06-19 12:07:14 +05:30
routes.py feat: Bring Your Own API (BYOA) (#2228) 2025-07-24 13:41:14 -07:00
server.py feat(auth): API access control (#2822) 2025-07-24 15:30:48 -07:00