llama-stack-mirror/llama_stack/apis
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
..
agents docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
batches chore!: add double routes for v1/openai/v1 (#3636) 2025-10-02 16:11:05 +02:00
benchmarks feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
common feat: Add Kubernetes auth provider to use SelfSubjectReview and kubernetes api server (#2559) 2025-09-08 11:25:10 +02:00
conversations feat: Add OpenAI Conversations API (#3429) 2025-10-03 08:47:18 -07:00
datasetio feat(api): implement v1beta leveling, and additional alpha (#3594) 2025-10-01 09:18:11 -07:00
datasets feat(api): implement v1beta leveling, and additional alpha (#3594) 2025-10-01 09:18:11 -07:00
eval feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
files docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
inference docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
inspect fix(auth): allow unauthenticated access to health and version endpoints 2025-10-09 20:14:34 +01:00
models docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
post_training feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
prompts docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
providers docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
safety docs: API docstrings cleanup for better documentation rendering (#3661) 2025-10-06 10:46:33 -07:00
scoring feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
scoring_functions feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
shields feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
synthetic_data_generation feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
telemetry feat(api): implement v1beta leveling, and additional alpha (#3594) 2025-10-01 09:18:11 -07:00
tools feat(tools)!: substantial clean up of "Tool" related datatypes (#3627) 2025-10-02 15:12:03 -07:00
vector_dbs feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
vector_io chore!: add double routes for v1/openai/v1 (#3636) 2025-10-02 16:11:05 +02:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
datatypes.py feat: Add OpenAI Conversations API (#3429) 2025-10-03 08:47:18 -07:00
resource.py feat: Adding OpenAI Prompts API (#3319) 2025-09-08 11:05:13 -04:00
version.py feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00