Files
sentryagent-idp/policies/data/scopes.json
SentryAgent.ai Developer 272b69f18d feat(phase-3): workstream 5 — Webhooks & Event Streaming
- DB migrations 016/017: webhook_subscriptions and webhook_deliveries tables
- WebhookService: CRUD for subscriptions, Vault-backed secret storage, delivery history
- WebhookDeliveryWorker: Bull queue, HMAC-SHA256 signatures, exponential backoff,
  SSRF protection (RFC 1918 + loopback + link-local rejection), dead-letter handling
- EventPublisher: publishes 10 event types (agent/credential/token lifecycle);
  optional Kafka adapter activated via KAFKA_BROKERS env var
- AgentService, CredentialService, OAuth2Service: wired to EventPublisher
- WebhookController + routes: 6 endpoints with webhooks:read / webhooks:write scope guards
- KafkaAdapter: optional Kafka producer (kafkajs), no-op when KAFKA_BROKERS unset
- OAuthScope extended: webhooks:read, webhooks:write
- AuditAction extended: webhook.created, webhook.updated, webhook.deleted
- Metrics: agentidp_webhook_dead_letters_total counter added to registry
- 523 unit tests passing; TypeScript strict throughout, zero `any`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 00:07:41 +00:00

36 lines
2.3 KiB
JSON

{
"endpoint_permissions": {
"GET:/api/v1/agents": ["agents:read"],
"GET:/api/v1/agents/:id": ["agents:read"],
"POST:/api/v1/agents": ["agents:write"],
"PATCH:/api/v1/agents/:id": ["agents:write"],
"DELETE:/api/v1/agents/:id": ["agents:write"],
"GET:/api/v1/agents/:id/credentials": ["agents:read"],
"POST:/api/v1/agents/:id/credentials": ["agents:write"],
"POST:/api/v1/agents/:id/credentials/:credId/rotate": ["agents:write"],
"DELETE:/api/v1/agents/:id/credentials/:credId": ["agents:write"],
"POST:/api/v1/token/introspect": ["tokens:read"],
"POST:/api/v1/token/revoke": ["tokens:read"],
"GET:/api/v1/audit": ["audit:read"],
"GET:/api/v1/audit/:id": ["audit:read"],
"POST:/api/v1/organizations": ["admin:orgs"],
"GET:/api/v1/organizations": ["admin:orgs"],
"GET:/api/v1/organizations/:id": ["admin:orgs"],
"PATCH:/api/v1/organizations/:id": ["admin:orgs"],
"DELETE:/api/v1/organizations/:id": ["admin:orgs"],
"POST:/api/v1/organizations/:id/members": ["admin:orgs"],
"GET:/api/v1/agents/:agentId/did/resolve": ["agents:read"],
"POST:/api/v1/federation/trust": ["admin:orgs"],
"GET:/api/v1/federation/partners": ["admin:orgs"],
"GET:/api/v1/federation/partners/:id": ["admin:orgs"],
"PATCH:/api/v1/federation/partners/:id": ["admin:orgs"],
"DELETE:/api/v1/federation/partners/:id": ["admin:orgs"],
"POST:/api/v1/webhooks": ["webhooks:write"],
"GET:/api/v1/webhooks": ["webhooks:read"],
"GET:/api/v1/webhooks/:id": ["webhooks:read"],
"PATCH:/api/v1/webhooks/:id": ["webhooks:write"],
"DELETE:/api/v1/webhooks/:id": ["webhooks:write"],
"GET:/api/v1/webhooks/:id/deliveries": ["webhooks:read"]
}
}