Showing posts with label ClearPass. Show all posts
Showing posts with label ClearPass. Show all posts

Tuesday, 5 May 2020

Clearpass Authenticating using userPrincipalName or SAMaccountname

By default new Active Directory authentication sources added to Clearpass are set to check user authentication against samAccountName. As part of an effort to make 802.1x wireless authentications match domain joined machine logins we needed to change to check users against userPrincipalName instead. Some differences between these two are listed below:

samAccountName
  • historic user login name used pre-Win2k
  • format is Domain\User


  • userPrincipalName
  • used with newer Windows versions
  • format is username@DomainName.co.uk

  • Change to the AD Source

    The first step is to change the filter that is used by ClearPass to query the AD source. 
    This is located here: Auth > Sources > My Source > Attributes, click on Authentication > Configuration, 
    Then change Filter Query from:
    (&(sAMAccountName=%{Authentication:Username})(objectClass=user)) 
    to 
    (|(&(objectClass=user)(sAMAccountName=%{Authentication:Username}))(&(objectClass=user)(userPrincipalName=%{Authentication:Username})))
    as shown here:
    This query allows both samAccountName and userPrincipalName to be checked but they will need different ClearPass services as the former would require any domain to be stripped whilst the latter needs the domain to be present. If only UPN is required then the query can be shortened to just:
    (&(objectClass=user)(userPrincipalName=%{Authentication:Username})))

    New Services

    Then to implement the change a new service was required above the existing services to handle the users logging in with UPN. Our existing eduroam login is username@domain.ac.uk and thus to match samAccountName the username is stripped out before comparison. However, now using UPN this wouldn't work so a new service was required.
    This implements a regular expression on the username that is more specific than for the previous service so will only match usernames in the new format. The existing format will still be matched to the old service for a temporary period of co-existence until all users migrate to the new format. This regular expression is looking for a prefix containing numbers, lower case letters, at least one dot and optionally apostrophes and hyphens.

    Beware

    One thing to be aware of is that I couldn't get ClearPass to do the authorization part correctly from the AD source following authentication. This is necessary to determine the role that each user should be assigned. It seems that if there are multiple AD sources being queried by Clearpass then this doesn't work.

    Thursday, 12 March 2020

    Aruba Clearpass Custom Analysis & Trending

    Our large UK university campus uses Aruba Clearpass for authentication. We had a situation recently when a large number of wireless authentications were failing at certain times of the day. One of the great features of Clearpass is the Access Tracker that lists all the authentication attempts with lots of useful information. It is found on Policy Manager - Monitoring - Live Monitoring - Access Tracker

    I could see in the policy manager access tracker that at the times when the issue was occurring that many of the connections were failing with a timeout. One of the very useful parts of the access tracker are its filters and I was able to filter for "Login Status equals TIMEOUT". However, what I really wanted to see was the number of login timeouts vs successful authentications graphed over time to get an understanding of the scale of the problem and its frequency.

    Policy Manager has a graphing function to be found at: Policy Manager - Monitoring - Live Monitoring - Analysis & Trending. An example of the supplied filters is this, simply showing total requests, successes and failures:


    However, in my case I needed to see the authentication timeouts and not just all the failures. What I needed was a data filter which are found at Policy Manager - Monitoring - Data Filters. These can filter on any of the parameters present in the access tracker and can use Boolean logic to construct more complex queries. The query can then be used to build a graph in the Analysis & Trending module.

    My first filter was quite simple just looking for RADIUS authentication where the Login-Status EQUALS TIMEOUT:

    and another that showed the timeouts from a group of Meru controllers by filtering on the NAS IP address of the wireless controller(s):
    Then applying these filters in Analysis & Trending provided the graphical representation required:

    Emoji Wi-Fi on Cisco C9800 Catalyst

    A nice feature for some situations is to use an Emoji SSID instead of a plain text SSID. Many Wi-Fi controllers support this by allowing cut...