Monitoring stores the keys to your network - SNMP communities, SSH and IPMI passwords, API tokens. It protects them in layers.
Stored secrets are encrypted
These are encrypted in the database (AES with an integrity check):
- SNMP communities and SNMPv3 keys, including the communities Network Scan remembers per subnet;
- SSH, IPMI, Redfish and airOS passwords, HTTP API authentication values;
- LDAP, single sign-on, AI provider, SDN, wireless controller, virtualization and cloud credentials;
- WireGuard private keys and IPsec pre-shared keys, two-factor seeds, notification channel tokens and secrets, off-site backup credentials;
- device configuration backups (they contain the device’s own passwords).
The encryption key is not in the database. It is kept in /opt/netmon/keys/secret.key (created automatically) or the NOCWARD_SECRET_KEY environment variable. A database dump alone therefore reveals no secrets.
Warning
Back up secret.key separately from the database, and never inside /opt/netmon/backups. A restore on a new server needs both the database backup and the key. Without the key, devices fail authentication and the log says it cannot decrypt a stored secret; re-entering the credentials fixes each one.
Keys and tokens are hashed
API keys, wallboard links, collector install tokens and the phones’ refresh tokens are stored only as hashes plus a short visible prefix. A key is shown once, when created. A lost key cannot be recovered - revoke it and create a new one.
Each API key has a type and is accepted only where that type belongs:
| Key type | Can |
|---|---|
| Collector | Fetch its work (including the credentials of the devices it polls) and send results |
| Host agent | Send only its own host’s metrics, script results and DHCP scopes |
| Prometheus (read-only) | Read one organization’s metrics export |
| ISP Billing (read-only) | Read device and ONT state |
Use a Host agent key on monitored servers, never a collector key: a collector key copied from a server’s configuration file would expose every device’s credentials.
Roles
| Role | Can |
|---|---|
| Admin | Everything, including users, roles, API keys, license, backups and updates |
| Operator | Acknowledge alerts, maintenance windows, troubleshooting tools and scans, tickets; read everything else |
| Viewer | See everything, change nothing |
| Custom | What you tick, optionally only for chosen device groups |
Every permission is enforced by the API, not just hidden in the interface. A role limited to device groups gets “not found” for any other device. See Users, roles and sign-in.
Sign-in protection
- The first account needs the one-time setup code shown on the server console, so nobody else on the network can claim a new server first.
- Passwords are stored as bcrypt hashes. Repeated wrong passwords or two-factor codes lock the account and the address for a while.
- Two-factor authentication by authenticator app, by e-mailed code, or both; one-time backup codes.
- LDAP/Active Directory with certificate verification; admin rights only through a named directory group. Single sign-on with OpenID Connect or SAML 2.0 accepts only sign-ins this server started, and each SAML response once.
- A session lasts 12 hours, or 1 day, 1 week or 1 month when the user chooses Stay signed in for. Changing the password ends every other session, including signed-in phones; a disabled account’s sessions end at once.
- Behind a reverse proxy, client addresses are taken only from proxies listed in
FORWARDED_ALLOW_IPS, so nobody can fake their address past the sign-in limit or in the audit log. - Every sign-in, device change, key change and user change is recorded in the audit log.
Outgoing requests
Webhooks, chat channels, the HTTP API device probe and single sign-on requests resolve the address once, check it and connect only to the checked address. Loopback, link-local and cloud metadata addresses are refused.
The license cannot be faked
License keys are signed by Nocward and verified on your server against the public key built into the product - there is no setting to replace it. Check-in talks only to the Nocward Vendor Console and accepts only answers it signed for this check-in. Setting the server clock back does not extend a license or trial. See License and trial.
The installed server
A server installed from the installation ISO also has: SSH without root login and with three tries per connection, fail2ban, a firewall that opens only SSH, the web interface and the collector’s listeners, and automatic security updates. Every server generates its own secrets, encryption key, web certificate and SSH host keys on the first boot.
The running API never holds the database superuser password: schema migrations run in a separate one-shot service, and backups and maintenance use a restricted role.
Network exposure
The database listens on the server itself only (and, on a high availability pair, to the standby for replication). The web interface sends noindex headers, so it is never listed by search engines. The ports devices send to - traps (UDP 162), syslog (514) and flows - accept unauthenticated data by nature: allow them in your firewall from your devices only.