Wallgent
Guides

Compliance Controls

Real-time compliance health checks and financial controls monitoring.

Overview

The compliance endpoint runs live checks against your organization's security and regulatory controls. Use it to verify that encryption keys are configured, API keys have proper permissions, and webhook secrets are encrypted at rest.

Endpoint: GET /v1/internal/compliance

Authentication: Requires a valid API key with admin-level access.


Response

{
  "status": "compliant",
  "summary": {
    "total": 6,
    "passed": 5,
    "failed": 0,
    "warnings": 1
  },
  "controls": [
    {
      "control": "access_control.no_null_permissions",
      "status": "pass",
      "detail": "All active API keys have explicit permissions",
      "lastChecked": "2026-02-12T00:00:00.000Z"
    }
  ],
  "checkedAt": "2026-02-12T00:00:00.000Z"
}

Top-level fields

FieldTypeDescription
statusstringcompliant, warnings, or non_compliant
summary.totalnumberTotal controls checked
summary.passednumberControls that passed
summary.failednumberControls that failed
summary.warningsnumberControls with warnings
controlsarrayIndividual control results
checkedAtstringISO 8601 timestamp of the check

Controls

access_control.no_null_permissions

Verifies that all active (non-revoked) API keys have explicit permissions set. Keys without permissions could bypass access controls.

StatusMeaning
passAll active API keys have explicit permissions
failOne or more active keys have NULL permissions

access_control.expired_keys_revoked

Checks that expired API keys have been revoked. Expired but unrevoked keys may indicate a gap in key lifecycle management.

StatusMeaning
passAll expired keys are revoked
warnExpired keys still active (auto-revocation worker handles this)

encryption.webhook_secrets

Samples up to 10 webhook secrets and verifies they follow the AES-256-GCM encrypted format (iv:authTag:ciphertext).

StatusMeaning
passAll sampled secrets are encrypted at rest
failUnencrypted secrets found
warnNo webhooks registered to verify

encryption.key_configured

Checks that the WEBHOOK_ENCRYPTION_KEY environment variable is set. Without it, webhook secret encryption cannot function.

StatusMeaning
passEncryption key is configured
failWEBHOOK_ENCRYPTION_KEY not set

headers.security_headers

Confirms that security headers are configured in the middleware: HSTS, Content-Security-Policy, Cross-Origin-Resource-Policy, Cross-Origin-Opener-Policy, and Permissions-Policy.

StatusMeaning
passAll security headers are configured

access_control.mcp_auth_token

Verifies that the MCP server authentication token is configured, ensuring the MCP transport layer requires authentication.

StatusMeaning
passMCP auth token configured
warnMCP_AUTH_TOKEN not set

Status logic

  • compliant — All controls pass (no failures, no warnings)
  • warnings — No failures, but one or more warnings exist
  • non_compliant — One or more controls failed

Usage

Use the compliance endpoint in CI/CD pipelines, scheduled health checks, or operational dashboards to continuously verify your security posture.

curl -H "Authorization: Bearer wg_live_xxx" \
  https://api.wallgent.com/v1/internal/compliance

A non-compliant response (any fail status) should trigger investigation. Common remediations:

ControlRemediation
no_null_permissionsUpdate API keys to include explicit permissions
expired_keys_revokedRevoke expired keys or verify the auto-revocation worker is running
webhook_secretsRe-register webhooks to encrypt secrets with the current encryption key
key_configuredSet WEBHOOK_ENCRYPTION_KEY in environment variables
mcp_auth_tokenSet MCP_AUTH_TOKEN in environment variables

On this page