Skip to content

Add attestation proxy routing and no-policy response handling#232

Open
FilipCivljak wants to merge 3 commits into
mainfrom
attestation
Open

Add attestation proxy routing and no-policy response handling#232
FilipCivljak wants to merge 3 commits into
mainfrom
attestation

Conversation

@FilipCivljak
Copy link
Copy Markdown
Contributor

What type of PR is this?

This is a feature because it adds the Attestation page to the Cube UI and adds no-policy response handling to the cube-proxy.

What does this do?

  • Adds an optional Attestation page to the Vite UI, gated behind the VITE_ENABLE_ATTESTATION=true build-time flag. When disabled (default), no attestation nav item, route, or API calls are included in the bundle.
  • The page lets domain members view and update the aTLS attestation policy via a JSON editor with Refresh and Save actions.
  • API calls route through /proxy/* so the existing Vite dev proxy and Traefik setup work without extra configuration.
  • Fixes cube-proxy returning 403 instead of an empty 200 when no attestation policy exists in the database yet.

Which issue(s) does this PR fix/relate to?

No issue.

Have you included tests for your changes?

No. The attestation page is UI-only and the proxy change (sql.ErrNoRows → empty response) is a one-line guard with no testable business logic beyond the existing DB layer.

Did you document any new/modified features?

The ui/.env.example documents the VITE_ENABLE_ATTESTATION flag and the existing agent/workflows/attestation-policy.md covers the full policy generation workflow.

Notes

Policy generation requires real TEE hardware (AMD SEV-SNP, Intel TDX, GCP, or Azure CVM) and cocos-cli. For local dev, setting VITE_ENABLE_ATTESTATION=true and uploading {"platform":"no_cc"} via the editor is sufficient to exercise the full Save/Refresh flow.

FilipCivljak and others added 3 commits May 14, 2026 16:41
Implements the Attestation page in the Vite UI, gated by
VITE_ENABLE_ATTESTATION=true at build time. When disabled (default),
no attestation routes, nav items, or API calls are included in the bundle.

- ui/src/lib/features.ts: VITE_ENABLE_ATTESTATION and VITE_CUBE_PROXY_URL flags
- ui/src/lib/attestation.ts: API client for GET /{domainID}/attestation/policy
  and POST /attestation/policy (proxy-attestation.yaml contracts)
- ui/src/pages/AttestationPage.tsx: JSON policy editor with Refresh/Save,
  status badge, and info panels explaining aTLS platforms
- ui/src/components/Sidebar.tsx: conditional Attestation nav item (shield icon)
- ui/src/App.tsx: conditional /attestation route
- ui/vite.config.ts: CUBE_PROXY_TARGET dev proxy for /attestation
- ui/.env.example: documents all three new env vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant