You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split the single shared JWT signing secret into two separate keys:
`session_signing_key` and `email_verification_signing_key`, so a
compromise of one key does not affect the other token type.
Session tokens (`SessionClaims`, née `UserClaims`) now carry proper
RFC 7519 registered claims: `sub` (user ID), `iss` ("torrust-index"),
`aud` ("session"), `iat`, and `exp`. The `role` and `username` fields
are advisory only — the authoritative role is always re-checked from
the database on each authenticated request.
Email-verification tokens (`VerifyClaims`) gain an `aud`
("email-verification") claim and `iat`, and are now validated with
audience + issuer checks by the `jsonwebtoken` library instead of a
manual `iss` string comparison.
Other changes:
- Enforce a 32-byte minimum length on `JwtSigningSecret`.
- Accept `jwt_signing_secret` and `user_claim_token_pepper` as legacy
serde aliases for `session_signing_key` for backward compatibility.
- Provide `UserClaims` as a type alias so existing imports keep
compiling.
- Update all config files, doc examples, and tests.
Ref: ADR-T-007
@@ -127,7 +128,7 @@ The following services are provided by the default configuration:
127
128
-[ADR-T-004: Remove `located-error` Package](adr/004-remove-located-error.md) — Replace the `torrust-index-located-error` wrapper with `tracing` for error context.
128
129
-[ADR-T-005: Migrate to Rust Edition 2024](adr/005-edition-2024.md) — Migrate the entire workspace to `edition = "2024"` and raise the MSRV to 1.85.
129
130
-[ADR-T-006: Refactor the Error System](adr/006-error-system-refactor.md) — Replace the 41-variant `ServiceError` god enum with domain-scoped error enums (`AuthError`, `UserError`, `TorrentError`, `CategoryTagError`) and a thin `ApiError` wrapper.
130
-
-[ADR-T-007: Refactor the JWT System](adr/007-jwt-system-refactor.md) — Centralise JWT handling into `src/jwt.rs`, rename `ClaimTokenPepper` → `JwtSigningSecret`, make token lifetimes configurable, and fix panics in token parsing.
131
+
-[ADR-T-007: Refactor the JWT System](adr/007-jwt-system-refactor.md) — Centralise JWT handling into `src/jwt.rs`, redesign claims to RFC 7519, split into per-purpose signing keys, and enforce minimum secret length.
Copy file name to clipboardExpand all lines: docs/containers.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,8 @@ The following environmental variables can be set:
149
149
150
150
-`TORRUST_INDEX_CONFIG_TOML_PATH` - The in-container path to the index configuration file, (default: `"/etc/torrust/index/index.toml"`).
151
151
-`TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN` - Override of the admin token. If set, this value overrides any value set in the config.
152
-
-`TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__JWT_SIGNING_SECRET` - Override of the auth JWT signing secret. If set, this value overrides any value set in the config.
152
+
-`TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SESSION_SIGNING_KEY` - Override of the auth session signing key. If set, this value overrides any value set in the config.
153
+
-`TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__EMAIL_VERIFICATION_SIGNING_KEY` - Override of the auth email-verification signing key. If set, this value overrides any value set in the config.
153
154
-`TORRUST_INDEX_DATABASE_DRIVER` - The database type used for the container, (options: `sqlite3`, `mysql`, default `sqlite3`). Please Note: This dose not override the database configuration within the `.toml` config file.
154
155
-`TORRUST_INDEX_CONFIG_TOML` - Load config from this environmental variable instead from a file, (i.e: `TORRUST_INDEX_CONFIG_TOML=$(cat index-index.toml)`).
155
156
-`USER_ID` - The user id for the runtime crated `torrust` user. Please Note: This user id should match the ownership of the host-mapped volumes, (default `1000`).
0 commit comments