Tenants, users and settings
tenants
Mandators. Every host, plan, finding and report belongs to one. Holds the timezone, the products switched on (features, null = all), the abuse contact, report branding and the intervals of the automatic scans.
12 columns
| Column | Type | Null | Default | References |
|---|---|---|---|---|
id PK | bigint(20) unsigned | |||
name | varchar(255) | |||
slug unique | varchar(255) | |||
timezone | varchar(255) | UTC | ||
abuse_contact | longtext | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
features | longtext | yes | ||
report_theme | longtext | yes | ||
report_logo | longtext | yes | ||
discovery_interval_minutes | int(10) unsigned | 1440 | ||
follow_up_interval_minutes | int(10) unsigned | 1440 |
Indexes: slug (unique)
users
Accounts: local password and/or OIDC subject, TOTP secret and recovery codes (encrypted), the global flags super admin (is_admin) and operator, preferred language and current tenant.
16 columns
| Column | Type | Null | Default | References |
|---|---|---|---|---|
id PK | bigint(20) unsigned | |||
name | varchar(255) | |||
email unique | varchar(255) | |||
locale | varchar(5) | yes | ||
password | varchar(255) | yes | ||
totp_secret | text | yes | ||
totp_recovery_codes | text | yes | ||
totp_confirmed_at | timestamp | yes | ||
is_admin | tinyint(1) | 0 | ||
is_operator | tinyint(1) | 0 | ||
oidc_sub unique | varchar(255) | yes | ||
current_tenant_id | bigint(20) unsigned | yes | tenants on delete set null | |
last_login_at | timestamp | yes | ||
remember_token | varchar(100) | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: current_tenant_id · email (unique) · oidc_sub (unique)
tenant_user
Membership with the role in that tenant: viewer, editor or admin.
3 columns
| Column | Type | Null | Default | References |
|---|---|---|---|---|
tenant_id PK | bigint(20) unsigned | tenants on delete cascade | ||
user_id PK | bigint(20) unsigned | users on delete cascade | ||
role | varchar(16) | viewer |
Indexes: user_id
settings
System settings saved by super admins (JSON values): minimum intervals, plan defaults, abuse contact, mail server, address lookup, TOTP requirement. They win over the .env defaults.
4 columns
| Column | Type | Null | Default | References |
|---|---|---|---|---|
key PK | varchar(100) | |||
value | longtext | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
sessions
Laravel sessions (IP address, browser). Expired rows are deleted daily by privacy:prune.
6 columns
| Column | Type | Null | Default | References |
|---|---|---|---|---|
id PK | varchar(255) | |||
user_id | bigint(20) unsigned | yes | ||
ip_address | varchar(45) | yes | ||
user_agent | text | yes | ||
payload | longtext | |||
last_activity | int(11) |
Indexes: last_activity · user_id
password_reset_tokens
Hashed password reset links; expired ones are deleted daily.
3 columns
| Column | Type | Null | Default | References |
|---|---|---|---|---|
email PK | varchar(255) | |||
token | varchar(255) | |||
created_at | timestamp | yes |