-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] Use secrets.token_hex(32) to generate auth tokens
#58818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request improves security by replacing uuid.uuid4() with the cryptographically stronger secrets.token_hex(32) for generating authentication tokens. The change is applied consistently across the token generator and its usage in tests. The new implementation is correct and well-documented. I've identified one critical issue in a test fixture where a parameter was not removed after its corresponding fixture was deleted, which would cause tests to fail. Please see the detailed comment.
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
…es/gen-auth-token
…ct#58818) Replace placeholder. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
…ct#58818) Replace placeholder. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Cherry pick #58818 Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
…ct#58818) Replace placeholder. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
…ct#58818) Replace placeholder. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: YK <1811651+ykdojo@users.noreply.github.com>
…ct#58818) Replace placeholder. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Replace placeholder.