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 user_format_string to allow use with AD #3067

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

TomGoedeme
Copy link
Contributor

Description

We encountered issues with LDAP login integration using our Active Directory (AD) when binding with the user_attr format. This update introduces a new user_format property in the LDAP configuration. This property accepts a Python format string, which defaults to the previous configuration but allows for custom user string formats.

config example:

  ldap:
    dn: OU=BASE,DC=foo,DC=local
    group_attr: memberOf
    red_group: "CN=Some Security Group Name,OU=Security Groups,OU=BASE,DC=foo,DC=local"
    server: ldaps://dc-prod04.foo.local:636
    user_attr: userPrincipalName
    user_format: "{user}"

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Current testing is broken on Caldera(see #3013). But this is being used in production.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@uruwhy
Copy link
Contributor

uruwhy commented Nov 19, 2024

@TomGoedeme
If you want to get credit for a documentation update, you can also open a PR for updating the existing LDAP instructions in the fieldmanual plugin

@uruwhy
Copy link
Contributor

uruwhy commented Nov 20, 2024

@elegantmoose tested and approved

@elegantmoose
Copy link
Contributor

Thank you @TomGoedeme !

@elegantmoose elegantmoose merged commit 6130da2 into mitre:master Nov 21, 2024
1 of 6 checks passed
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.

3 participants