llama-stack-mirror/.github/workflows
ehhuang c8bac888af
feat(auth): support github tokens (#2509)
# What does this PR do?

This PR adds GitHub OAuth authentication support to Llama Stack,
allowing users to
  authenticate using their GitHub credentials (#2508) . 

1. support verifying github acesss tokens
2. support provider-specific auth error messages
3. opportunistic reorganized the auth configs for better ergonomics

## Test Plan
Added unit tests.

Also tested e2e manually:
```
server:
  port: 8321
  auth:
    provider_config:
      type: github_token
```
```
~/projects/llama-stack/llama_stack/ui
❯ curl -v http://localhost:8321/v1/models
* Host localhost:8321 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:8321...
* Connected to localhost (::1) port 8321
> GET /v1/models HTTP/1.1
> Host: localhost:8321
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 401 Unauthorized
< date: Fri, 27 Jun 2025 21:51:25 GMT
< server: uvicorn
< content-type: application/json
< x-trace-id: 5390c6c0654086c55d87c86d7cbf2f6a
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
{"error": {"message": "Authentication required. Please provide a valid GitHub access token (https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) in the Authorization header (Bearer <token>)"}}
~/projects/llama-stack/llama_stack/ui
❯ ./scripts/unit-tests.sh


~/projects/llama-stack/llama_stack/ui
❯ curl "http://localhost:8321/v1/models" \
-H "Authorization: Bearer <token_obtained_from_github>" \

{"data":[{"identifier":"accounts/fireworks/models/llama-guard-3-11b-vision","provider_resource_id":"accounts/fireworks/models/llama-guard-3-11b-vision","provider_id":"fireworks","type":"model","metadata":{},"model_type":"llm"},{"identifier":"accounts/fireworks/models/llama-guard-3-8b","provider_resource_id":"accounts/fireworks/models/llama-guard-3-8b","provider_id":"fireworks","type":"model","metadata":{},"model_type":"llm"},{"identifier":"accounts/fireworks/models/llama-v3p1-405b-instruct","provider_resource_id":"accounts/f
```

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-08 11:02:36 -07:00
..
changelog.yml ci: pin github actions to hashes (#1776) 2025-04-01 17:09:39 +02:00
gha_workflow_llama_stack_tests.yml chore: fix hash for thollander/actions-comment-pull-request (#1900) 2025-04-09 10:10:07 +02:00
install-script-ci.yml feat: Llama Stack Meta Reference installation script (#1383) 2025-04-28 11:25:59 +02:00
integration-auth-tests.yml feat(auth): support github tokens (#2509) 2025-07-08 11:02:36 -07:00
integration-sql-store-tests.yml fix: authorized sql store with postgres (#2641) 2025-07-07 19:36:34 -07:00
integration-tests.yml ci: error when a pipefails (#2635) 2025-07-07 16:47:30 +02:00
integration-vector-io-tests.yml chore: Enabling VectorIO Integration tests for Milvus (#2546) 2025-06-30 19:49:59 -07:00
pre-commit.yml chore: bump python supported version to 3.12 (#2475) 2025-06-24 09:22:04 +05:30
providers-build.yml chore: isolate bare minimum project dependencies (#2282) 2025-06-26 10:14:27 +02:00
python-build-test.yml chore(github-deps): bump astral-sh/setup-uv from 6.3.0 to 6.3.1 (#2548) 2025-06-29 13:55:32 -04:00
semantic-pr.yml ci: pin github actions to hashes (#1776) 2025-04-01 17:09:39 +02:00
stale_bot.yml ci: pin github actions to hashes (#1776) 2025-04-01 17:09:39 +02:00
test-external-providers.yml ci: fix external provider test (#2438) 2025-06-12 16:14:32 +02:00
tests.yml ci: pin github actions to hashes (#1776) 2025-04-01 17:09:39 +02:00
unit-tests.yml chore: bump python supported version to 3.12 (#2475) 2025-06-24 09:22:04 +05:30
update-readthedocs.yml chore: refactor workflow writting (#2225) 2025-05-21 17:31:14 +02:00