adiranjan25 opened a new pull request, #77810:
URL: https://github.com/apache/airflow/pull/77810

   ## Description
   
   Airflow Core currently generates JWT configuration
   secrets from 16 random bytes, resulting in a 24-byte
   Base64-encoded signing key.
   
   This falls below the 64-byte minimum key length
   specified for HS512 in RFC 7518 Section 3.2 and
   causes insecure key-length warnings with PyJWT.
   
   ## Changes
   
   - Increase JWT secret generation from 16 to 64
     cryptographically secure random bytes.
   - Apply the correction consistently to default
     and unit-test configuration generation.
   - Preserve the existing Base64 encoding format.
   - Leave existing configuration files unchanged.
   - Add regression coverage for encoded key length,
     decoded key material, and preservation of
     existing JWT secrets.
   
   ## Validation
   
   - Reproduced the original regression failure:
     AssertionError: assert 24 >= 64.
   - Confirmed the regression passes after the fix.
   - Configuration test suite: 200 passed.
   - Authentication token test suite: 22 passed.
   - Independently verified HS512 signing and
     verification using PyJWT 2.15.1 with strict
     minimum key-length enforcement enabled.
   - Ruff lint and formatting checks passed.
   - Git diff check passed.
   
   Closes #77805.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to