---
title: "Users, Auth & Security"
url: "https://docs.chinaski.net/en/security/"
type: "page"
language: "en"
description: "Accounts, authentication, and the security model in Chinaski: users and roles, sessions, passwords, SSO, permissions, and the audit trail."
updated: "2026-09-29"
generated: "Markdown rendition of the HTML page at url, built by Chinaski"
---

# Users, Auth & Security

Accounts, authentication, and the security model: how Chinaski decides who is allowed to do what, how sessions stay real, and where every security-relevant action is recorded. The pages follow the operator’s journey: getting people in, scoping them, watching the trail.

## In this section

- **[Users & Roles](https://docs.chinaski.net/en/security/users-roles/)**: the two roles (admin/editor), user management, suspension, and self-registration.
- **[Authentication](https://docs.chinaski.net/en/security/authentication/)**: sign-in mechanics, lockouts, the dual session model (cookie + server-side record), and session invalidation.
- **[Passwords](https://docs.chinaski.net/en/security/passwords/)**: password rules, expiry, resets, and what a password change invalidates.
- **[SSO & OAuth](https://docs.chinaski.net/en/security/sso/)**: enabling a real identity provider for teams; accounts created from identity providers.
- **[Permissions](https://docs.chinaski.net/en/security/permissions/)**: scoping editors by allowed content types and languages, beyond the two roles.
- **[Security Model](https://docs.chinaski.net/en/security/security-model/)**: the code-level guarantees: CSRF everywhere, hashed-at-rest secrets, signed sessions, and the trust rules for proxy headers.
- **[Audit Log](https://docs.chinaski.net/en/security/audit-log/)**: every recorded security action (logins, locks, content changes), who wrote what, and retention.
- **[Secrets](https://docs.chinaski.net/en/security/secrets/)**: what’s encrypted and where (stored credentials, signing key rotation, the env’s `CHINASKI_SECRET` contract).
- **[Hardening](https://docs.chinaski.net/en/security/hardening/)**: the deployment-level measures: upload checks, honeypots, rate limiting, external security log.
- **[My Account](https://docs.chinaski.net/en/security/my-account/)**: self-service: password changes, profile, interface preferences, and “log out everywhere”.

## The model in one paragraph

People log in with username + password (or an SSO provider when configured) and get a signed, server-validated session; their capabilities then come from two levels: a **role** (what they can reach) and **per-user restrictions** (which content types and languages they manage). Every authentication outcome and every mutation is recorded: an audit trail plus separate auth/event logs, with lockouts, expiry, and rate limits enforced server-side. Secrets (credentials, keys) live encrypted at rest under a key derived from the instance’s `CHINASKI_SECRET`, which is exactly why that env file matters as much as the backups.

## What’s deliberately simple

- **Two roles, then refinement.** There is no roles-per-route matrix: `editor` plus allowed-content/languages covers real-world agency needs; `admin` covers the rest.
- **Sessions are revocable.** Suspending a user, resetting a password, or “log out everywhere” ends sessions instantly, not at the next re-login. Password expiry is enforced at the application level.
- **The audit trail is a plain table**: robust enough for day-to-day forensics, with a *best-effort* durability note and an optional external JSON log for the events you can’t afford to lose.
- **Self-registration exists but ships off**: registration, password resets, and Turnstile all come disabled/optional; enabling them is a deliberate choice.

## Also in Users, Auth & Security

[Users & Roles](https://docs.chinaski.net/en/security/users-roles/)

Chinaski's admin and editor roles, what each can do, how per-user content type and language restrictions work, and the safeguards against lockout.

[Authentication](https://docs.chinaski.net/en/security/authentication/)

How signing in to the Chinaski admin works: login checks, session creation and invalidation, suspended accounts, login history, and API access.

[Passwords](https://docs.chinaski.net/en/security/passwords/)

Manage passwords in Chinaski: the strength rules, changing and resetting them, how expiry and lockout behave, and admin password management.

[SSO & OAuth](https://docs.chinaski.net/en/security/sso/)

Let your team sign in to the admin through an existing identity provider: OAuth 2.0 and OIDC setup, the five provider fields, and where SSO lives.

[Permissions](https://docs.chinaski.net/en/security/permissions/)

The admin and editor roles, plus the per-account limits that restrict an editor to certain content types and languages.

[Security Model](https://docs.chinaski.net/en/security/security-model/)

Understand Chinaski's security model: subresource integrity, content security policy, client-IP trust, and rate limits with lockouts.

[Audit Log](https://docs.chinaski.net/en/security/audit-log/)

Review the admin-only trails in Chinaski: the audit log of who changed what, the event and authentication logs, and build logs.

[Secrets](https://docs.chinaski.net/en/security/secrets/)

How CHINASKI_SECRET works as the master secret, which settings are stored encrypted, and what happens to them if you rotate the master secret.

[Hardening](https://docs.chinaski.net/en/security/hardening/)

How a Chinaski deployment ships locked down: the systemd sandbox, file permissions, loopback binding, security headers, and how to keep them intact.

[My Account](https://docs.chinaski.net/en/security/my-account/)

Use the My Account page at /admin/account to change your password, see password expiry status, and manage your admin preferences.
