Skip to content

Commit 600e1dd

Browse files
docs(auth): clarify recoverable password storage
Explain when recoverable login passwords are stored in authentication-token records and the consequences. Document the actual RSA key-size performance threshold (214 and neither "300" nor 250) and clarify that the 469-byte account-password limit applies regardless of this option. Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent d6e6ad5 commit 600e1dd

1 file changed

Lines changed: 33 additions & 14 deletions

File tree

config/config.sample.php

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -575,21 +575,40 @@
575575
'auth.webauthn.enabled' => true,
576576

577577
/**
578-
* Whether encrypted passwords should be stored in the database
578+
* Whether recoverable login passwords should be stored in authentication-token
579+
* records.
580+
*
581+
* When enabled and the login password is available to Nextcloud, a separate,
582+
* reversibly encrypted copy of the password is stored in the server-side records
583+
* associated with the user's authentication tokens. This is separate from the
584+
* one-way password hash used for account authentication.
585+
*
586+
* The recoverable password copy is used for features that require the original
587+
* login credentials, such as connecting to external storage, autoconfiguring
588+
* accounts in the Mail app, and periodically checking whether a password remains
589+
* valid.
590+
*
591+
* A recoverable password is encrypted using an RSA key pair associated with its
592+
* authentication-token record. Passwords longer than 214 bytes require a larger
593+
* RSA key, which increases token-generation overhead.
594+
*
595+
* Administrators may wish to disable this option when users routinely use very
596+
* long passwords (215 to 469 bytes), when one-time login credentials should not
597+
* be stored, or when deployed authentication flows do not require password
598+
* recovery. Disabling it prevents the recoverable password copy from being stored
599+
* and avoids password-length-related RSA key-size increases. However, operations
600+
* that require Nextcloud to have access to the original login password will no
601+
* longer work.
602+
*
603+
* NOTE: Nextcloud enforces a maximum account password length of 469 bytes whether
604+
* this option is enabled or disabled.
605+
*
606+
* WARNING: If disabled, password changes made directly in an external user
607+
* backend, such as LDAP, no longer automatically invalidate connected clients.
608+
* Users can still disconnect clients by deleting their app tokens from the
609+
* security settings.
579610
*
580-
* The passwords are only decrypted using the login token stored uniquely in the
581-
* clients and allow connecting to external storages, autoconfiguring mail accounts in
582-
* the mail app, and periodically checking if the password is still valid.
583-
*
584-
* This might be desirable to disable this functionality when using one-time
585-
* passwords or when having a password policy enforcing long passwords (> 300
586-
* characters).
587-
*
588-
* By default, the passwords are stored encrypted in the database.
589-
*
590-
* WARNING: If disabled, password changes on the user backend (e.g., on LDAP) no
591-
* longer log connected clients out automatically. Users can still disconnect
592-
* the clients by deleting the app token from the security settings.
611+
* Defaults to ``true``.
593612
*/
594613
'auth.storeCryptedPassword' => true,
595614

0 commit comments

Comments
 (0)