Skip to content

Fix JWT signing on Windows - #189

Open
Shubham-Padkonde wants to merge 1 commit into
atlassian:mainfrom
Shubham-Padkonde:fix/platform-independent-key-identifiers
Open

Shubham-Padkonde wants to merge 1 commit into
atlassian:mainfrom
Shubham-Padkonde:fix/platform-independent-key-identifiers

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

JWT signing with a normal key identifier such as issuer.example/signing-key fails on Windows: filesystem normalization changes the separators and rejects the identifier. Once that is corrected, generating the JWT ID also fails because Windows does not support strftime("%s").

Use POSIX normalization for the slash-delimited key identifiers and calendar.timegm() for the UTC timestamp, which the signer already uses elsewhere. Keep rejecting noncanonical identifiers, including repeated separators and traversal segments.

Validation: all 224 tests pass on Linux/Python 3.12; all 11 focused key and signer tests pass on Windows/Python 3.12. Added regressions simulate Windows path rules and the absence of the %s extension. Ruff lint and formatting checks pass. The full Windows suite still has 13 failures involving existing file-URL fixtures, token-lifetime tests, and a local HTTP cache test. Mypy reports four existing session-inference errors outside this change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant