-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUG][SEC]: Fixes AuthN server-side providers #2099
Conversation
- Added random jitter to mitigate timing attacks on early exit conditions (#2098) - Added generic AuthError for early exit conditions - Added checks for missing headers(as this was throwing key error) - Made it possible to use the TokenTransportHeader Enum when defining client-side auth(docs also updated) - Improved validation of wrong Token transport headers with a friendlier user message - Broader exception handling now logs only exception type and line number to prevent unintentional information disclosure(A02: 2021-Cryptographic Failures - owasp top10) - Aligned both token and basic auth logic flow with exist conditions - Fixed an issue with replacement of auth headers Basic and Bearer with regex which aligns well with case-insensitivity of http headers as well as properly checking that the respective string is at the beginning of the header value - Basic auth username check is not early exit case - this simplifies the logic for pwd check - Basic auth splitting on ':' is now works for only the first split this will prevent unexpected exceptions in case the user adds more than a single ':' in the base64-encoded header value - Basic auth - decoded username and password are converted to string to prevent http header injections
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
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.
This all seems very reasonable with a couple minor requests
- Also made the check a little more explicit for readability
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Docs PR TBD