Skip to content

docs(security): clarify password and authentication token storage - #15476

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/docs-admin-hardening-clarify-passwords-and-tokens
Open

docs(security): clarify password and authentication token storage#15476
joshtrichards wants to merge 1 commit into
masterfrom
jtr/docs-admin-hardening-clarify-passwords-and-tokens

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Aug 22, 2026

Copy link
Copy Markdown
Member

☑️ Resolves

N/A - prompted by a question about the ambiguity of the existing documentation on the forum along with my recurring own need to refer to the code and/or notes in this area.

Summary

Clarifies the password and authentication-token storage guidance in the server hardening documentation.

The existing text can be interpreted as saying that Nextcloud stores account passwords using reversible encryption instead of standard password hashing. In practice, these are separate mechanisms:

  • The built-in database user backend stores a salted, one-way account-password hash, preferring Argon2id when supported by PHP and falling back to Argon2i or bcrypt.
  • Authentication tokens are represented in the database by a hash derived from the token and the instance-specific secret.
  • When auth.storeCryptedPassword is enabled and the login password is available, a separate, reversibly encrypted copy may be stored in the server-side record associated with an authentication token.

This change distinguishes those representations and explains why a recoverable copy may exist, how it is protected, and the security consequences of a combined token, configuration, and database compromise.

It also clarifies that:

  • The authentication token itself does not contain the login password.
  • Passwordless and some SSO-generated token records may not contain a recoverable password.
  • Administrators can disable recoverable password storage with auth.storeCryptedPassword, subject to the documented functional consequences.
  • External user backends control their own account-password storage and verification.

Follow-ups/related:

TODO

  • Backport to v34 (and possibly v35, depending on merge timing)
  • Determine whether safe to backport to v33 based on implementation details (I think so but have not verified)

🖼️ Screenshots

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

Assisted-by: Copilot:gpt-5.6-sol

Signed-off-by: Josh <josh.t.richards@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

🔍 Open preview →

📄 1 changed documentation page

Last updated: Sat, 22 Aug 2026 17:26:13 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant