Description | This article describes how to assign Roles based on Directory attributes. |
Scope | FortiNAC-F, FortiNAC. |
Solution |
When assigning user roles, it is recommended to perform the role assignment based on the Directory attributes of the user in LDAP instead of Directory group membership. The reason for this is due to FortiNAC will look for the directory attribute data during the registration process of the user, while group information could not be accurate since the next Directory synchronization might have not been executed yet to update the FortiNAC cache with the new group information.
As an example, user 'jdoe' has an attribute 'departmentNumber' = 567851 This can be verified in Active Directory Users and Computers -> Select 'jdoe' or any other user -> Select 'Attribute Editor'.
In FortiNAC add the 'departmentNumber' as attribute to look for when applying for the user role. In this case, FortiNAC will assign as Role the value given to the attribute which is 567851. Go to System -> Settings -> Authentication -> LDAP -> Modify -> User attributes and set the Role entry as departmentNumber.
Each user will then be assigned a Role based on the Department number they are part of. Go to Policy & Objects -> Roles and create a Role matching the Department number.
At this point, it is possible to test Role assignment by having the user authenticate 802.1x via wireless.
The following debug can be enabled in FortiNAC CLI to verify role assignment:
naclab1 # diagnose debug plugin enable DirectoryAuthentication
yams.DirectoryManager FINER :: 2024-09-19 10:55:35:126 :: #6015 :: DirectoryManager::getDirectoryUser jdoe
In FortiNAC GUI, it is possible to verify the new role assignment on both the User and the inheritance of the role from the Host where the user is logged in. Figure 4 and Figure 5 show both cases.
Related documents: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.