Security · 1.4.0 · Apache-2.0

Incident data and credentials stay on your network.

OpsKnight operates on a fail-closed, zero-trust security model. There is no external cloud, no telemetry beacons, and no vendor phone-home. Operational credentials are encrypted at rest with AES-256-CBC envelope encryption, and inbound alert webhooks are authenticated with constant-time cryptographic verification.

Two-Tier Envelope Encryption (AES-256-CBC)

Credentials entered into the Web Console (Slack bot tokens, SMTP passwords, Twilio keys, OIDC client secrets) are encrypted before touching PostgreSQL. OpsKnight uses a two-tier Envelope Encryption model (V2):

  • The master key is configured strictly through the ENCRYPTION_KEY environment variable (never stored in the database).
  • Each secret is encrypted with a unique, dynamically generated Data Encryption Key (DEK).
  • Ciphertext is stored as v2:<dekIv>:<encryptedDek>:<payloadIv>:<encryptedPayload>.

Generate a 32-byte (256-bit) master encryption key:

bash

openssl rand -hex 32

Fields Encrypted at Rest in PostgreSQL

Provider / SubsystemEncrypted Field(s)Purpose
Jira CloudapiToken, webhookSecretTwo-way issue synchronization
SSO / OIDCclientSecretOAuth2/OIDC client secrets
Slack ChatOpsbotToken, signingSecret, clientSecretWar room bot & interactive actions
TwilioauthToken, whatsappAuthTokenSMS & WhatsApp paging keys
AWS SNS / SESsecretAccessKeyHigh-volume delivery credentials
Email (Resend / SendGrid / SMTP)apiKey, passwordIncident reports & status updates
Web PushvapidPrivateKeyBrowser push notification keys

Envelope encryption & key rotation docs →

Inbound Webhook Verification & Anti-Replay

Every inbound monitoring integration route enforces cryptographic authentication before payloads reach incident business logic:

  • Timing-Safe Equality: Secret tokens and signatures are evaluated using crypto.timingSafeEqual with dummy buffer evaluation on length mismatches to eliminate timing side-channel leaks.
  • Outbound Anti-Replay: Outbound notifications bind signatures to Unix timestamps (X-OpsKnight-Timestamp + X-OpsKnight-Signature) with a strict 300-second expiration window.

Supported Inbound Signature Verifiers

ProviderSignature HeaderAlgorithm
GitHubx-hub-signature-256HMAC-SHA256
Slack ChatOpsx-slack-signatureHMAC-SHA256
Sentrysentry-hook-signatureHMAC-SHA256
Grafanax-grafana-signatureHMAC-SHA256
GitLabx-gitlab-tokenConstant-time token
Generic Webhooksx-signature / x-webhook-signatureHMAC-SHA256

Webhook signature verification docs →

Identity, OIDC SSO & Role Governance

OpsKnight supports local accounts and OpenID Connect (OIDC) single sign-on with Google Workspace, Okta, Azure AD, Keycloak, and Authentik.

  • Workspace Roles: USER (scoped to assigned teams/services), RESPONDER (global response), and ADMIN (system settings and user governance).
  • Team Roles: Independent team-level classification (MEMBER, ADMIN, OWNER) with last-owner demotion protection.
  • Auto-Provisioning & Allowlisting: Restrict sign-in to verified corporate email domains.

OIDC SSO configuration guide →

VPC Network Isolation & Zero Telemetry

  • Zero External Telemetry: No Google Analytics, no PostHog, no Sentry phone-home, no tracking pixels. All logs and audit trails remain in your PostgreSQL database.
  • Database Isolation: Keep PostgreSQL (port 5432) on private internal container networks or VPC security groups.
  • TLS Reverse Proxying: Always terminate TLS at Nginx, Caddy, or an Ingress Controller and forward X-Forwarded-Proto and X-Forwarded-Host.
  • Non-Root Containers: Container images run as unprivileged users, compatible with Kubernetes restricted pod security standards.

What this is not

There is no hosted SaaS cloud holding your encryption keys. If you lose your ENCRYPTION_KEY, encrypted secrets cannot be recovered. Always store backups of your environment secrets in a dedicated secrets manager (AWS Secrets Manager, HashiCorp Vault, GCP Secret Manager).