Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Active Directory filter query with a Clearpass variable?

This thread has been viewed 46 times
  • 1.  Active Directory filter query with a Clearpass variable?

    Posted Jun 09, 2017 02:24 PM

    We've got a PSK SSID tied to Clearpass via an [Allow All MAC Auth] service, that's using the Endpoints Repository, an external SQL database, Static Hosts List, and AD as authorization sources.  I'm able to leverage info from all of these sources to assign roles based on context, but I'd like to clean up the AD piece a little bit.

     

    I started by trying to create the filter query to select computer objects where <some AD attribute> matches <some Clearpass variable> but no matter what I tried it wouldn't return any matches.  For example, the default Machine filter:  (&(sAMAccountName=%{Host:Name}$)(objectClass=computer)).  I think %{Host:Name} is only populated when the client does machine authentication, so I tried some others like %{Authorization:[Endpoints Repository]:Hostname}, since clients being in the endpoints repository is a prerequisite before they can hit this enforcement policy.  The idea was that in the enforcement policy I could have a simple rule like "Authorization:ADsource <filtername> EXISTS".  No luck there either.

     

    Now I've just got the AD source query set to (objectClass=computer) (which returns all computers from AD and fills the authorization attributes section with a lot of ugly data in access tracker), and the enforcement policy rule is "Authorization:ADSource:<filtername> EQUALS_IGNORE_CASE %{Authorization:[Endpoints Repository]:Hostname}".  This gives me the desired end result, but the pile of computer names in access tracker/auth attributes is going to bug me.

     

    So - is there a way I can use a variable in the filter query for AD to only pull results that match, for example, %{Authorization:[Endpoints Repository]:Hostname}?



  • 2.  RE: Active Directory filter query with a Clearpass variable?

    EMPLOYEE
    Posted Jun 09, 2017 02:29 PM

    You should not modify the machine filters. Those are only used with Machine Authentication. 

     

    Use this for your authentication filter:

    (&(cn=%Authorization:[Endpoints Repository]:Hostname})(objectClass=computer))

    Also just keep in mind that hostname is easily spoofed.



  • 3.  RE: Active Directory filter query with a Clearpass variable?

    Posted Jun 09, 2017 02:38 PM

    Thanks Tim,

     

    So the filter name actually has some impact on the operation of it?  I created a new AD source just for this purpose to avoid borking anything with our other AD auth services, fortunately.  I'll give this a shot, thanks!

     

    -Josh.



  • 4.  RE: Active Directory filter query with a Clearpass variable?

    Posted Jun 09, 2017 03:01 PM

    That doesn't seem to be working, it doesn't return a match when I authenticate, but when I put my hostname in the attributes tab of the filter window it returns a match from AD.

     

    Filter name: Authentication

    Filter Query: (&(objectClass=computer)(cn=%{Authorization:[Endpoints Repository]:Hostname}))

    Name: cn  Alias name: machineName  Data type: String  Enabled as: attribute.



  • 5.  RE: Active Directory filter query with a Clearpass variable?

    EMPLOYEE
    Posted Jun 09, 2017 03:03 PM
    Do you have the [Endpoints Repository] as an authorization source?


  • 6.  RE: Active Directory filter query with a Clearpass variable?

    Posted Jun 09, 2017 03:09 PM

    Yep, and it displays the correct value next to Authorization:[Endpoints Repository]:Hostname under authorization attributes in access tracker, but nothing from the AD source.  It's behaving like it doesn't yet know what the endpoints variable is when it queries AD (I do have the endpoints repository first in the list, and AD last, in case it mattered).



  • 7.  RE: Active Directory filter query with a Clearpass variable?

    EMPLOYEE
    Posted Jun 11, 2017 09:20 PM

    Make sure you have both Endpoint Repository and AD source as additional authorization sources.



  • 8.  RE: Active Directory filter query with a Clearpass variable?

    Posted Jun 13, 2017 08:24 AM

    Hi Tim,

     

    Endpoint Repository is listed under authentication sources, and all 4 sources are listed under additional authorization sources.

     

    -Josh



  • 9.  RE: Active Directory filter query with a Clearpass variable?
    Best Answer

    Posted Jun 27, 2017 02:02 PM

    I worked with TAC on this and after testing in their lab they confirmed that it doesn't work.  They offered a workaround where we set a custom attribute via our 802.1x SSID, and then leverage that in the query filter (which does seem to work) but that's not live data and isn't going to be sufficient for our needs.  I've concluded that having all of the AD computers listed under the authorization attributes section in access tracker is worth it if it means this works, and it does.



  • 10.  RE: Active Directory filter query with a Clearpass variable?
    Best Answer

    Posted Apr 05, 2018 04:34 PM

    I've finally got a working solution on this that doesn't pollute access tracker with a giant list of computers.

     

    Authentication Source:

    Active Directory: domain.com

     

    AD filter:

    (&(cn=%{Authorization:[Endpoints Repository]:Hostname})(objectClass=computer))

     

    I'm grabbing cn as machineName and userAccountControl as objectStatus, both enabled as attributes.

     

    As a role mapping rule - doesn't work, no attribute is returned:

    (Authorization:domain.com:objectStatus NOT_EQUALS 4130)
     AND  (Authorization:domain.com:machineName EXISTS ) -> TargetRole

     

    As an enforcement condition - this works!  Attributes from AD source are returned.

    (Authorization:domain.com:machineName EXISTS )
     AND  (Authorization:domain.com:objectStatus NOT_EQUALS 4130) -> TargetProfile

     

    I can't come up with a reason why this wouldn't work in the role mapping config, but I'd love to hear it if there's any known reason for this.

     

     



  • 11.  RE: Active Directory filter query with a Clearpass variable?

    Posted Aug 17, 2018 05:59 PM

    @joshcurrier

     

    Could you prehaps share some screenshots of how you constructed the AD Authentication source and filters? I'm working with a customer to achieve basically the same result whereby they would like to take the machinename from the endpoints database and search AD for that machine name. If found, apply a custom enforcement profile.

     

    My enforcement profile is configured as the following:

     

    	(Tips:Role  EQUALS  [Employee]) 
     AND  (Authorization:Active Directory - Test:machineName  EXISTS   ) 
     AND  (Authorization:Active Directory - Test:objectStatus  NOT_EQUALS  4130)	Aruba Role SecureAuthenticated AD

    The attached screenshot should detail the AD filer I'm using.

     

    AD_Filter.JPGThis however doesn't appear to be working.. And ideas here?



  • 12.  RE: Active Directory filter query with a Clearpass variable?

    EMPLOYEE
    Posted Aug 17, 2018 06:01 PM
    Hostname from DHCP should never be used for identity.


  • 13.  RE: Active Directory filter query with a Clearpass variable?

    Posted Jan 28, 2020 02:35 PM

    I agree that using the hostname name learned from DHCP is bad. I'm using the certificate provided for authentication.

     

    My filter look like this:

    (&(dNSHostName=%{Certificate:Subject-AltName-DNS})(objectClass=computer))

     

    image.png



  • 14.  RE: Active Directory filter query with a Clearpass variable?

    Posted Aug 19, 2018 11:20 AM

    I can't spot any difference between that and our configuration that should prevent it from working, sorry.  Tim's right though, hostname isn't a safe source to use for identity.  In our case I'm relying more on the SCCM MAC data and the hostname is just an extra data point to compare.  I've begun working on changing this configuration so both the MAC and hostname are validated against SCCM data and only the computer object state will be checked against AD.



  • 15.  RE: Active Directory filter query with a Clearpass variable?

    Posted Aug 20, 2018 12:20 PM

    Thanks guys!

     

    Currently CPPM is in a form of "monitoring only" mode. The real exercise here is to use CPPM to ferret our deficiencies in an alternative SQL authentication source, to be used at a later time.



  • 16.  RE: Active Directory filter query with a Clearpass variable?

    Posted Aug 20, 2018 01:16 PM

    User error. Actually, this works great!

     

    We initially didn't have many clients that were matching our specific criteria. Ha