Insights:How to Secure Your Website and Manage Account Permissions: An Actionable Setup Checklist
Step 1: Eliminate Default and Weak Passwords
- Change all default passwords for the admin panel, database, servers, and email.
- Passwords must be at least 12 characters and include uppercase letters, lowercase letters, and symbols.
- Avoid hard-coding passwords in code or configuration files.
- Disable long-lived credentials such as “Remember Me.”
Criterion: If a password can be guessed from publicly available information, other measures are pointless.
Step 2: Reduce Exposure
- Change the admin path to an unpredictable string.
- Close unnecessary ports and services.
- Restrict admin API access by source IP (where feasible).
- Hide debug mode and detailed error messages.
Step 3: Define Roles and Permissions
| Role | Capabilities |
|---|---|
| Administrator | Full access, including permission changes |
| Editor | Create, edit, and delete content; cannot modify permissions |
| Reviewer | Review content; cannot publish |
| Read-only | View data only |
- Assign each account only the roles it needs.
- Deactivate accounts that have not logged in for an extended period.
- Maintain logs for all permission changes.
Step 4: Session and Transmission Security
- Enforce HTTPS site-wide; reject form submissions over HTTP.
- Set cookies with
HttpOnly,Secure, andSameSiteflags. - Reset the session ID after login.
- Configure an idle timeout (e.g., 30 minutes).
Step 5: Enable Audit Logging
- Log successful and failed logins, password changes, publishing, deletion, and permission modifications.
- Each log entry records timestamp, account, IP address, and affected object.
- Logs are append-only; regular accounts cannot delete them.
- Retain logs for at least 90 days.
Step 6: Isolated Backup
- Backups must reside on a different machine and in a separate directory from the site.
- Backup accounts must be separated from site management accounts.
- Conduct a recovery drill weekly (verify at least one file).
- Maintain an offline copy of critical data.
Step 7: Regular Self-Inspection
- Quarterly: review account inventory, permission lists, and sample logs.
- Semi-annually: cross-check dependency versions against published vulnerability advisories.
- Before every release: verify that no unauthorized APIs were introduced.
Common Mistakes
- Changing only the front-end password while the back end still uses defaults.
- Making everyone an administrator.
- Storing logs in the database where injection attacks can delete them.
- Keeping backups on the same server as the site, so ransomware encrypts both.
Acceptance Criteria
- All default passwords have been changed and no accounts are shared.
- Role assignments cover all back-office functions.
- Key operations are traceable in the logs.
- Backups can be restored successfully.
- External scans reveal no obvious high-risk open ports.
Scope
This configuration covers basic hardening and is not a substitute for a full security audit. Sites handling payments or personal information should also undergo code audits and penetration testing.
Related reading: