---
title: "⚙️ Administration, Maintenance & Database"
description: "User management, RBAC role profiles, SSL/TLS certificates, automated ss_dms backups, and database maintenance in Ring2All DMS"
---
> The **Administration & Maintenance** suite in Ring2All DMS provides enterprise-grade control over platform operators, security credentials, automated backups, and PostgreSQL database health.
---
## 👥 User Management & Role Profiles (RBAC)
Ring2All DMS implements strict Role-Based Access Control (RBAC) to ensure that operators access only the modules and tools required for their responsibilities.
### 1. User Accounts
* **Immutable Numerical Identifiers**: Operators are identified by permanent primary keys (`id: number`), ensuring referential integrity across audit logs even if usernames or display names change.
* **Dual Authentication**: Support for authentication via either `username` or corporate `email`.
* **Enterprise Cryptography**: Password hashing powered by **Argon2id**, the modern standard for cryptographic credential protection against GPU-accelerated dictionary attacks.


### 2. Role Profiles
Administrators configure modular permission matrices covering all DMS functional domains:
* **Hardware Catalog**: Permissions for Viewing, Adding, Editing, or Deleting device models and vendors.
* **Template Studio**: Separate permissions for viewing templates versus editing live Jinja2 AST definitions.
* **Third-Party Platforms**: Governs the creation of Client API keys and triggering of remote PBX webhooks.
* **Security & Firewall**: Restricts access to packet filter settings, IP bans, and Geo-Firewall policies.
* **System Administration**: Grants access to user accounts, backup archives, and database vacuuming.

### 3. MCP Tool Roles (AI Access Control)
Governs which Model Context Protocol (MCP) tools can be executed by the AI Assistant on behalf of an operator:
* **Safe / Read-Only**: Searching phone models, checking hardware specs, querying catalog statistics.
* **Moderate / Operational**: Synthesizing draft templates, simulating phone configurations.
* **High Risk / Administrative**: Modifying live templates, triggering platform-wide PBX dispatches, or altering firewall rules.

### 4. Audit Log Profiles
* **Audit Levels**: `minimal` (auth events only), `standard` (administrative writes), or `verbose` (full read/write tracking).
* **Retention Policy**: Automatic pruning of logs older than a configurable number of days (default: 90 days).
* **Security Alerts**: Real-time email dispatch upon critical administrative actions (e.g., role modification, user deletion).


---
## 🔐 SSL/TLS Certificates & Domain Management
Ring2All DMS manages secure HTTPS endpoints for both web administration and encrypted phone provisioning:
### Supported Certificate Types:
* **Let's Encrypt**: Fully automated certificate generation with 90-day validity and automated background renewal.
* **Self-Signed Enterprise CA**: 3650-day internal certificate for isolated laboratory or test environments.
* **Custom Enterprise Certificates**: Upload third-party PEM certificates, intermediate bundles, and private keys.


### Multi-Domain SAN Support:
A single certificate can secure all operational hostnames simultaneously:
```
DNS:dms.ring2all.com
DNS:devices.ring2all.com
DNS:autoprovision.ring2all.com
IP Address:198.51.100.28
```
---
## 💾 Maintenance, Backups & `ss_dms` Database Health
Ring2All DMS includes an automated **Backup & Restore** engine designed to ensure zero data loss across the hardware catalog.
```mermaid
flowchart TD
subgraph BackupJob["Scheduled Backup Job (Cron: 0 2 * * *)"]
DB_Dump["1. PostgreSQL Snapshot
(pg_dump ss_dms -> sql)"]
Tpl_Export["2. Template AST Definitions
(templates.json)"]
FW_Export["3. Firmware Metadata
(firmwares.json)"]
Sec_Export["4. Security Policies & Bans
(security.json)"]
Cert_Export["5. TLS Certificates & Keys
(certificates.json)"]
Cfg_Export["6. System Config & Branding
(system_config.json)"]
end
DB_Dump --> Archive["ZIP Archive Manifest
(dms-backup-job-nightly.zip)"]
Tpl_Export --> Archive
FW_Export --> Archive
Sec_Export --> Archive
Cert_Export --> Archive
Cfg_Export --> Archive
Archive --> Storage["Storage Target: Local Disk / Remote SFTP / AWS S3"]
```
### 1. Granular Scope Selection
When creating a backup job, administrators can toggle specific components:
* **Master Database (`ss_dms`)**: Complete PostgreSQL schema and table data.
* **Device Templates & Macros**: XML templates, AST definitions, and parameter mappings.
* **Firmware Registry**: Binary download links and SHA-256 integrity checksums.
* **Perimeter Security**: Firewall rules, Geo-Firewall country policies, and IP whitelists.
* **SSL/TLS Certificates**: Server certificates, private keys, and SAN records.
* **Platform Branding & Network**: Corporate logos, color themes, and server hostnames.
### 2. Archive Inspection & One-Click Restore
Uploaded backup archives are automatically analyzed prior to restoration:
* Verifies archive format, system metadata (`ring2all-dms`), and database name (`ss_dms`).
* Displays record counts (vendors, models, templates, firmwares, security rules) before any overwrite occurs.
* Operators selectively restore individual subsystems (e.g., restore only templates without affecting live user accounts).
### 3. Database Maintenance & Cleanup
* **PostgreSQL Vacuum & Analyze**: Reclaims dead tuple bloat and recalculates query planner statistics across `ss_dms`.
* **Security Event Pruning**: Purges historical perimeter probe logs older than the configured retention threshold.
* **Cache Cleanup**: Cleans temporary firmware upload chunks and staging archives.
* **Top Storage Tables Breakdown**: Visual table displaying real-time disk consumption per database table.

---
## 🎯 User Roles & Key Capabilities
| User Role | Operations in Administration & Maintenance |
| :--- | :--- |
| **System Administrator** | Manages user accounts, assigns RBAC role profiles, generates SSL certificates, and configures backup schedules. |
| **Database Administrator (DBA)** | Executes database vacuuming, reviews PostgreSQL disk usage metrics, and validates database restore procedures. |
| **Security Officer** | Reviews operator audit trails, enforces password rotation, and sets MCP Tool permission boundaries for AI assistants. |