## ADDED Requirements ### Requirement: JWT Secret Validation The system SHALL validate JWT secret key strength on startup. #### Scenario: Weak secret rejected - **WHEN** the configured JWT secret is less than 32 characters - **THEN** the system SHALL log a critical warning - **AND** optionally refuse to start in production mode #### Scenario: Low entropy secret warning - **WHEN** the JWT secret has low entropy (repeating patterns, common words) - **THEN** the system SHALL log a security warning ### Requirement: CSRF Protection The system SHALL protect sensitive state-changing operations with CSRF tokens. #### Scenario: CSRF token required for password change - **WHEN** a user attempts to change their password - **AND** the request does not include a valid CSRF token - **THEN** the request SHALL be rejected with 403 Forbidden #### Scenario: CSRF token required for account deletion - **WHEN** a user attempts to delete their account or resources - **AND** the request does not include a valid CSRF token - **THEN** the request SHALL be rejected with 403 Forbidden #### Scenario: Valid CSRF token accepted - **WHEN** a state-changing request includes a valid CSRF token - **THEN** the request SHALL proceed normally