AsterionDocumentation v0.4.1

Tenants, users and settings

Tables of the area Tenants, users and settings and their relations
Tenants, users and settings: tables and foreign keys. Dashed lines lead to tables of other areas.

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
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
namevarchar(255)
slug uniquevarchar(255)
timezonevarchar(255)UTC
abuse_contactlongtextyes
created_attimestampyes
updated_attimestampyes
featureslongtextyes
report_themelongtextyes
report_logolongtextyes
discovery_interval_minutesint(10) unsigned1440
follow_up_interval_minutesint(10) unsigned1440

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
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
namevarchar(255)
email uniquevarchar(255)
localevarchar(5)yes
passwordvarchar(255)yes
totp_secrettextyes
totp_recovery_codestextyes
totp_confirmed_attimestampyes
is_admintinyint(1)0
is_operatortinyint(1)0
oidc_sub uniquevarchar(255)yes
current_tenant_idbigint(20) unsignedyestenants on delete set null
last_login_attimestampyes
remember_tokenvarchar(100)yes
created_attimestampyes
updated_attimestampyes

Indexes: current_tenant_id · email (unique) · oidc_sub (unique)

tenant_user

Membership with the role in that tenant: viewer, editor or admin.

3 columns
ColumnTypeNullDefaultReferences
tenant_id PKbigint(20) unsignedtenants on delete cascade
user_id PKbigint(20) unsignedusers on delete cascade
rolevarchar(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
ColumnTypeNullDefaultReferences
key PKvarchar(100)
valuelongtextyes
created_attimestampyes
updated_attimestampyes

sessions

Laravel sessions (IP address, browser). Expired rows are deleted daily by privacy:prune.

6 columns
ColumnTypeNullDefaultReferences
id PKvarchar(255)
user_idbigint(20) unsignedyes
ip_addressvarchar(45)yes
user_agenttextyes
payloadlongtext
last_activityint(11)

Indexes: last_activity · user_id

password_reset_tokens

Hashed password reset links; expired ones are deleted daily.

3 columns
ColumnTypeNullDefaultReferences
email PKvarchar(255)
tokenvarchar(255)
created_attimestampyes