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

Fixed: Okta LDAP Manager Attribute - Better handle LDAP Manager settings #11995

Merged
merged 3 commits into from
Oct 20, 2022

Conversation

uberbrady
Copy link
Collaborator

A customer had a problem where their Okta configuration was failing to synchronize. It turns out they had an "LDAP Manager" attribute set to managerid. It turns out that Okta doesn't return a fully-qualified DN for their Managers - just an 'email-address-looking-like' username.

Instead of janking up our Manager lookup code, I've just thrown a try/catch around it, and set it to 'fall-back' to do a straight lookup on whatever that Manager was against our username field. I think this will work when people have their Okta configured to use 'email-address-esque' usernames, but it will probably fail with 'short usernames'.

But, all that being said, this is at least slightly better than what we were doing before. And if the LDAP lookup causes an exception, it won't abort the entire synchronization process. That's at least something.

@uberbrady
Copy link
Collaborator Author

Also the typo-fixes and whitespace fixes are due to our evil dictator demanding them of me. Please send help. I'm trapped in a tiny, windowless room!

@uberbrady
Copy link
Collaborator Author

Also the script at least runs - so that's something (I just ran it against our test AD instance). So, like, no syntax errors or seriously stupid stuff.

@@ -233,7 +247,6 @@ public function handle()
}
}
}

Copy link
Owner

@snipe snipe Oct 20, 2022

Choose a reason for hiding this comment

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

Please pull this extra line break

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Derp! Fixed.

@snipe
Copy link
Owner

snipe commented Oct 20, 2022

This looks great, and at worst, it seems non-breaking. Thanks so much - I know how much time it took for you to troubleshoot this issue.

@snipe snipe merged commit edf191b into snipe:develop Oct 20, 2022
@snipe snipe changed the title Fixed: Okta LDAP Manager Attribute - Try to better-handle LDAP Manager settings Fixed: Okta LDAP Manager Attribute - Better handle LDAP Manager settings Oct 20, 2022
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