Skip to content

dn attribute contains too many "ou=" things #246

Closed
etecs-ru/glauth
#3

Description

@hellerbarde

Regression 2.0.0 -> 2.1.0-rc1

The dn reported by a search query contains 2 ou= thingies, both for the primary group and another group called "users". Like this: cn=hellerbarde,ou=superheros,ou=users,dc=example,dc=com

This dn is then used as a binddn, which gets rejected by glauth. See this log excerpt:

12:59:22.641675 Bind ▶ DEBU 009  "level"=6 "msg"="Bind request"  "basedn"="dc=example,dc=com" "binddn"="cn=hellerbarde,ou=superheros,ou=users,dc=example,dc=com" "src"={"IP":"127.0.0.1","Port":40340,"Zone":""}
12:59:22.641726 findUser ▶ WARN 00a  "level"=2 "msg"="BindDN should have only one or two parts"  "binddn"="cn=hellerbarde,ou=superheros,ou=users,dc=example,dc=com" "numparts"=3

I had this problem with both gitbucket and dex

I don't know enough LDAP-lingo to properly explain what's happening, but I'm assuming that the "users" group is implicit to all users?

In any case, I tried to find the code that returns the dn attribute but I couldn't figure it out. 😄

I also mentioned this in the matrix channel, but I figured a proper bug report couldn't hurt.

Activity

  1. hellerbarde commented on Dec 13, 2021

    @hellerbarde
    Author

    To be 100% clear: The same setup, config and everything worked again by just replacing the 2.1.0-rc1 binary with the 2.0.0 release binary.

  2. hellerbarde commented on Jan 14, 2022

    @hellerbarde
    Author

    I got around to testing this, and the preview binary provided by "chrisfr" on the Matrix channel definitely fixed this. Thanks a lot for the effort

  3. hellerbarde commented on Jan 14, 2022

    @hellerbarde
    Author

    @Fusion I'm guessing you're chrisfr on Matrix. Just so you see this.

  4. hellerbarde commented on Jan 14, 2022

    @hellerbarde
    Author

    Also, I probably shouldn't close this quite yet. that was my mistake. Sorry.

  5. Fusion commented on Jan 18, 2022

    @Fusion
    Collaborator

    Thanks @hellerbarde yes that's me. Good to know that I was able to "undo" the breaking change :)

  6. added a commit that references this issue on Jan 30, 2022
    ceefc66
  7. added 3 commits that reference this issue on May 7, 2022
    57ee724
    598d746
    42ff05f
  8. added a commit that references this issue on Nov 7, 2022
    aadf150
  9. added a commit that references this issue on Jun 10, 2025
    385cc33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions