llama-stack-mirror/tests/unit/server
Derek Higgins a29253e9bf fix: access control to fail-closed when owner attributes are missing
Changed UserInOwnersList.matches() to return False instead of True when
a resource's owner attributes are None. This prevents unintended access
when resource when owner attributes arn't present.

For example, checking "user in owners teams" now returns False if the
resource has no teams attribute, rather than defaulting to True.

Changed UserIsOwner.matches() to return True when a resource has no
owner attribute set. This allows access to resources that don't use the
owner attribute.

Updated default_policy to use multiple separate "user in owners"
AccessRules instead of a single rule with multiple when clauses. With
the new fail-closed behavior, only one rule needs to match. Added a
"user is owner" rule to handle resources without attribute-based access.

Closes: #4272

Signed-off-by: Derek Higgins <derekh@redhat.com>
2025-12-02 15:39:02 +00:00
..
test_access_control.py fix: access control to fail-closed when owner attributes are missing 2025-12-02 15:39:02 +00:00
test_auth.py test: Update JWKS tests to properly mock authentication (#4257) 2025-12-01 09:57:44 -08:00
test_auth_github.py test: suppress expected error logs in SSE test (#3886) 2025-10-22 14:34:32 -07:00
test_cors.py feat: Add CORS configuration support for server (#3201) 2025-08-21 14:23:27 -07:00
test_quota.py refactor(storage): make { kvstore, sqlstore } as llama stack "internal" APIs (#4181) 2025-11-18 13:15:16 -08:00
test_replace_env_vars.py fix(env): env var replacement preserve types (#3270) 2025-08-28 17:07:18 +02:00
test_resolver.py refactor(storage): make { kvstore, sqlstore } as llama stack "internal" APIs (#4181) 2025-11-18 13:15:16 -08:00
test_schema_registry.py feat(openapi): switch to fastapi-based generator (#3944) 2025-11-14 15:53:53 -08:00
test_server.py fix: remove_disabled_providers filtering models with None fields (#4132) 2025-11-13 07:24:05 -08:00
test_sse.py fix: rename llama_stack_api dir (#4155) 2025-11-13 15:04:36 -08:00