Security

last person joined: 22 hours ago 

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

Sending COA via ClearPass API

This thread has been viewed 3 times
  • 1.  Sending COA via ClearPass API

    Posted Aug 02, 2018 06:09 PM

    I was trying to us the sample code on github, but I keep getting an empty set when try to search for the active sessions (even though the count value returned is 151).

    I pulled out the code into my script, and can reproduce the issue

    Here is the Request I'm sending:

    https://clrpass-e-1-m.its.uiowa.edu:443/api/session?filter={"mac_address":"20ab375a1c4f"}&sort=-id&offset=0&limit=1&calculate_count=true

    Here is the json I'm receiving:

    {
        "count":151,
        "_links":{
            "self":{
                "href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=0&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
            },
            "first":{
                "href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=0&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
            },
            "next":{
                "href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=1&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
            },
            "last":{
                "href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=150&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
            }
        },
        "_embedded":{
            "items":[]
        }
    }

    As you can see the items array is empty, even though the count calcuated is 151.

     

    I'm sure I'm missing something obvious, but I can't figure it out.

     

    Thanks!

     

    -Neil

     



  • 2.  RE: Sending COA via ClearPass API

    EMPLOYEE
    Posted Aug 02, 2018 06:15 PM
    If you remove the filter query, do results get returned?


  • 3.  RE: Sending COA via ClearPass API

    Posted Aug 02, 2018 06:21 PM

    It's a production network with +10K clients. When I try it without the filter, it appears the API hangs.

     

    In addition, I get the same results  using the API explorer.

     

    Thanks.

    -Neil

     



  • 4.  RE: Sending COA via ClearPass API

    Posted Aug 03, 2018 09:10 AM

    Do I need Interim accounting enabled?

     



  • 5.  RE: Sending COA via ClearPass API
    Best Answer

    EMPLOYEE
    Posted Aug 03, 2018 09:12 AM
    No. If you're seeing the sessions in the GUI under Active Sessions, the same data is available via the API. I would work with TAC to debug.


  • 6.  RE: Sending COA via ClearPass API

    Posted Aug 03, 2018 10:24 AM

    Case open. Thanks for your help!