fastapi-gsap/tests
Tyler J King 782f5654ac fix: shared bearer auth, delegation depth, SQLite permissions
C-4: MCP endpoint requires verified bearer token. Unauthenticated
     requests rejected. _extract_principal() replaced by verified
     AuthResult from middleware.
C-8: All delegation endpoints require verified bearer token.
     X-Delegator-DID header removed — identity from token only.
     delegator_ac_id validated to belong to authenticated principal.
     Only delegators can revoke. Only delegator/delegate can view.
H-6: SQLite file permissions restricted to 0o600 (owner-only).
     Umask set before creation. WAL/SHM files also restricted.
H-7: Delegation depth tracked and enforced against max_delegation_depth.
     Sub-delegations increment depth. Exceeded depth → 403.

Shared TokenAuthenticator auto-detects identity driver from JWT
issuer claim (Keycloak or Entra). verify_bearer FastAPI dependency
for all protected endpoints. Health endpoint remains public.

ALL 10 critical findings CLOSED. ALL 10 high findings CLOSED.

Signed-off-by: Tyler King <tking@guildhouse.dev>
2026-04-14 17:31:46 -04:00
..
fixtures/sample-template feat(templates): add template system — manifest, policy, loader, registries 2026-04-14 11:09:41 -04:00
__init__.py feat: fastapi-gsap — lightweight GSAP broker PoC 2026-03-30 14:10:21 -04:00
conftest.py feat: fastapi-gsap — lightweight GSAP broker PoC 2026-03-30 14:10:21 -04:00
test_ansible_collection.py feat(ansible): add guildhouse.bastion Ansible Galaxy collection 2026-04-14 11:23:03 -04:00
test_auth_middleware.py fix: shared bearer auth, delegation depth, SQLite permissions 2026-04-14 17:31:46 -04:00
test_broker.py feat: fastapi-gsap — lightweight GSAP broker PoC 2026-03-30 14:10:21 -04:00
test_compliance_gate.py feat(authorize): add Intune compliance-gated AC issuance 2026-04-14 05:24:03 -04:00
test_connectors.py feat: governed connector module 2026-03-30 16:42:38 -04:00
test_credentials.py feat: wire credential resolver and connectors into broker startup 2026-04-14 06:03:57 -04:00
test_entra_driver.py fix(drivers): JWKS verification for Keycloak, remove Entra fallback, gate on_behalf_of 2026-04-14 07:51:38 -04:00
test_functions.py feat: governed function runtime + billing drain 2026-03-30 22:12:29 -04:00
test_graph_client.py test: add Graph API client unit tests 2026-04-14 05:28:46 -04:00
test_intune.py fix: capability enforcement, credential safety, atomic delegations, input validation 2026-04-14 08:13:27 -04:00
test_keycloak_driver.py fix(drivers): JWKS verification for Keycloak, remove Entra fallback, gate on_behalf_of 2026-04-14 07:51:38 -04:00
test_mcp_intune.py fix: shared bearer auth, delegation depth, SQLite permissions 2026-04-14 17:31:46 -04:00
test_security.py fix: capability enforcement, credential safety, atomic delegations, input validation 2026-04-14 08:13:27 -04:00
test_templates.py feat(templates): add template system — manifest, policy, loader, registries 2026-04-14 11:09:41 -04:00