Implement KCA: web reimplementation of XCA PKI workflows

- kaya backend with OIDC sessions, API tokens, Postgres/Tortoise models
- AES-256-GCM private key storage and full certificate/CSR/CRL domain logic
- Sycamore/WASM SPA for vaults, keys, requests, certificates, CRLs and templates
- imports/exports, XCA .xdb migration, Docker Compose stack and tests
This commit is contained in:
2026-10-23 02:06:55 +00:00
commit 4f3a632f4b
109 changed files with 21048 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""In-process HTTP client for the app."""
from __future__ import annotations
import contextlib
from typing import AsyncIterator
from httpx import ASGITransport, AsyncClient
from kca.app import app, tortoise_mixin
@contextlib.asynccontextmanager
async def api_client() -> AsyncIterator[AsyncClient]:
await tortoise_mixin.ensure_context()
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://127.0.0.1") as client:
yield client