bresrch Documentation
bresrch (Breach Research) is an identity investigation platform that helps security teams query, visualize, and analyze identity data across multiple providers. Get the data you need to investigate breaches, audit access, and respond to security incidents.
Query identity relationships across providers with sub-50ms response times. Traverse user-group-app relationships in a single query.
Query data as it existed at any point in time. Essential for breach investigation and compliance audits.
Interactive Sankey diagrams, chord diagrams, and link graphs help you understand access patterns and identify anomalies.
Query Syntax
bresrch uses a graph query language inspired by SQL with arrow notation for traversing relationships. The query builder provides a visual interface, but you can also write queries directly.
Basic Structure
SELECT [fields or traversal] FROM entity_type:id WHERE conditions
Simple Field Selection
Returns all users with all fields.
Returns a specific user by their external ID.
Filtering with WHERE
Graph Traversals
The arrow syntax allows you to traverse relationships between entities. This is the core power of bresrch - understanding who has access to what, and through which paths.
Arrow Notation
| Syntax | Direction | Description |
|---|---|---|
-> |
Outgoing | Follow relationship from source to target |
<- |
Incoming | Follow relationship from target back to source |
Traversal Patterns
User Traversals
| Pattern | Description | Hops |
|---|---|---|
->member_of->groups |
Groups a user belongs to | 1 |
->assigned_to->apps |
Apps directly assigned to user | 1 |
->member_of->groups->has_access->apps |
Apps accessible via group membership | 2 |
->member_of->groups->governed_by->policies |
Policies governing user's groups | 2 |
Example: Find All Apps a User Can Access
Group Traversals
| Pattern | Description |
|---|---|
<-member_of<-users |
Users who are members of this group |
->has_access->apps |
Apps this group has access to |
->governed_by->policies |
Policies that apply to this group |
App Traversals
| Pattern | Description |
|---|---|
<-assigned_to<-users |
Users directly assigned to this app |
<-has_access<-groups |
Groups with access to this app |
<-has_access<-groups<-member_of<-users |
All users with access through groups |
Operators
Comparison Operators
| Operator | Description | Example |
|---|---|---|
= |
Equals | status = 'ACTIVE' |
!= |
Not equals | status != 'SUSPENDED' |
> |
Greater than | created > '2024-01-01' |
< |
Less than | last_login < '2024-06-01' |
>= |
Greater than or equal | priority >= 1 |
<= |
Less than or equal | priority <= 10 |
String Operators
| Operator | Description | Example |
|---|---|---|
LIKE |
Pattern matching (% wildcard) | email LIKE '%@corp.com' |
NOT LIKE |
Negative pattern matching | name NOT LIKE '%test%' |
IS NULL |
Field is empty | last_login IS NULL |
IS NOT NULL |
Field has value | mfa_enabled IS NOT NULL |
Logical Operators
| Operator | Description |
|---|---|
AND |
Both conditions must be true |
OR |
Either condition must be true |
Entity Types
bresrch normalizes identity data from multiple providers into a common schema. This enables cross-provider queries and consistent field access.
Identity accounts from Okta, Google Workspace, Azure AD. Fields: email, status, first_name, last_name, display_name, created, last_login
Security groups, distribution lists, teams. Fields: name, description, type, member_count, created
SAML/OIDC applications, OAuth clients. Fields: name, label, status, sign_on_mode, created
Authentication, authorization, and sign-on policies. Fields: name, status, type, created
Admin roles and permissions. Fields: name, description, role_type, is_admin, permissions
ChromeOS, mobile, and managed devices. Fields: name, device_type, model, os, status, compliance_state
Okta Entities
Available Entity Types
| Entity | Key Fields | Common Queries |
|---|---|---|
| users | email, status, first_name, last_name, login, created, last_login | Find inactive users, MFA status |
| groups | name, description, type (OKTA_GROUP, APP_GROUP, BUILT_IN) | Group membership analysis |
| apps | label, name, status, sign_on_mode (SAML, OIDC, etc.) | App access audit |
| policies | name, status, type (SIGN_ON, MFA, PASSWORD) | Policy coverage analysis |
| policy_rules | name, status, type, priority | Rule precedence review |
Okta Status Values
| Status | Description |
|---|---|
ACTIVE | User can log in and access applications |
SUSPENDED | User temporarily blocked from access |
STAGED | User created but not yet activated |
DEPROVISIONED | User account deactivated |
LOCKED_OUT | User locked due to failed login attempts |
RECOVERY | User in password recovery flow |
Okta Query Examples
Find users who haven't logged in for 90 days
Find all apps accessible to a specific group
Find users with access to AWS Console
Google Workspace Entities
Available Entity Types
| Entity | Key Fields | Common Queries |
|---|---|---|
| users | email, status, first_name, last_name, is_admin, mfa_enabled | Admin audit, MFA compliance |
| user_aliases | alias, primary_email | Find shadow accounts |
| groups | name, email, description, member_count | Distribution list audit |
| roles | name, role_type, is_system, permissions | Admin role analysis |
| role_assignments | user_id, role_id, scope | Who has admin access |
| chromeos_devices | device_id, serial, model, os_version, status | Device compliance |
| mobile_devices | device_id, model, type, os, compliance_state | BYOD audit |
| domains | domain_name, is_primary, is_verified | Domain verification |
| org_units | name, path, parent_id | OU structure analysis |
Google Workspace Query Examples
Find all admin users
Find users without MFA enabled
Find non-compliant mobile devices
Find group membership for a user
Temporal Versioning
bresrch automatically versions all data using a temporal database. Every sync creates a new version, enabling powerful historical queries essential for breach investigation and compliance.
How It Works
Every entity has automatic versioning with these fields:
| Field | Description |
|---|---|
version |
Auto-incrementing version number |
valid_from |
Timestamp when this version became active |
valid_to |
Timestamp when this version was superseded (NULL if current) |
Entity Version Timeline
Time Travel Queries
Query entity state and relationships as they existed at any point in time using the GraphQL API.
Entity History
query {
entityHistory(input: {
entityType: "users",
entityId: "00u24m2v4jOPwc106697"
}) {
versions {
version
validFrom
validTo
data
changes {
field
oldValue
newValue
}
}
}
}
Relationships At Point In Time
query {
entityRelationshipsAtTime(input: {
entityType: "users",
entityId: "00u24m2v4jOPwc106697",
at: "2024-03-15T00:00:00Z"
}) {
relationships {
relationshipType
targetType
targetName
validFrom
validTo
}
}
}
Common Time Travel Use Cases
Reconstruct what access a compromised account had during the breach window.
Prove access controls at audit date, even if they've changed since.
Find what changed between two dates for forensic analysis.
Investigation: Excessive Access
Check the entity history to see when the user was added to the group that grants AWS Console access.
Investigation: Breach Response
Use time travel queries to see what access existed during the suspected compromise period (e.g., last 30 days).
Investigation: Compliance Audit
Use temporal queries to show access state at the audit date, even if it has changed since.