llama-stack-mirror/llama_stack
Derek Higgins c9dfd26385 fix(auth): allow unauthenticated access to health and version endpoints
The AuthenticationMiddleware was blocking all requests without an
Authorization header, including health and version endpoints that are
needed by monitoring tools, load balancers, and Kubernetes probes.

This commit adds a `require_authentication` parameter to the @webmethod
decorator (defaults to True). Endpoints can opt out of authentication by
setting `require_authentication=False`. The /health and /version endpoints
now use this parameter to allow unauthenticated access.

Changes:
- Add `require_authentication` field to WebMethod dataclass
- Update @webmethod decorator to accept `require_authentication` parameter
- Mark /health and /version endpoints with `require_authentication=False`
- Update middleware to check webmethod.require_authentication dynamically

Closes: #3735

Signed-off-by: Derek Higgins <derekh@redhat.com>
2025-10-09 20:14:34 +01:00
..
apis fix(auth): allow unauthenticated access to health and version endpoints 2025-10-09 20:14:34 +01:00
cli chore!: remove --env from llama stack run (#3711) 2025-10-07 20:58:15 -07:00
core fix(auth): allow unauthenticated access to health and version endpoints 2025-10-09 20:14:34 +01:00
distributions fix: Update watsonx.ai provider to use LiteLLM mixin and list all models (#3674) 2025-10-08 07:29:43 -04:00
models chore: remove dead code (#3729) 2025-10-07 20:26:02 -07:00
providers fix(responses): fix regression in support for mcp tool require_approval argument (#3731) 2025-10-08 10:47:17 -04:00
strong_typing feat: Add OpenAI Conversations API (#3429) 2025-10-03 08:47:18 -07:00
testing feat(tests): implement test isolation for inference recordings (#3681) 2025-10-04 11:34:18 -07:00
ui chore(ui-deps): bump react-dom and @types/react-dom in /llama_stack/ui (#3693) 2025-10-06 00:02:31 -04:00
__init__.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore: require valid logging category (#3712) 2025-10-08 11:10:33 +02:00
schema_utils.py fix(auth): allow unauthenticated access to health and version endpoints 2025-10-09 20:14:34 +01:00