Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Ldap] Fixing the behaviour of getting LDAP Attributes#41527

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4frommr-sven:fix/ldap_attributes
Aug 26, 2021

Conversation

@mr-sven
Copy link
Contributor

@mr-svenmr-sven commentedJun 3, 2021
edited
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Ticketsn/a
LicenseMIT
Doc PRtodo?

Some of the attributes in LDAP are not shipped viafilter = *, they have to be requested. Example thememberOf attribute using the OpenLDAP docker demorroemhild/docker-test-openldap. ThememberOf attribute is an overlay and only available on request.

ldapsearch example without requestingmemberOf:

$ ldapsearch -H ldap://localhost:10389 -b dc=planetexpress,dc=com -D"cn=admin,dc=planetexpress,dc=com" -w GoodNewsEveryone"(&(objectClass=inetOrgPerson)(uid=fry))"dn: cn=Philip J. Fry,ou=people,dc=planetexpress,dc=comobjectClass: inetOrgPersonobjectClass: organizationalPersonobjectClass: personobjectClass: topcn: Philip J. Frysn: Frydescription: HumandisplayName: FryemployeeType: Delivery boygivenName: PhilipjpegPhoto:: ....mail: fry@planetexpress.comou: Delivering Crewuid: fryuserPassword:: ....

ldapsearch example with requestingmemberOf:

ldapsearch -H ldap://localhost:10389 -b dc=planetexpress,dc=com -D"cn=admin,dc=planetexpress,dc=com" -w GoodNewsEveryone"(&(objectClass=inetOrgPerson)(uid=fry))""*""memberOf"dn: cn=Philip J. Fry,ou=people,dc=planetexpress,dc=comobjectClass: inetOrgPersonobjectClass: organizationalPersonobjectClass: personobjectClass: topcn: Philip J. Frysn: Frydescription: HumandisplayName: FryemployeeType: Delivery boygivenName: PhilipjpegPhoto:: ....mail: fry@planetexpress.comou: Delivering Crewuid: fryuserPassword:: ....memberOf: cn=ship_crew,ou=people,dc=planetexpress,dc=com

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@nicolas-grekas
Copy link
Member

Shouldn't this PR target a lower branch, eg 4.4?
Can this be tested somehow?

@mr-sven
Copy link
ContributorAuthor

Here the snippents from my config. Without the modification the memberOf will fail.

It took me half a day of researching because the documentation is missing the service tag for the ldap service.

# /config/packages/security.yamlsecurity:enable_authenticator_manager:trueproviders:provider_ldap:ldap:service:Symfony\Component\Ldap\Ldapbase_dn:dc=planetexpress,dc=comsearch_dn:cn=admin,dc=planetexpress,dc=comsearch_password:GoodNewsEveryonedefault_roles:ROLE_USERuid_key:uidextra_fields:['givenName','sn','mail','memberOf']firewalls:dev:pattern:^/(_(profiler|wdt)|css|images|js)/security:falsemain:lazy:trueform_login_ldap:service:Symfony\Component\Ldap\Ldapenable_csrf:truelogin_path:logincheck_path:logindn_string:dc=planetexpress,dc=comquery_string:'(&(uid={username}))'search_dn:cn=admin,dc=planetexpress,dc=comsearch_password:GoodNewsEveryonelogout:path:logoutaccess_control:        -{ path: ^/login, roles: IS_ANONYMOUS }        -{ path: ^/, roles: ROLE_USER }
# /config/services.yamlservices:Symfony\Component\Ldap\Ldap:arguments:['@Symfony\Component\Ldap\Adapter\ExtLdap\Adapter']# the documentation is missing the service tagtags:['ldap']Symfony\Component\Ldap\Adapter\ExtLdap\Adapter:arguments:            -host:localhostport:10386#encryption: tlsoptions:protocol_version:3referrals:false

@OskarStark
Copy link
Contributor

This should target 🎯 4.4 and can you please add a testcase to avoid further regression?

@derrabusderrabus added this to the4.4 milestoneJun 5, 2021
Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

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

LGTM as a new feature.

@fabpot
Copy link
Member

Thank you@mr-sven.

@fabpotfabpot merged commit42197de intosymfony:5.4Aug 26, 2021
@mr-svenmr-sven deleted the fix/ldap_attributes branchAugust 31, 2021 06:36
This was referencedNov 5, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

@wouterjwouterjAwaiting requested review from wouterj

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

6 participants

@mr-sven@carsonbot@nicolas-grekas@OskarStark@fabpot@derrabus

[8]ページ先頭

©2009-2025 Movatter.jp