14 Security Hardening

This chapter lists what TraxrGRC enforces by itself and what you, as the operator, must do. Work through the operator checklist before go-live and again after each major change.

14.1 What the product enforces

AreaBuilt-in behavior
Transport headersEvery response carries Strict-Transport-Security: max-age=31536000; includeSubDomains, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: strict-origin-when-cross-origin and a Permissions-Policy that turns off camera, microphone, geolocation and payment. The X-Powered-By header is not sent.
Content Security PolicyPages carry a per-request nonce policy: scripts only from the application with the request's nonce, no plugins, no framing (frame-ancestors 'none'), forms and connections to the application only.
Cross-site requestsServer actions and every browser route that changes data refuse requests whose Origin does not match the host.
Session secretweb refuses to start in production with a missing, short (under 32 characters) or placeholder AUTH_SECRET.
SessionsSessions end after the session length (default 12 hours) or the idle timeout (default 60 minutes). Rights are refreshed every minute; a password reset, two-step verification reset, deactivation, administrator or group change, or Sign out everywhere ends the user's sessions within a minute, and a user's own password change ends their other sessions.
Sign-in throttlingFive failures lock that email from that address for 15 minutes; 30 failures lock the address for every account. Accounts are never locked outright. Ten failures on one account in 15 minutes refuse every address that failed and alert administrators.
Directory and SSOLDAP requires ldaps:// or StartTLS. SAML responses must be signed, answer a sign-in started from the application within 10 minutes, and name this instance as recipient; each is accepted once. LDAP and SSO never take over an existing password, administrator or break-glass account unless an administrator allowed the link.
Multi-factor authenticationBuilt-in two-step verification (TOTP authenticator apps, with ten single-use recovery codes) for password and LDAP sign-in, optional per user or required for everyone under Settings → Sessions. Single sign-on relies on the identity provider's MFA; SSO only makes it the only way in, with break-glass administrators keeping password sign-in for outages.
API rate limitEach API token may make 600 requests a minute on /api/v1 by default (API_RATE_LIMIT_PER_MINUTE); further requests get 429 with Retry-After.
Stored secretsThe SMTP password, LDAP bind password, SAML private key and two-step verification secrets are encrypted in the database (AES-256-GCM). Recovery codes are stored as keyed HMAC-SHA256 hashes. Passwords are stored as bcrypt hashes. API, SCIM and upload-link tokens are stored as SHA-256 hashes.
UploadsAttachments are limited to 25 MB each and to an allowlist of types (PDF, common images, text, Markdown, CSV, Office documents and ZIP), checked by extension, declared type and file content. Files are stored under random names and downloaded as attachments. Each user has an attachment storage quota (default 2048 MB).
Audit logAppend-only for the application: the application's database role can only read and add entries, triggers refuse changes, and a hash chain makes any later change detectable. Entries are kept at least 365 days.
BackupsIn-app snapshots are signed and checked on restore; restore keeps the audit log and security state and revokes all API and SCIM tokens.
ContainersNon-root, read-only root filesystem, all capabilities dropped, no-new-privileges; web published on loopback only; the database never published.
Outbound callsTelemetry and update checks are off. The application connects only to the services you configure (SMTP, LDAP, Microsoft Entra ID for AI assistants).

14.2 Operator checklist

14.2.1 TLS and the network

14.2.2 Secrets

14.2.3 Rotating AUTH_SECRET

Rotate AUTH_SECRET if it may have been exposed.

The consequences:

EffectWithout the dedicated keyWith the dedicated key set
Every session ends; everyone signs in again.AlwaysAlways
SAML sign-ins in progress fail and must be started again.AlwaysAlways
Stored SMTP password, LDAP bind password and SAML private key become unreadable and must be entered again under Settings → Integrations.YesNo, if SETTINGS_ENCRYPTION_KEY is set
In-app snapshots taken before the change can no longer be restored in the application.YesNo, if BACKUP_SIGNING_KEY is set

Server backups made with deploy/backup.sh are unaffected. To rotate:

  1. Generate the new value: openssl rand -base64 32.
  2. Replace AUTH_SECRET in .env and in the vault.
  3. Apply it: docker compose --profile tls up -d.
  4. Sign in and re-enter the integration secrets if needed; send a test email.

SETTINGS_ENCRYPTION_KEY and BACKUP_SIGNING_KEY are rotated the same way, with the effects in their own rows above.

14.2.4 Backups

14.2.5 Accounts and access

14.2.6 Monitoring

14.2.7 Keeping up to date

14.3 Known limits

These are properties of the design that the operator controls compensate for: