llama-stack-mirror/llama_stack/apis/telemetry
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 chore: remove nested imports (#2515) 2025-06-26 08:01:05 +05:30
telemetry.py feat(auth): API access control (#2822) 2025-07-24 15:30:48 -07:00