Security

 View Only
Expand all | Collapse all

EAP-TLS to role mapping

This thread has been viewed 63 times
  • 1.  EAP-TLS to role mapping

    Posted Mar 16, 2026 08:11 AM

    Hi All,

    We are implementing Wi-Fi authentication on ClearPass using EAP-TLS. We also plan to implement "Roles" based on the CN in the certificate. What is the best way to store CN to role mapping information. Would an external SQL DB is the best choice or some where locally on the ClearPass. We are talking about less than 1000 devices here.

    Thanks,



    ------------------------------
    NadeemNet
    ------------------------------


  • 2.  RE: EAP-TLS to role mapping

    Posted Mar 16, 2026 08:41 AM

    Usually you use AD or LDAP to check validity of the account.  Then you can use member_of to group users into roles. 

    If this is not viable for you, then external SQL database can be good option.

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2025
    ------------------------------



  • 3.  RE: EAP-TLS to role mapping

    Posted Mar 16, 2026 10:10 AM

    Thanks for your answer.
    AD does not seem like a viable option for two reasons

    1) Not all devices are present in AD (like MaOS, Linux )

    2) CN in the certificate does not directly corresponds to an AD attribute.



    ------------------------------
    NadeemNet
    ------------------------------



  • 4.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 04:29 AM

    An external database is suboptimal. If it goes down, authentication will fail.

    I'm not sure what you're trying to achieve. The CN from the certificate can be evaluated in role mapping, after which a TIPS role can be assigned. The TIPS role can then be used in enforcement.



    ------------------------------
    Regards,

    Waldemar
    ACCX # 1377, ACEP, ACX - Network Security
    If you find my answer useful, consider giving kudos and/or mark as solution
    ------------------------------



  • 5.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 04:37 AM

    Static Role Mapping is a bit unflexible and hard to maintain. It's ok for small number of rules. 

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2025
    ------------------------------



  • 6.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 05:10 AM

    It really depends on what @dvmrp is trying to achieve.

    Static role mapping is inflexible, and registering 1,000 devices in a database isn't exactly easier.
    A check for CONTAINS might be enough to map the role.



    ------------------------------
    Regards,

    Waldemar
    ACCX # 1377, ACEP, ACX - Network Security
    If you find my answer useful, consider giving kudos and/or mark as solution
    ------------------------------



  • 7.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 05:36 AM

    Hi Waldemar.

    Totally agree with you. If there are common strings in CN that can be used for categorizing devices, then it is viable. Not elegant or flexible, but can be done.

    Guest Device Repository as already mentioned option is also viable option with more flexibility. 

    Other option is to use AD for devices in AD and Guest Device Repository for other devices. I often use this combination. It has a benefit that you already have a management interface to Device Repository and can delegate responsibility for maintaining it to others.

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2025
    ------------------------------



  • 8.  RE: EAP-TLS to role mapping
    Best Answer

    Posted Mar 16, 2026 09:42 AM

    As mentioned an external database would most likely be the best option.

    In ClearPass you can't use the internal databases in this way to store your own custom data. The only database in ClearPass that potentially may be able to do this is the Guest User Repository.

    If you manually creates users in the Guest User Repository with the same username as the Common name in the certificate and assign each user to a role, you may be able to use this database as an authorization source during EAP-TLS authentication and assign roles.

    I have never tried anything like this myself, so I can't guarantee it will work.



    ------------------------------
    Best Regards
    Jonas Hammarbäck
    MVP Guru, ACEX, ACDX #1600, ACCX #1335, ACX-Network Security
    Aranya AB
    If you find my answer useful, consider giving kudos and/or mark as solution
    ------------------------------



  • 9.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 07:02 AM

    There is not a pattern in CN that can be used. Some times CN corresponds to device serial numbers and other times it could be hostname. Certs are generated by a different group, so we don't have much control. The obvious choice is to use external SQL database and populating the database is easy using a python script. Being the single point of failure we will have to deploy atleast two instances of this DB. I don't want to complicate the things for this (small to med) deployment. I will explore the Guest User Repository, that's a good idea. 



    ------------------------------
    NadeemNet
    ------------------------------



  • 10.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 08:02 AM

    At some customers I have seen the use of "fake" subdomains to identify different types of devices. For example one customer has the common name as CN=hostname.printers.domain.com and CN=hostname.video.domain.com for video conferencing systems.

    Another option is to add this type of information in the SAN field or in the OU field.

    From what I have seen with some IoT devices it can be a bit tricky to manipulate all fields of a certificate request. Sometimes you can just provide a name, in such case it can require a bit more when requesting certificates.

    I often see similar cases with customers where the certificates are already deployed to clients, and later you find out that some additional information would be great to have in the certificates. Sometimes require re-enrollment of the certificates.



    ------------------------------
    Best Regards
    Jonas Hammarbäck
    MVP Guru, ACEX, ACDX #1600, ACCX #1335, ACX-Network Security
    Aranya AB
    If you find my answer useful, consider giving kudos and/or mark as solution
    ------------------------------



  • 11.  RE: EAP-TLS to role mapping

    Posted Mar 17, 2026 09:33 AM
    Edited by MGT-Joe Mar 17, 2026 09:33 AM

    dvmrp,

    See this AirHeads Broadcast video by Herman. I think it is exactly what you are looking for: Airheads Broadcast

    -------------------------------------------



  • 12.  RE: EAP-TLS to role mapping

    Posted Mar 18, 2026 05:26 AM
    Edited by Herman Robers Mar 18, 2026 05:29 AM

    It's not exactly, but it can be used to store the Certificate CN in the endpoint database. I've created in my lab something similar based on the Certificate Serial number.

    Make sure that the Endpoint database entry (MAC for the entry does not need to be the correct one) has additional attributes: Certificate-Serial (or CN in your case), role, and I have vlan as well.

    Then I copied the Endpoint DB Auth Source (name: EndpointDB-vlan-role-by-certificate-serial) and query it based on the Certificate-Serial (instead of the original that uses Client MAC):

    select attributes->>'role' as "role", attributes->>'vlan' as "vlan" FROM tips_endpoints WHERE attributes->>'Certificate-Serial' = '%{Certificate:Serial-Number}'

    In the Enforcement Policy I do something like:

     (Tips:Role  EQUALS  Homelab)
     AND  (Authentication:OuterMethod  EQUALS  EAP-TLS)
     AND  (Authorization:EndpointDB-vlan-role-by-certificate-serial:vlan  EXISTS   )
     AND  (Authorization:EndpointDB-vlan-role-by-certificate-serial:role  EXISTS   ) 	PANW-Update, EndpointDB-serial-role-vlan, Return-Full-Username 

    And the Enforcement profile EndpointBD-serial-role-vlan returns:

    1. 	Radius:Aruba	Aruba-User-Role	= 	%{Authorization:EndpointDB-vlan-role-by-certificate-serial:role}
    2. 	Radius:Aruba	Aruba-User-Vlan	= 	%{Authorization:EndpointDB-vlan-role-by-certificate-serial:vlan}

    May work as well in your case and takes away the need of an external SQL database that may become a single point of failure (and additional maintenance).

    Just consider this 'as inspiration', it may not work at large scale or under all circumstances; so no guarantees, nor claims that this the best/optimal/most-secure way of doing this.



    ------------------------------
    Herman Robers
    ------------------------
    If you have urgent issues, always contact your HPE Aruba Networking partner, distributor, or Aruba TAC Support. Check https://www.arubanetworks.com/support-services/contact-support/ for how to contact HPE Aruba Networking TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or HPE Aruba Networking.

    In case your problem is solved, please invest the time to post a follow-up with the information on how you solved it. Others can benefit from that.
    ------------------------------



  • 13.  RE: EAP-TLS to role mapping

    Posted Mar 18, 2026 05:37 AM

    Hi Herman.

    This is a great example. I usually use Guest Device Repository, but in some cases endpoint db looks like more elegant solution.

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2025
    ------------------------------



  • 14.  RE: EAP-TLS to role mapping

    Posted Mar 20, 2026 11:03 AM

    Herman's response and this blog lead me to explore Endpoint repository. I am populating Endpoint repository using CrowdStrike Falcon extension. All of our endpoints(hosts) have Falcon installed so Endpoint repository is filled with host attributes. This was pretty easy to setup. In Endpoint repository I have following attributes which are interesting.

    • hostname (our windows machine cert has CN equal host/<hostname>@example.com)</hostname>
    • serial number (our macos machine cert has CN equal to mac-serial-number@example.com)
    • Last Login User

    I have created a Falcon Authorization source (similar to Herman example and the blogpost reference earlier). The following filter is being used.

    select attributes->>'CrowdStrike Last Login User' as "CrowdStrike Last Login User" FROM tips_endpoints WHERE attributes->>'CrowdStrike Serial Number' = UPPER('%{Authentication:Username}');

    Basically the intention is to retrieve user-id from the Endpoint repository, which I am correctly able to do now. I will describe later why I am extracting the user-id.

    Since the Endpoint repository does not have a Aruba-User-Role or Aruba-User-Vlan which I intend to return in radius-accept, I could manually add these to Endpoint repository and problem is solved. However I would like to avoid adding this info manually if possible. We already have this info present in the form of AD groups in our Active Directory. The purpose of retrieving the user-id earlier is to do a lookup on active directory based on this user-id. This is where I am struggling at the moment. I don't know how to trigger an Active Directory lookup? The clearpass is already joined to domain and we do these looks up successfully for our EAP/PEAP/MSCHAPv2 authentication. For eap-peap our filter looks like following and it works great.

    (&(sAMAccountName=%{Authentication:Username})(objectClass=user))

    As I explained earlier Username in case of eap-tls is either the serial-number of macbook or hostname of windows device. Obviously with this Username, attributes fetched with the above query would not work. Since I have the user-id retrieved from Falcon, I tried the following query but it did not work.

    (&(sAMAccountName=%{Authorization:Falcon:CrowdStrike Last Login User})(objectClass=user))

    The above query was set under authentication source where Active Directory is defined. I am not sure what is the correct way of getting this to work. I am assuming it did not work because the Falcon is defined as a different auth source. Is this even possible what I am trying to do.

    Thanks for looking into this.



    ------------------------------
    NadeemNet
    ------------------------------