I'd like to know what people consider best practice for securing the Admin sections of websites, specifically from an authentication/access point of view.
Of course there are obvious things, such as using SSL and logging all access, but I'm wondering just where above these basic steps people consider the bar to be set.
For example:
- Are you just relying on the same authentication mechanism that you use for normal users? If not, what?
- Are you running the Admin section in the same 'application domain'?
- What steps do you take to make the admin section undiscovered? (or do you reject the whole 'obscurity' thing)
So far, suggestions from answerers include:
- Use strong passwords for admin (long length and including digits and special characters) [Developer Art]
- Introduce an artificial pause into each admin password check to prevent brute force attacks [Developer Art]
- Use separate login pages for users and admin using the same DB table (to stop XSRF and session-stealing granting access to admin areas) [Thief Master]
- Consider also adding webserver native authentication to the admin area (e.g. via .htaccess) [Thief Master]
- Consider blocking users IP after a number of failed admin login attempts [Thief Master]
- Add captcha after failed admin login attempts [Thief Master]
- Provide equally strong mechanisms (using the above techniques) for users as well as admins (e.g. don't treat admins specially) [Lo'oris]
- Consider Second level authentication (e.g. client certificates, smart cards, cardspace, etc.) [JoeGeeky]
- Only allow access from trusted IPs/Domains, add check to basic HTTP pipeline (via e.g. HttpModules) if possible. [JoeGeeky]
- [ASP.NET] Lock down IPrincipal & Principal (make them immutable and non-enumerable) [JoeGeeky]
- Federate Rights Elevation - e.g. email other admins when any admin's rights are upgraded. [JoeGeeky]
- Consider fine-grained rights for admins - e.g. rather than roles based rights, define rights for indicidual actions per admin [JoeGeeky]
- Restrict creation of admins - e.g. Admins cannot change or create other admin accounts. Use a locked-down 'superadmin' client for this. [JoeGeeky]
- Consider Client Side SSL Certificates, or RSA type keyfobs (electronic tokens) [Daniel Papasian]
- If using cookies for Authentication, use separate cookies for admin and normal pages, by e.g. putting the admin section on a different domain. [Daniel Papasian]
- If practical, consider keeping the admin site on a private subnet, off the public internet. [John Hartsock]
- Reissue auth/session tickets when moving between admin/normal usage contexts of the website [Richard JP Le Guen]