-
Notifications
You must be signed in to change notification settings - Fork 1.8k
🎉 Make social auth exceptions configurable #13596
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
🎉 Make social auth exceptions configurable #13596
Conversation
22d3969 to
8a715dd
Compare
|
Waiting for #13608 to get merged. |
🔴 Risk threshold exceeded.This pull request modifies dojo/middleware.py (multiple sensitive edits detected) and updates dojo/settings/settings.dist.py where distinct social-auth error messages could allow user enumeration via differing "AuthForbidden" vs "AuthFailed" responses. The middleware changes touch a sensitive path and should be reviewed against .dryrunsecurity.yaml configuration, and the settings change should be hardened to avoid information disclosure.
🔴 Configured Codepaths Edit in
|
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/middleware.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/middleware.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/middleware.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/middleware.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/middleware.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
Information Disclosure via Distinct Error Messages in dojo/settings/settings.dist.py
| Vulnerability | Information Disclosure via Distinct Error Messages |
|---|---|
| Description | The system provides distinct error messages for different social authentication failure states. Specifically, the 'AuthForbidden' message ('You are not authorized to log in via this method.') implies that a user account exists but is not permitted to use social login, while the 'AuthFailed' message ('Social login failed.') is more generic. This distinction allows an attacker to enumerate valid user accounts by observing which error message is returned for a given login attempt. |
django-DefectDojo/dojo/settings/settings.dist.py
Lines 180 to 183 in 2c06e6e
| DD_SOCIAL_AUTH_EXCEPTION_MESSAGE_AUTH_FORBIDDEN=(str, "You are not authorized to log in via this method. Please contact support or use the standard login."), | |
| DD_SOCIAL_AUTH_EXCEPTION_MESSAGE_NONE_TYPE=(str, "An unexpected error occurred during social login. Please use the standard login."), | |
| DD_SOCIAL_AUTH_EXCEPTION_MESSAGE_AUTH_TOKEN_ERROR=(str, "Social login failed due to an invalid or expired token. Please try again or use the standard login."), | |
| DD_SAML2_ENABLED=(bool, False), |
We've notified @mtesauro.
All finding details can be found in the DryRun Security Dashboard.
valentijnscholten
left a comment
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.
Is there a benefit of using a dict? I'm asking because we don't do that in other places and it makes the code look a bit verbose 😀
|
done @valentijnscholten please review again |
To enable admins to forward useres e.g. to a Service Desk