Skip to content

test(e2e): run authenticated FastAPI contract lane in hosted CI instead of service-wide skip #1057

Open

Description

@seonghobae

Finding

Hosted repository Tests can report GREEN while the real authenticated FastAPI contract suite is entirely skipped. backend/tests/test_api.py is module-level guarded by reachable PostgreSQL + Keycloak + Valkey. The original canary on #1055 exact 08a08108a87657ad427a6b6fa9b1b327166b0c9e passed hosted Tests (1776 passed, 147 skipped, 1 warning) while an authenticated Customer Master response expectation was stale because the entire service-backed API module did not execute.

#1055 has now repaired that specific response-contract drift on exact 831fc52a1969f2999109da2c061067a9dc0ae954: it added an ordinary-hosted serializer contract and updated the real authenticated expectation. That closes the leaf response-shape RED but does not close this topology issue. The hosted suite can still skip bearer/JWKS/RBAC/ABAC behavior wholesale when PostgreSQL/Keycloak/Valkey are unavailable.

This issue owns making authenticated HTTP/PostgreSQL/identity execution required in hosted validation after #1055 settles. It must not reopen or duplicate the Customer Master source lane.

Existing supported fixture

Protected docker-compose.yml already defines the intended development/test topology with bounded health dependencies:

  • PostgreSQL on host port 15432 with pg_isready healthcheck;
  • replay/migration service waiting for PostgreSQL health;
  • Valkey 8 on 16379 with valkey-cli ping healthcheck;
  • repository-built Keycloak on 18080 with imported demo realm and the product PostgreSQL as its database;
  • backend configuration documents Keycloak as local development mode while production may point at Keyverse/OIDC, so this does not create a second production identity authority.

Hosted CI should consume this repository-owned fixture, or a deliberately smaller profile derived from the same images/config/realm. Do not invent a second auth schema or duplicate Keyverse.

Required architecture and acceptance

Add a bounded hosted E2E lane that starts the minimum supported compose services, waits on explicit readiness, then runs backend/tests/test_api.py or a split equivalent preserving the same real bearer/JWKS/RBAC/ABAC behavior. Required service startup/migration/realm failure must fail the lane rather than degrading to collection-wide skips or continue-on-error.

Acceptance:

Do not open a competing source writer while #1055 remains active. After #1055 settles, implement this as a separate test-infrastructure lane and non-force converge onto the then-protected base. No warning suppression, mock-only substitution, continue-on-error, self-approval, no-op validation churn, lifecycle flip loop or gate weakening.

Activity

  1. seonghobae commented on Sep 18, 2026

    @seonghobae
    ContributorAuthor

    Fresh auth-security review found a prerequisite for this hosted authenticated lane. Protected docker/keycloak/realm-export.json enables directAccessGrantsEnabled=true on the public lineageweave-frontend client, and current smoke/backend/k6/seed paths use grant_type=password. RFC 9700 §2.4 says ROPC MUST NOT be used; RFC 10017 §7.3 requires redirect-based browser OAuth/OIDC.

    Issue #1119 now owns that grant/test-actor migration and rendered Authorization Code acceptance. This #1057 issue remains the single writer for making the PostgreSQL + Keycloak + Valkey authenticated FastAPI bearer/JWKS/RBAC/ABAC topology required in hosted CI. #1057 should consume #1119's standards-compliant fixture/token paths rather than institutionalizing the current password-grant setup; #1119 must not duplicate this issue's service-startup/CI orchestration. If implementation order moves, converge non-force.

  2. seonghobae commented on Sep 18, 2026

    @seonghobae
    ContributorAuthor

    Fresh auth-owner reconciliation: #1119 remains the prerequisite for removing public-client ROPC/password-grant fixtures. Source inspection confirms the rendered frontend E2E already performs the real Keycloak Authorization Code redirect/login; #1119 should strengthen and execute that existing path rather than build a duplicate browser-auth implementation. This issue remains the sole owner for making PostgreSQL + local Keycloak + Valkey authenticated FastAPI execution mandatory in hosted CI. When #1119 publishes standards-compliant user/machine/bootstrap fixtures, consume those fixtures here; do not preserve the current backend/tests/test_api.py password grant merely to bring up the hosted topology.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions