You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aperio has a ConnectRPC server and a /api/v1/* REST compatibility layer, but none of the externalizing tooling that security engineering teams expect from a posture product:
No published API surface — no OpenAPI spec, no SDK, no auth scheme for headless callers (sessions only).
No Terraform provider — SecOps can't declare connectors / rules / SIEM destinations / risk exceptions as code.
Token format: apk_live_<base62-26-chars>. Hashed with HMAC-SHA256 + APERIO_API_TOKEN_SALT. Validated in the same middleware as cookies; sets the same OrgContext for downstream handlers. Per-token rate limits via the existing RateLimitBucket.
OpenAPI generation
Use Buf's gRPC-Gateway transcoder + buf generate to emit OpenAPI v3 from the existing proto/aperio/v1/api.proto. Published at:
/openapi.json (live)
/openapi.yaml (live)
Bundled into the repo as gen/openapi/aperio-v1.yaml (CI-verified to match source)
Swagger UI served at /api/docs (gated behind a config flag).
SDKs
Language
Generation
Location
Go
connectrpc.com/connect (existing)
gen/go-sdk/
TypeScript
@connectrpc/connect-web + OpenAPI types
packages/sdk-ts/ (npm publishable)
Python
openapi-python-client from the OpenAPI spec
new python-sdk/ repo
Each SDK ships with a thin auth helper for API tokens and per-token rate limit handling.
Terraform provider
New repo terraform-provider-aperio (Go), built against the Go SDK. Resources:
Provider published to the Terraform Registry under writer/aperio. Examples and docs autogenerated via tfplugindocs.
CLI (aperio)
Cobra-based Go binary. Distribution: GitHub releases (signed via Sigstore), Homebrew tap, Docker image.
# Auth (interactive OAuth-like device flow, or via env APERIO_API_TOKEN)
aperio auth login --org acme
# Findings
aperio finding list --severity CRITICAL,HIGH --status OPEN --json
aperio finding view <id>
aperio finding mute <id> --rationale "...handled in JIRA-1234" --expires 7d
# Connectors
aperio connector list
aperio connector sync github --force
# Rules (depends on #47)
aperio rule list
aperio rule test ./rules/github/public-repo.yaml --window 30d
aperio rule push ./rules/github/
# Exports
aperio finding export --format jsonl --since 30d > findings.jsonl
aperio compliance export --framework soc2 --period 2026-Q1 --out evidence.zip # depends on #5# Admin
aperio token create --name "ci-deploy" --scopes WRITE
aperio token list
aperio token revoke <id>
CLI config at ~/.aperio/config.yaml with multi-org context switching (aperio context use acme).
Audit & observability
Every API token use writes a TenantAuditLog entry (action="api.invoke", metadata.tokenId, .method, .ip). Per-token usage dashboard tile (calls/day, error rate, last used).
Phasing
Phase
Scope
P1
API token auth + middleware; /admin/tokens UI; OpenAPI generation + CI check; basic Go SDK
Do API tokens scope to the org only, or also to a specific connector / destination subset?
Terraform provider: drift-detection strategy — Aperio is the source of truth, but operators may also mutate via the web UI. Detect-and-warn vs. force-overwrite?
Should the CLI support a "watch" mode (aperio finding list --watch) for SOC dashboards on terminals?
Versioning strategy for the OpenAPI spec — semver per proto/aperio/vN/?
Problem
Aperio has a ConnectRPC server and a
/api/v1/*REST compatibility layer, but none of the externalizing tooling that security engineering teams expect from a posture product:aperio finding list,aperio rule test).This blocks adoption in two important segments:
Goals
IntegrationConnection,DetectionRule(depends on Detection-as-code: declarative YAML rules + community rule packs #47),SiemDestination,WorkflowDestination(depends on Persist ingestion jobs in the database #6),RiskException,Organizationsettings.aperioCLI — operator + ops use cases (list, get, mute, test, sync, export).Non-goals
Proposed design
Headless auth (scoped API tokens)
New schema:
Token format:
apk_live_<base62-26-chars>. Hashed with HMAC-SHA256 +APERIO_API_TOKEN_SALT. Validated in the same middleware as cookies; sets the sameOrgContextfor downstream handlers. Per-token rate limits via the existingRateLimitBucket.OpenAPI generation
Use Buf's gRPC-Gateway transcoder +
buf generateto emit OpenAPI v3 from the existingproto/aperio/v1/api.proto. Published at:/openapi.json(live)/openapi.yaml(live)gen/openapi/aperio-v1.yaml(CI-verified to match source)Swagger UI served at
/api/docs(gated behind a config flag).SDKs
connectrpc.com/connect(existing)gen/go-sdk/@connectrpc/connect-web+ OpenAPI typespackages/sdk-ts/(npm publishable)openapi-python-clientfrom the OpenAPI specpython-sdk/repoEach SDK ships with a thin auth helper for API tokens and per-token rate limit handling.
Terraform provider
New repo
terraform-provider-aperio(Go), built against the Go SDK. Resources:Provider published to the Terraform Registry under
writer/aperio. Examples and docs autogenerated viatfplugindocs.CLI (
aperio)Cobra-based Go binary. Distribution: GitHub releases (signed via Sigstore), Homebrew tap, Docker image.
CLI config at
~/.aperio/config.yamlwith multi-org context switching (aperio context use acme).Audit & observability
Every API token use writes a
TenantAuditLogentry (action="api.invoke",metadata.tokenId, .method, .ip). Per-token usage dashboard tile (calls/day, error rate, last used).Phasing
/admin/tokensUI; OpenAPI generation + CI check; basic Go SDKaperio_detection_ruleresource (post-#47); Python SDK; CLI rule commands (post-#47)Open questions
aperio finding list --watch) for SOC dashboards on terminals?proto/aperio/vN/?