Skip to content

Saml group mapping v2#2489

Closed
Antiksec wants to merge 6 commits intoMobSF:masterfrom
Antiksec:saml_group_mapping_v2
Closed

Saml group mapping v2#2489
Antiksec wants to merge 6 commits intoMobSF:masterfrom
Antiksec:saml_group_mapping_v2

Conversation

@Antiksec
Copy link
Contributor

@Antiksec Antiksec commented Feb 6, 2025

Describe the Pull Request

Rework for SSO mapping:
1) Using list of mapped groups instead of one
2) Exception when SSO logged-in user doesn't have suitable SSO groups
3) Default role for use when SSO logged-in user has no groups

Checklist for PR

  • Run MobSF unit tests and lint tox -e lint,test
  • Tested Working on Linux, Mac, Windows, and Docker
  • Add unit test for any new Web API (Refer: StaticAnalyzer/tests.py)
  • Make sure tests are passing on your PR MobSF tests

Additional Comments (if any)

DESCRIBE HERE

Khabarov Konstantin Olegovich added 3 commits February 6, 2025 17:27
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.')
Copy link
Member

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.

email = attributes['email'][0]
role = get_user_role(attributes['role'])
if not role:
raise Exception(
Copy link
Member

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

@ajinabraham
Copy link
Member

Closing this as the PR is not active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants