-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Saml group mapping v2 #2489
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
base: master
Are you sure you want to change the base?
Saml group mapping v2 #2489
Conversation
elif vrole or settings.IDP_MOBSF_DEFAULT_GROUP == 'Viewer': | ||
logger.info('User assigned to %s group.', VIEWER_GROUP) | ||
return VIEWER_GROUP | ||
logger.warning('User does not have an authorized SSO group.') |
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 reason to support this? We do not want to over complicate SSO roles. MobSF only has two role privileges a read-only default role for everyone and a read-write maintainer role for maintainer group.
@@ -174,6 +183,9 @@ def saml_acs(request): | |||
'role attribute not found in SAML response.') | |||
email = attributes['email'][0] | |||
role = get_user_role(attributes['role']) | |||
if not role: | |||
raise Exception( |
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.
Users/Groups that doesn't need MobSF access shouldn't be added in the MobSF SAML app.
https://mobsf.github.io/docs/#/sso
Describe the Pull Request
Checklist for PR
tox -e lint,test
StaticAnalyzer/tests.py
)Additional Comments (if any)