Skip to content
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

add idp-based prefix to gid #474

Open
wants to merge 2 commits into
base: stable-3.2
Choose a base branch
from

Conversation

ArtificialOwl
Copy link
Member

No description provided.

@ArtificialOwl
Copy link
Member Author

  • add a prefix to groups, based on IDP
  • add a displayname to generated groups

Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about the assumptions

@@ -673,17 +673,43 @@ public function updateAttributes($uid,
}

if ($newGroups !== null) {
$prefix = '';
$mapping = $this->config->getSystemValue('user_saml.unique_groups_per_idp', '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are both settings new? then let's leave out the system one. do not need to make it more bloated then necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requested by customer to have the config in config/config.php instead of using the occ config:app:set

Comment on lines +682 to +672
if ($mapping !== '' &&
array_key_exists($mapping, $attributes) &&
is_array($attributes[$mapping]) &&
sizeof($attributes[$mapping]) === 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd fancy to have the operators on the left handside for better readability. On the right they are rugged and thus harder to spot. I am not sure whether we have written it down though in the coding style though.

array_key_exists($mapping, $attributes) &&
is_array($attributes[$mapping]) &&
sizeof($attributes[$mapping]) === 1) {
$realUid = $attributes[$mapping][0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking of user id but that's not what it should be, or did I misunderstand it?

Copy link
Member Author

@ArtificialOwl ArtificialOwl Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to avoid a spoof of the domain from one of the idp

@AndyScherzinger AndyScherzinger force-pushed the feature/noid/isolate-groups-based-on-idp branch from 4f94cc1 to 9e19e04 Compare May 9, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants