Security

last person joined: 20 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

Clearpass API Guestmanager add a new device

This thread has been viewed 12 times
  • 1.  Clearpass API Guestmanager add a new device

    Posted Feb 17, 2017 04:20 PM

    I am currently trying to use ClearPass API to view and create new devices under GuestManager. However I am having issues with simply trying to "post" to /api/device endpoint. I am using advanced rest client in order to test

     

    Headers

    Authorization: Bearer <access token>

    Content-Type: application/json

     

    Body

    {
    "sponsor_name": "name", //same as logged in user
    "mac": "00-00-00-00-00-01",

    "username": "00-00-00-00-00-01", // explorer says to use mac
    "source":"mac_create",
    "visitor_name": "visitor name " //field used as a label in device table
    }

     

    Biggest problem is that in the API explorer all the fields say "optional" so I am not sure which ones I need to specify. 

     

    The access token is valid, I can make a "get" request to /device and see all the devices listed. When I try to post, the repsonse is 200 with no error or any responses. But when I go to  Guest > Manage Devices the device is not listed in the table. I can use the "add device" button found on that page which works as expected but cant seem to get the API to work

     

    I might be missing something simple but I am not sure what. Any help would be appreciated. 

     

    Thanks,

    Monil 



  • 2.  RE: Clearpass API Guestmanager add a new device

    EMPLOYEE
    Posted Feb 17, 2017 10:40 PM

    Below is a sample payload.

    So this will create a new device account with role ID 16, with no expiration and a device nickname of iap205h-br.

     

    {
      "enabled": true,
      "expire_time": "0",
      "mac": "000b86f5fb22",
      "notes": "",
      "role_id": 16,
      "visitor_name": "iap205h-br"
    }


  • 3.  RE: Clearpass API Guestmanager add a new device

    Posted Feb 22, 2017 01:10 PM

    The server responds with a 200 OK, but the response contains no data and no device is created.

     

    I am sending:

    HEADERS

    Authorization: Bearer <actual token>
    Content-Type:application/json

    BODY

    {
    "enabled": true,
    "expire_time": "0",
    "mac": "000b86f5fb22",
    "notes": "",
    "role_id": 13,
    "visitor_name": "iap205h-br"
    }



  • 4.  RE: Clearpass API Guestmanager add a new device

    EMPLOYEE
    Posted Feb 22, 2017 01:12 PM
    You need to adapt the payload to your environment. You likely don't have a
    role 13.


  • 5.  RE: Clearpass API Guestmanager add a new device

    Posted Feb 22, 2017 04:01 PM

    Right. I've been trying to figure out the Role ID of the Operator Profile we want to use.

    1.) Am I correct in thinking that role_id -> Operator Profile

    2.) How can I find the proper IDs to use?



  • 6.  RE: Clearpass API Guestmanager add a new device

    Posted Feb 22, 2017 04:05 PM

    also I am trying to use operator profile Device Registration, so I set up the API client with that profile and gave api access to it with no luck. I can still get a list of devices, but not create a new one through the API,

     

    not sure if I am missing a step with setting up the API client. 



  • 7.  RE: Clearpass API Guestmanager add a new device

    EMPLOYEE
    Posted Feb 22, 2017 04:09 PM
    Please describe your complete scenario or reach out to your Aruba ClearPass
    Partner.


  • 8.  RE: Clearpass API Guestmanager add a new device

    EMPLOYEE
    Posted Feb 22, 2017 04:09 PM
    Please describe your complete scenario or reach out to your Aruba ClearPass
    Partner.


  • 9.  RE: Clearpass API Guestmanager add a new device

    Posted Feb 24, 2017 01:28 PM

    just in general is there any official documentation besides the API explorer, on general setup of the API and how to use it. I've been following this link 

     

    https://community.arubanetworks.com/aruba/attachments/aruba/aaa-nac-guest-access-byod/20924/1/Using%20the%20ClearPass%20HTTP%20APIs.pdf

     

    however as you can see it says DRAFT across each page, and some some additional documentation would be nice.



  • 10.  RE: Clearpass API Guestmanager add a new device



  • 11.  RE: Clearpass API Guestmanager add a new device

    EMPLOYEE
    Posted Feb 22, 2017 04:08 PM
    For device registration, role ID is used for role based access for the
    device you're registering. Some examples include "Media Player", "Game
    Console", "Printer", "Camera", etc. You map these roles to a number in the
    [Guest Roles] role map in policy manager.


  • 12.  RE: Clearpass API Guestmanager add a new device

    EMPLOYEE
    Posted Feb 22, 2017 01:12 PM
    You need to adapt the payload to your environment. You likely don't have a
    role 13.