Application security

Technical overview of DFIRe's security architecture, including authentication, encryption at rest, and role-based access controls.

Security Overview

DFIRe is designed for handling sensitive forensic and incident response data. The application implements defense-in-depth with multiple security layers.

Feature Implementation
Authentication Session-based, with OIDC SSO and TOTP multi-factor authentication
File Encryption AES-256-GCM with three-layer key hierarchy
Credential Storage Fernet encryption (AES-128-CBC + HMAC-SHA256)
Access Control Two-tier RBAC (global + case-scoped)
Session Management Database-backed with O(1) revocation
CSRF Protection Double-submit cookie pattern
Rate Limiting Configurable per-endpoint throttling
Audit Logging Append-only, fail-closed audit trail

Infrastructure Security Responsibility

Important: The security features documented on this page secure the DFIRe application itself. You are solely responsible for securing your underlying infrastructure, including the database, file storage, and network access.

DFIRe is designed as a user interface layer that operates on data you own and control. When deployed for production, DFIRe does not include a database or file storage system. You provide those yourself. This separation is intentional: database security requirements vary significantly between organizations, and DFIRe lets you choose what fits, whether that is an on-premise PostgreSQL cluster, a managed Database-as-a-Service, or another configuration.

What DFIRe Secures

  • Application-layer authentication and session management
  • Role-based access control within the application
  • Encryption of file attachments before storage
  • Encryption of stored credentials (API keys, SSO secrets)
  • CSRF protection and rate limiting
  • Audit logging of user actions

What You Must Secure

Component Your Responsibility
PostgreSQL Database Access control, authentication, encryption at rest, backups, replication, network isolation. Case data is stored in plaintext in the database for performance and full-text search capability.
File Storage Access control, redundancy, backups. Files are encrypted by DFIRe before storage, but you control the storage infrastructure.
Network Access Firewall rules, TLS termination, VPN/private network configuration, load balancing, DDoS protection.
Server Infrastructure Operating system security, container runtime security, resource limits, monitoring, patching.
Backup & Recovery Database backups, file storage backups, encryption key backups, disaster recovery procedures.
Compliance Ensuring the data you store complies with applicable regulations (GDPR, HIPAA, etc.) and that your infrastructure meets compliance requirements.

High-Security Environments

For organizations with strict security requirements:

  • Air-gapped deployment: DFIRe supports offline licensing for networks without internet access
  • Network isolation: Deploy DFIRe in a dedicated VLAN or private network segment
  • Database encryption: Enable PostgreSQL's Transparent Data Encryption (TDE) or use encrypted storage volumes
  • Access logging: Configure database audit logging in addition to DFIRe's application-level audit trail
  • Zero-trust architecture: Require VPN or identity-aware proxy for all access to DFIRe

See the End User License Agreement for the complete terms regarding infrastructure and data security responsibilities.

Authentication

DFIRe uses session-based authentication with support for both local credentials and federated identity via OpenID Connect (OIDC).

Session Management

Sessions are managed using Django's database-backed session framework with additional tracking for security:

  • Session storage: PostgreSQL database (not cookies or file-based)
  • Session tracking: UserSession model tracks active sessions per user
  • Session metadata: IP address and user-agent recorded for each session
  • O(1) revocation: Instant invalidation of all user sessions (e.g., on password change)
  • Cookie security: HttpOnly, SameSite=Lax, Secure flags in production
  • Self-service control: users can review their own active sessions (browser, IP address, last activity) and revoke any other session, individually or all at once, from My Profile
  • Idle timeout: sessions expire after 12 hours of inactivity (a sliding window that activity extends); closing the browser ends the session immediately

Local Authentication

For users without SSO, DFIRe provides username/password authentication:

  • Password policy: Minimum 12 characters with complexity requirements
  • Password storage: PBKDF2-SHA256 with per-user salt (Django default)
  • Login rate limiting: 5 attempts per minute per client IP (counted against the real client address, not a spoofable proxy header)
  • Session invalidation: All sessions revoked on password change

Multi-Factor Authentication

A password account can require a second factor after the password. SSO accounts are outside it, because their identity provider decides what their sign-in requires.

  • Second factor: time-based one-time passwords (TOTP, RFC 6238) from any standard authenticator app
  • Recovery codes: ten single-use codes, shown once at enrolment and replaceable from the user's profile
  • Installation-wide requirement: a superuser can require MFA of every password account. An account that has not set it up yet gets a bounded number of password-only sign-ins
  • Guessing: each wrong code lengthens the wait before the next attempt on that device. DFIRe also rate limits the endpoint and audits every failure
  • Enrolment surface: setting up, replacing recovery codes and turning MFA off require a browser session, so an API key can never enrol a factor
  • Audit: DFIRe records enrolment, recovery-code replacement, removal and administrator reset

See Users and roles for the setup procedure and the administrator reset.

OIDC Single Sign-On

DFIRe supports federated authentication via OpenID Connect, allowing integration with enterprise identity providers:

Provider Status
Microsoft Entra ID (Azure AD) Tested
Google Workspace Tested
Okta Supported
Auth0 Tested
Any OIDC-compliant IdP Supported

OIDC Flow

  1. User selects SSO provider on login page
  2. Browser redirects to identity provider's authorization endpoint
  3. User authenticates with the identity provider
  4. IdP redirects back with authorization code
  5. DFIRe exchanges code for tokens via back-channel
  6. Claims extracted from ID token (email, name, phone, picture)
  7. User matched by (provider_id, subject), or by email when the identity provider asserts email_verified
  8. Session created and user redirected to dashboard

The authorization request carries a PKCE challenge (S256), a state value and a nonce, and DFIRe checks all three on the callback. A state that does not match the session fails the sign-in, and so does one older than ten minutes. DFIRe also refuses an ID token that comes back without the nonce.

User Provisioning

When a user first authenticates via OIDC:

  • Account is automatically created from OIDC claims
  • Default group assigned based on provider configuration
  • Profile picture downloaded if provided by IdP
  • OIDC identity (provider + subject) stored for future logins

See Single Sign-On for configuration instructions.

Encryption at Rest

DFIRe encrypts all sensitive data at rest using a three-layer key hierarchy. This design ensures that data compromise requires access to multiple keys. Deleting a key makes the data it protects unreadable, unless a backup still holds that key. Database backups hold the keys, so restoring a backup brings a deleted case back, and DFIRe does not undo that.

Key Hierarchy

Tenant Master Key (32-byte, generated once)
    └── Entity Key (per Case or Evidence Item)
            └── File Key (derived per attachment)
Layer Storage Purpose
Tenant Master Key Database (Tenant.encryption_key) Root key for all tenant data
Entity Key Database (Case/Item.encryption_key) Per-case/item isolation
File Key Derived at runtime Unique per attachment

File Key Derivation

Each attachment has a unique encryption key derived using HKDF-SHA256:

1. intermediate = HKDF(salt=tenant_key, ikm=entity_key, info="dfire-entity-derivation")
2. file_key = HKDF(salt=file_salt, ikm=intermediate, info="dfire-file-encryption")

The file_salt is a random 16-byte value generated for each attachment and stored alongside the encrypted file. This ensures every file has a unique key even within the same case.

File Encryption (Attachments & Photos)

All file attachments and photos are encrypted using AES-256-GCM:

Property Value
Algorithm AES-256-GCM (authenticated encryption)
Chunk size 8MB plaintext per chunk
Nonce 12 bytes, derived from chunk index
Auth tag 16 bytes per chunk
Streaming Yes, at any file size

The chunked design enables:

  • Streaming encryption/decryption without buffering entire files in memory
  • Compatibility with S3 multipart uploads
  • Resumable uploads (same key derivation produces same key)
  • Parallel chunk processing

Data Deletion: Deleting a tenant, case, or evidence item permanently destroys the associated encryption key. All attachments encrypted with that key become unreadable with no recovery mechanism. This is by design for secure data disposal.

Credential Encryption

Stored credentials (API keys, webhook secrets and endpoint URLs, SSO client secrets) are encrypted using a separate key:

Property Value
Algorithm Fernet (AES-128-CBC + HMAC-SHA256)
Key source CREDENTIAL_ENCRYPTION_KEY environment variable
Field types EncryptedCharField, EncryptedJSONField

Encrypted database fields include:

  • OIDC client secrets
  • Slack bot tokens and app-level tokens
  • Webhook signing keys
  • License server credentials
  • S3/SMB storage credentials
  • Dashboard Sync tokens that a receiving installation uses to pull cases

A sending installation stores only a SHA-256 hash of its Dashboard Sync token. It shows the token once, when it issues it. See Dashboard Sync.

Key Separation: The CREDENTIAL_ENCRYPTION_KEY is separate from the tenant's file encryption keys. This means database credential encryption is independent of file storage encryption.

Key Requirements: The SECRET_KEY must be at least 32 characters long and must differ from the CREDENTIAL_ENCRYPTION_KEY. DFIRe validates both requirements on startup and will refuse to start if they are not met.

Role-Based Access Control (RBAC)

DFIRe implements a two-tier RBAC model: global permissions control what actions a user can perform, while case-scoped access controls which cases they can access.

Permission Architecture

Can user X perform operation Y on case Z?
│
├─ Is user a superuser?
│  └─ YES → Allow, unless write protection refuses (last step)
│
├─ Does user have the atomic permission for Y?
│  └─ NO → Deny (403)
│
├─ May user read case Z?
│  ├─ Archived case without core.view_archived_cases → No
│  ├─ core.view_all_cases or core.edit_all_cases → Yes
│  ├─ Lead investigator, investigator or viewer → Yes
│  ├─ Unassigned case (no lead) and core.change_case → Yes
│  └─ Otherwise → No: case Z answers as missing (404)
│
├─ Is Y a read?
│  └─ YES → Allow
│
├─ May user write case Z?
│  ├─ core.edit_all_cases, lead investigator or investigator → Yes
│  ├─ Unassigned case and core.change_case → Only the claim:
│  │  acknowledging the case or making themselves its lead.
│  │  Nothing else can change until somebody claims it.
│  └─ Otherwise (a viewer, or global read alone) → Deny (403)
│
└─ Is case Z closed or archived?
   ├─ YES → Deny (403), unless Y is an exception of write protection
   └─ NO → Allow

DFIRe answers this question in one place, and every interface asks it there. That covers the web interface and its live connections, the REST API, the MCP server, Slack, case import and export, and the assistants. An API key acts as its owner. An interface can offer less than another, and two rules differ by interface:

Background jobs such as automation rules, the Slack and Jira sync and retention run without a signed-in user. Write protection still applies to them, apart from the exceptions listed under Write Protection. Only a superuser reaches the Django admin.

User Types

Type Description
Superuser Passes every permission and case team check, and has exclusive access to system-level settings (see Settings Access below). Write protection still applies. Should be limited to system administrators.
Regular User Permissions come from assigned roles. A user can hold several roles and receives the combined permissions of all of them. Case access is determined by team assignment.

Case Roles

Role Capabilities
Lead Investigator Owns the case, and the person the case is listed under and filtered by. Writes like an investigator, and can also do the lead-only operations.
Investigator Write access to the content of the case, within the permissions of the role. Changing the team needs core.manage_team or core.edit_all_cases, and deleting the case needs core.delete_case.
Viewer Read-only access to case and all its contents

Global Override Permissions

Permission Effect
core.view_all_cases View any case regardless of assignment. It also opens the whole audit log, including other people's sign-ins, API key use, role changes and configuration history
core.edit_all_cases View and edit any case regardless of assignment. In the audit log it shows the entries of those cases, not the rest of the log
core.view_archived_cases View or change archived cases, reopening included (required in addition to other access)
core.view_remotecase With core.view_case, view the cases that every sending installation shares through Dashboard Sync. Adds no local cases

Lead-only operations

Three operations are limited to particular people on the case. Each also needs its permission and ordinary access to the case.

Operation Who may do it
Change the case's playbook The lead investigator, or a role with core.edit_all_cases
Download the whole chat transcript as a file The lead investigator, a superuser, or a role with core.view_all_cases
Redact a chat message Its author, the lead investigator, or a superuser

Roles and Delegated Administration

Roles grant permissions. A user can hold multiple roles and receives the combined permissions of all of them. Only a superuser creates, renames, changes and deletes roles, in the Role Editor under Settings → Access Roles. DFIRe never checks a role's name, only the atomic permissions it grants. See the Role Editor for how to work with roles.

Some administration stays with superusers, whatever permissions a role holds. This covers role editing, automation rules, webhooks and email notifiers, another account's Slack user ID and API keys, and the Django admin. A webhook's deliveries carry content from every case, regardless of the author's own case assignments. A Slack mapping decides which DFIRe account a Slack command acts as. See Users and roles → Superusers.

A superuser can delegate user administration through a role, with one hard limit. A user administrator who is not a superuser cannot assign a role that holds an escalation-sensitive permission they do not hold themselves. The server enforces this on every role assignment. The escalation-sensitive permissions are:

  • core.view_all_cases, core.edit_all_cases and core.view_archived_cases, global and archived case access
  • auth.add_user and auth.change_user, user administration
  • core.change_userapikey, which re-enables the holder's own disabled API key
  • core.view_remotecase, which covers every case of every installation that sends Dashboard data to this one

A role that holds none of them can go to any account the administrator may change.

Holders of auth.change_user can set the password of any password account that is not a superuser, and reset its multi-factor authentication. User-account administration therefore lets its holder sign in as any such account, with that account's roles and case assignments. The limit on escalation-sensitive permissions does not restrict this. Give user-account administration only to people you would trust with every non-superuser account.

Automation rules can also change case teams, and only a superuser manages them. A rule can add or remove case-team members, or invite Slack users to the case channel and remove them from it.

While Auto-add investigators is on (the default, under Settings → Slack Integration), DFIRe adds a linked user who joins an open case's channel to its team as an investigator. This applies whoever invited them, including an automation rule, and whatever their role. Their role still decides what they can do on the case. Someone already on the team keeps their place. A team member other than the lead who leaves the channel leaves the team.

Settings Access

Each section of System Settings is gated individually, and the Settings page opens for any user who can see at least one section. There is no separate administrator permission for Settings itself.

Superuser-Only Settings

  • Global Settings (tenant configuration, including configuration import/export)
  • Storage
  • Single Sign-On
  • License & Updates
  • Retention Policy
  • Email Delivery
  • Playbook Policy
  • Backup & Recovery
  • Scheduled Jobs
  • Dependencies
  • Support
  • Case codenames
  • Access Roles
  • Webhooks & Email
  • Response Actions
  • Automation
  • All integration settings: Slack, Jira, Log Management, IOC Enrichment, IOC Sharing (TAXII), AI / LLM, MCP Server, Dashboard Sync, and Integration IDs

Delegatable by Permission

Reachable by any role that holds the section's own permission, with no other administrative access required. A role can be limited to a single one of these, for example a role that can edit only playbooks:

  • User Accounts
  • Reporting (report section templates)
  • Compliance Timers
  • Triage Flags
  • Projects
  • Playbooks (view permission opens the designer read-only; editing requires edit permission and any ownership restrictions to be satisfied)
  • Runbooks
  • Assets and evidence (item types)
  • Evidence Workflow and Asset Workflow
  • Incident Lifecycle
  • Incident Categories
  • Outcome Verdicts

Playbooks, item types, triage flags, workflow steps, incident phases, incident categories, and outcome verdicts are readable by every authenticated user. The permissions above gate changes, not visibility. Legal Entities are managed from the Entities directory rather than Settings. Reading the directory requires core.view_legalentity, and each change requires its own permission. Reading entities through case data, such as an item's owner or a custody party, also requires core.view_legalentity. Deleting an entity requires core.delete_legalentity and always works, also on closed and archived cases: see Configuring entities.

File Permissions

Evidence files are gated by the same two tiers as everything else: the role permission decides what a user may do with files at all, and case membership decides which files. Both apply to Encrypted Storage and Direct Storage, on every route that moves the bytes as well as on the file list.

Permission Covers
core.view_attachment Listing files, downloading them, and reading storage usage
core.add_attachment Starting an upload of a file, including photos
core.change_attachment Editing file details, and starting or cancelling a checksum re-verification
core.delete_attachment Deleting a file

Syncing a Direct Storage location requires both core.add_attachment and core.delete_attachment, because a sync adds files it finds in the bucket or share and removes records whose file is gone.

DFIRe checks access when an upload starts, and that access lasts until the upload completes. The person who started it needs no permission to continue it, read its progress or cancel it. This holds after they leave the team and after the case closes. An upload still ends at its deadline. After it completes, the file follows the permissions above. See Storage: What people see in a case.

Write Protection

Closed and archived cases are write-protected. DFIRe checks write protection on every write, on every interface, after the permission and case checks. No permission overrides it, and it applies to superusers as well.

  • Closed: Case is read-only apart from the Investigation Report and the outcome verdict. Team members with edit access can reopen it.
  • Archived: Case is fully read-only. Viewing it, and reopening it, require the view_archived_cases permission. Reopening restores normal access.

Changing the status is how a case leaves write protection. A status change passes when it is the only change in the request and moves the case to another status. A field sent with its current value is no change. DFIRe refuses a request that names the current status or that also changes another field.

These actions stay available on a protected case:

  • Changing the outcome verdict of a closed case, with no other change in the same edit. An archived case stays locked.
  • Moving your own chat read position
  • Continuing an upload that started while the case was open, and DFIRe finishing it
  • Cancelling your own upload
  • Cancelling a file hash check. A running check that nobody cancels finishes.
  • Deleting a legal entity. See Configuring Entities.
  • As a superuser, correcting a record of a protected case in the Django admin
  • As a superuser, moving the records of a deleted storage target to another target. A record on a protected case keeps its size and hash.

Two changes come from outside a request and also pass:

Additional Security Controls

CSRF Protection

Cross-Site Request Forgery protection uses the double-submit cookie pattern:

  • CSRF token set in cookie (csrftoken)
  • Token must be included in X-CSRFToken header for mutations
  • Token validated on all POST, PUT, PATCH, DELETE requests

Rate Limiting

Endpoint Limit
Login 5 requests/minute
API (authenticated) 1500 requests/minute
Dashboard Sync feed 120 requests/minute per sync token
Requests with an API key or token in progress at the same time 16, then 429 with Retry-After (details)

Secure Cookies

Flag Value
HttpOnly Yes (session cookie not accessible to JavaScript)
SameSite Lax (prevents CSRF from external sites)
Secure Yes in production (HTTPS only)

Content Security Policy

DFIRe does not send a Content Security Policy for its pages, because a correct policy depends on your installation. Attachment downloads carry Content-Security-Policy: sandbox. To set a policy on your own reverse proxy, see Content Security Policy.

WebSocket Authentication

Real-time WebSocket connections:

  • Authenticate using the same session cookie as HTTP requests
  • Check on every ping that the session is valid, the account is active and the role still allows the connection
  • Check again at once after a role, team or archive change. A connection that loses access closes. An open case or evidence item page then reads its record through the API and shows the refusal
  • Need core.view_case on a case connection and core.view_item on an evidence item connection, and access to the case on both
  • Carry only the record's ID and what changed for case, timeline, file and evidence changes. The page then reads the record through the API, which applies the user's permissions
  • Send report editing and report status messages only to a user who can read the report, and accept an editing lock only from a user who can edit it
  • Send case chat messages and chat presence only while the user's role holds core.view_casechatmessage
  • Close after three minutes without a ping, so a client cannot skip these checks
  • Scoped to specific resources (case, item, dashboard)
  • Anonymous connections rejected

Audit Logging

All security-sensitive operations are logged to an append-only audit trail:

  • Append-only: DFIRe never modifies an audit record after writing it, and never deletes a single record. Old records leave only through retention, which a superuser controls and which records itself. The protection is enforced by the application and does not extend to direct database access
  • No secrets: A record names a secret field that changed and never holds its value. See Secret values
  • Fail-closed: Operations fail if audit logging fails
  • Comprehensive: Logs user, action, object, changes, timestamp, IP
  • Searchable: Full-text search across audit records

Logged operations include:

  • Authentication events (login, logout, failed attempts)
  • Refused requests in the web interface, the REST API, the MCP server, Slack and the Django admin. See Audit log → Refused requests
  • Case and evidence CRUD operations
  • Team assignment changes
  • Configuration changes
  • Attachment uploads and downloads

Preconfigured Roles

DFIRe comes with four preconfigured roles. These use atomic permissions (not role name checks) and can be customized, or replaced with your own roles, in the Role Editor:

DFIRe Admin

Administration of user accounts and subject-matter configuration:

  • core.view_all_cases, core.edit_all_cases - global case access
  • core.view_archived_cases, core.view_statistics
  • auth.add_user, auth.change_user - user management
  • auth.view_group - reads the role list, to assign roles to users
  • core.change_userapikey - re-enables the holder's own disabled API key
  • All case, item, attachment, note permissions
  • IOC management: manage_indicators, export_indicators, import_indicators. TAXII stays with superusers
  • Compliance timer, playbook, item type, workflow, incident phase, report template, project, runbook, and legal entity management
  • No role editing, automation rules, webhooks, email notifiers or response actions. These stay with superusers

Team Lead

Oversight role with full case visibility but no user or system administration:

  • core.view_all_cases, core.edit_all_cases - global case access
  • core.view_archived_cases, core.view_statistics
  • core.manage_team - can manage case assignments
  • All case, item, attachment, note and timeline permissions
  • IOC management: manage_indicators, export_indicators, import_indicators
  • Project and legal entity management. Runbooks and report templates are read-only
  • The whole audit log, through core.view_all_cases
  • No user or role administration. System Settings shows only the sections this role's own permissions grant, which is Projects

Standard user

Regular investigator working on assigned cases:

  • core.add_case, core.change_case. No core.delete_case
  • core.manage_team - can manage the team on cases where they are lead or investigator
  • All item, attachment and note permissions, and every timeline permission except core.delete_timelineevent
  • Investigation reports: create and edit, which covers submitting sections for QA, approving them and returning them to draft. No core.delete_investigationreport
  • Indicators: create, edit and delete, and manage_indicators, export_indicators and import_indicators
  • core.view_statistics: Analytics counts the cases this role can reach. One figure, users active in the period, covers the whole installation
  • Can create and edit legal entities
  • No global case access: assigned cases, plus cases with no lead, which they can claim

View Only

Read-only access for auditors or external reviewers:

  • core.view_case, core.view_item, core.view_attachment
  • View-only permissions for all case content
  • Cannot create, modify, or delete anything
  • Access limited to assigned cases only