Originally published at: https://nextcloud.com/blog/next-generation-2-factor-authentication-and-security-hardening/
Today, Nextcloud 15 has been made available. As there is so much new and improved in this release, we have dedicated separate blogs to each main area of improvement. This blog covers our work in the area of security hardening and new security capabilities.
Next generation 2-factor authenticationSecurity continues to be a key concern for Nextcloud users. To improve the protection of Nextcloud servers, this release enables administrators to control and enforce two-factor authentication globally or on a group-by-group base. New are also one-time codes for system administrators, to be used when the 2nd factor is unavailable.
All users will be warned to generate their one-time codes as soon as possible and store them somewhere safe. Administrators have command-line control over 2FA, in case they or users are locked out of their account.
To lower the effort of using the second factor for secure authentication, notifications from devices already authenticated can be used as second factor. This way, a mobile device can approve authentication in a browser, or the desktop client can approve authentication on a phone. The user simply gets a notification and can approve it.
Further hardening of NextcloudTo harden Nextcloud further, this release brings more strict CSP (Content Security Policy) rules providing even deeper protection from Cross-Site Scripting vulnerabilities. The third generation of our App tokens improves handling on external password change. This reduces the number of times users have to re-authorize their client applications as the clients can get re-authorized automatically, provided one of the users' logins is valid.
Details on CSP and App Token V3Our CSP no longer by default allows
And it would just work. Now it no longer does. This means app developers will have to update their app and keep this limitation in mind. But code injection attacks by a hacker become significantly harder with our stricter CSP.
Over the last 2 years, our App Token technology evolved from app tokens which were invalidated whenever the user changed their password (V1) to public key app tokens that would be updated on password change (V2). V3 is adapted to work with LDAP or other external authentication mechanisms. While we still can’t update app tokens when you change your LDAP password, upon the first login in the web or any client, all app tokens are updated.