This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 64e5620 Increase the entropy of the jti field in JWTs
64e5620 is described below
commit 64e5620c3cbff9fd720a8dea450ae3c901952857
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Jan 16 18:14:09 2026 +0000
Increase the entropy of the jti field in JWTs
---
atr/jwtoken.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/atr/jwtoken.py b/atr/jwtoken.py
index 1dc0d92..fd3de39 100644
--- a/atr/jwtoken.py
+++ b/atr/jwtoken.py
@@ -50,7 +50,7 @@ def issue(uid: str, *, ttl: int = 90 * 60) -> str:
"sub": uid,
"iat": now,
"exp": now + datetime.timedelta(seconds=ttl),
- "jti": secrets.token_hex(8),
+ "jti": secrets.token_hex(128 // 8),
}
return jwt.encode(payload, _JWT_SECRET_KEY, algorithm=_ALGORITHM)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]