Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
External REST API E2E Security Suite
This suite validates the internet-facing external-rest-api with a security-first focus.
Location
- Tests:
tests/e2e/external-rest-api/security.e2e.test.ts - Helpers:
tests/e2e/external-rest-api/helpers/*
Prerequisites
- Node.js 22+ installed.
- Dependencies installed for:
tests/e2eexternal-rest-api
- No cluster dependency is required for this suite. It uses local deterministic stubs.
Run
From repo root:
npm --prefix tests/e2e install
npm --prefix external-rest-api install
npm --prefix external-rest-api run test:e2e
Or run directly:
npm --prefix tests/e2e run test:external-rest-api-e2e
Security Matrix Covered
Auth endpoint behavior
/api/v1/auth/googlemissingidTokenvalidation
Session token hardening
- Missing
Authorizationrejected - Non-bearer header rejected
- Oversized token rejected
- Malformed token rejected
- Wrong signature rejected
- Wrong issuer rejected
- Wrong audience rejected
- Expired token rejected
- Missing required claims rejected
- Missing
Claim binding and protected route behavior
/api/v1/meand/api/v1/me/*use identity from verified token/api/v1/team/*uses team from verified token/api/v1/me/profilerejects cross-user update attempts/api/v1/directory/searchrequires auth
RPC token brokerage
- Valid
scopes+hostRefsreturns token + TTL - Invalid scopes rejected
- Empty scopes/hostRefs rejected
- Wildcard hostRef rejected
- Valid
Upstream dependency failure handling
- Control API failures map to safe HTTP 500 responses
- Response bodies do not leak service token secrets
Notes
- Tests start a real
external-rest-apiprocess. - A local stub
control-apiserver is used for deterministic, CI-safe behavior. - Session JWT signing uses test-only keys under
tests/e2e/external-rest-api/helpers/jwt.ts.