Skip to main content
gbamania
Staff
Staff
July 1, 2022

Technical Tip: Username format for LDAP authentication

  • July 1, 2022
  • 0 replies
  • 11618 views
Description

This article describes what format of LDAP username that should be used when LDAP authentication is integrated in FortiGate.

For example, the LDAP user authentication to log in to FortiGate or for SSL-VPN authentication.

Scope FortiGate.
Solution

In this active directory configuration, CN value of a user is 'JohnRice' and the SAMAccountName is 'John'.

 

Case1: When cn value is used under 'Common Name Identifier'.

 

gbamania_0-1656654943877.png

 

When the user authenticates, it should use the username value present in the Display Name section in Active Directory.

 

For example:

Username: 'JohnRice' (see screenshot below).

 

gbamania_1-1656654943881.png

When importing as an individual user on FortiGate for 2FA purposes, it will display as 'JohnRice', and the client will need to use this value for authentication.

A few packet capture snippets that show working and non-working scenarios for each case.

 

If Common Name Identifier: CN is used in the FortiGates' LDAP configuration:

  • Username: 'JohnRice' will show a successful LDAP binding response.
  • Username: 'John' will show an unsuccessful LDAP binding response.

 

Working Scenario.

Search request:

 

gbamania_2-1656654943886.png

 

Search response:

 

gbamania_3-1656654943889.png

 

Bind the request and response after a successful search request.

 

gbamania_4-1656654943893.png

 

Non-Working scenario.

Search request:

 

gbamania_5-1656654943896.png

 

Search response:

 

gbamania_6-1656654943898.png

 

Case2: When SAMAccountName is used under Common Name Identifier.

 

gbamania_7-1656654943901.png

 

When the user authenticates, it should use the username value present in the 'User logon name' section in Active Directory.

 

For example:

Username: John (see in screenshot below).

 

gbamania_8-1656654943905.png

When importing as individual user on FortiGate for 2FA purpose, it will display as "John" and client will need to use this value for authentication.

If Common Name Identifier: SAMAccountName is used in the FortiGates's LDAP configuration:

  • Username: 'John' will show a successful LDAP binding response.
  • Username: 'JohnRice' will show an unsuccessful LDAP binding response.

 

Working Scenario.

 

gbamania_9-1656654943907.png

 

gbamania_10-1656654943911.png

 

Non-working.

Search request:

 

gbamania_11-1656654943914.png

 

Search response:

 

gbamania_12-1656654943917.png
Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT