Repository: DependencyTrack/dependency-track

Issue #241: Teams failure when Active Directory Group Name Contains Space
Created: 2018-11-21T23:36:03Z
Defect:
Current Behavior:
Dependency Track LDAP using Active Directory is working correctly for authentication (users are created on first login).  When configuring Teams, I can see a complete listing of all of our 250 AD groups.

The AD group "Developers" works for us.
The AD group "Domain Users" does not work.  A user who is a member of that group (and not in "Developers") receives an HTTP 403 (Forbidden) error after login.  They are not added to a Team.  If I manually add them to a Team, then they are automatically then removed from the Team by Dependency Track (which is probably correct behaviour in the context).
Ditto for any other group with a space in the name.
Ditto for adding "Domain Users" to a group "DT-Test" in Active Directory and trying to set up Dependency-Track to use "DT-Test".

Steps to Reproduce (if defect):

With Active Directory configured, create a Team (eg "users") in Dependency-Track
Configure the team "users" with permission VIEW+PORTFOLIO
Select an LDAP group that has a space  (Look for something like OU=Domain Users)
Pick a user from that group that has no other permissions that would allow access to Dependency-Track)
Login as that user.

Expected Behavior:

The user should be able to login
The user should be able to View Portfolio.  ie, no "Forbidden" error.
The user should be listed in the UI as a member of 1 Team, and that Team should be "Users"

Environment:

Dependency-Track Version:  v3.3.1
Distribution: [Executable WAR]
BoM Format & Version: N/A
Database Server: [ H2 ]
Browser:  Any
LDAP Server = Active Directory.

Other Details:
There are no events in the logs apart from those recording the HTTP 403 Forbidden.

Duplicate issue #1498: Teams failure when Active Directory Group Members have space/blanks
Created: 2022-03-28T11:10:44Z
The defect may already be reported! Please search for the defect before creating one.
Current Behavior:
Dependency Track, using LDAP Active Directory is working correctly for authentication . I can add AD groups to the team without problems. Group dn's can have blanks. Users with blank spaces in their dn can be authenticated and get the corresponding roles if they are added to the "Team membership" option.
Users with a blank space in their dn and who are members of a group mapped to a team are not recognized.
Steps to Reproduce:
I add a DA group to the team's "Mapped LDAP groups" list, for example "cn=my group, dc=company,dc=com" mapped with Administrators team.
A user whose DN has blanks, for example "cn=user1, ou=my department, dc=company, dc=com" and is a member of the AD group mapped to the team, is not assigned the roles corresponding to that team.
A user whose DN does NOT have blanks, for example "cn=user1, ou=department, dc=company, dc=com" and is a member of the group mapped to the team, is assigned the roles corresponding to that team.
Expected Behavior:
The user, whether or not he has blank spaces in his dn, is assigned the roles that correspond to the team whose DA group he belongs to has been mapped to that team.
Environment:

Dependency-Track Version: 4.4.2
Distribution: Docker
BOM Format & Version: N/A
Database Server: Sql Server
Browser: Firefox, Chrome

Additional Details:

Closing comment (2022-03-28T16:48:58Z): This is not a duplicate of #241. This is related to members of a group with DNs containing blanks, not to a group with a DN containing blanks.
Please read the complete issue and look the examples.