FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
hbac
Staff
Staff
Article Id 419917
Description This article describes an issue where FortiGate always shows the first PKI admin name as the logged-in admin when multiple PKI admin accounts are configured. 
Scope FortiGate.
Solution

In this example, two PKI admin users 'user1' and 'user2' are configured under the same group, as shown below: 

 

config user peer
    edit "user1"
        set ca "CA_Cert_2"
        set subject "CN = user1"
    next
    edit "user2"
        set ca "CA_Cert_2"
        set subject "CN = user2"
    next
end

config user group
    edit "PKI_ADMIN"
        set member "user1" "user2"
    next
end

config system admin

    edit "user1"
        set peer-auth enable
        set accprofile "super_admin"
        set vdom "root"
        set peer-group "PKI_ADMIN"
    next
    edit "user2"
        set peer-auth enable
        set accprofile "super_admin"
        set vdom "root"
        set peer-group "PKI_ADMIN"
    next
end

 

However, when user2 logs into the GUI, FortiGate shows that user1 is logged in.

 

Screenshot 2025-11-20 145335.png

 

 

get system admin list
username  local    device                            vdom  profile            remote                    started
user1        https   port3:192.168.10.1:443   root    super_admin  192.168.10.2:7323  2025-11-20 20:46:25

 

System Event log shows user1 despite CN = user2

 

date=2025-11-20 time=20:46:25 eventtime=1763700385414505817 tz="-0800" logid="0100032001" type="event" subtype="system" level="information" vd="root" logdesc="Admin login successful" sn="1763700385" user="user1" ui="https(192.168.x.x)" method="https" srcip=192.168.x.x dstip=192.168.x.x action="login" status="success" reason="none" profile="super_admin" msg="Administrator user1(C = CA, ST = Ontario, L = Ottawa, O = Fortinet, CN = user2) logged in successfully from https(192.168.x.x)"

 

It is an expected behavior because access rights/permissions are assigned to PKI admin accounts under 'config system admin' and not to peer users under 'config user peer', and if PKI admin accounts share the same peer group, there is no way for the system to decide which admin user should be matched.

 

To resolve this issue, put each PKI user in a separate user group. For example: 

 

config user group

    edit "PKI_ADMIN"
        set member "user1"
    next
    edit "PKI_ADMIN2"
        set member "user2"
    next
end

config system admin

    edit "user1"
        set peer-auth enable
        set peer-group "PKI_ADMIN"
    next
    edit "user2"
        set peer-auth enable
        set peer-group "PKI_ADMIN2"
    next
end

 

After that, FortiGate will show the correct logged-in PKI user. 

 

Screenshot 2025-11-20 151314.png

 

Related articles: 

Technical Tip: Configure admin certificate authentication

Technical Tip: PKI peer user/usergroup creation for certificate authentication