Developer

last person joined: 7 days ago 

Expand all | Collapse all

Getting dot1x error when creating WLAN via api call

This thread has been viewed 1 times
  • 1.  Getting dot1x error when creating WLAN via api call

    Posted Feb 20, 2019 04:31 AM
      |   view attached

    Hi Team,

     

    I am getting the following error when I try to create WLAN via API call:

     

    Error: dot1x profile needs to be enabled in aaa profile to support opmode, ssid profile referring this is :vssid123

     

    Scenario: First I created WLAN named vssid123 manually on the aruba wireless controller with security as open. Now I am trying to update the WLAN and trying to change the security to personal(setting a password) using API call.

     

    Sample code:

    $sessionId = createSession();
    $ssid = '{
    "profile-name": "vssid123",
    "ssid_enable": {},
    "essid": {
    "essid": "vssid123"
    },
    "wpa_passphrase": {
    "wpa-passphrase": "secretPSK5"
    },
    "opmode": {
    "wpa2-psk-aes": true
    }
    }';
    //add ssid profile
    $url = 'https://113.x.x.x:7707/v1/configuration/object/ssid_prof?config_path=%2Fmm%2Fmynode&UIDARUBA='.$sessionId;

     

    I am getting the same error using the swagger as well.

     

    Any suggestions?

     

    Thanks,

    Amardeep

     



  • 2.  RE: Getting dot1x error when creating WLAN via api call

    MVP GURU
    Posted Feb 20, 2019 08:21 AM

    Hi,

     

    it is like the GUI !

    You need to specifiy a dot1x profile to your AAA Profile before set a PSK (there is a default dot1x-wpa if remenber for this)



  • 3.  RE: Getting dot1x error when creating WLAN via api call

    Posted Feb 20, 2019 09:11 AM

    Ok.

     

    But in the API calls for creating WLAN we make the first call to ssid_prof object where we can't set this attribute. The second call is made to the virtual_ap object where we cann add this attribute.

     

    I am getting the error in the response to the first call to ssid_prof object.

     

    Thanks



  • 4.  RE: Getting dot1x error when creating WLAN via api call

    MVP GURU
    Posted Feb 20, 2019 02:40 PM

    it don't create already the VirtualAP profile ?



  • 5.  RE: Getting dot1x error when creating WLAN via api call

    EMPLOYEE
    Posted Feb 26, 2019 07:29 PM


  • 6.  RE: Getting dot1x error when creating WLAN via api call
    Best Answer

    EMPLOYEE
    Posted Feb 26, 2019 07:48 PM

    Hi,

     

    As mentioned by alagoutte, you will need to create a dot1x authentication profile and add it to a AAA profile for converting an open ssid to a PSK ssid.

    Find the API call below, for converting to a PSK ssid:

    Method:

    POST

     

    URL:

    $url = 'https://113.x.x.x:7707/v1/configuration/object?config_path=%2Fmm%2Fmynode&UIDARUBA='.$sessionId;

     

    Request Body (JSON): Multiple Endpoints

    {
    "ssid_prof": [{
    "profile-name": "vssid123",
    "ssid_enable" : {},
    "essid": {
    "essid": "vssid123"
    },
    "wpa_passphrase": {
    "wpa-passphrase": "secretPSK5"
    },
    "opmode": {
    "wpa2-psk-aes": true
    }
    }],

    "dot1x_auth_profile": [{
    "profile-name": "vssid123"
    }],

    "aaa_prof": [{
    "profile-name": "vssid123",
    "dot1x_auth_profile": {
    "profile-name": "vssid123"
    }
    }],
    "virtual_ap": [{
    "profile-name": "vssid123",
    "aaa_prof": {
    "profile-name": "vssid123"
    },
    "vlan": {
    "vlan": "1"
    },
    "ssid_prof": {
    "profile-name": "vssid123"
    }
    }],
    "ap_group": [{
    "profile-name": "default",

    "virtual_ap": [{
    "profile-name": "vssid123"
    }]
    }]
    }

     

    Note:

    - Multiple endpoints are hit in the same api call like ssid_prof, do1x_auth_prof, aaa_prof, virtual_ap, ap_group to create/edit various profiles

    - Only ssid_prof, dot1x_auth_profile and aaa_prof are needed to achieve the desired result, however virtual_ap and ap_group are added in case you need it

    - Change vlan and ap-group name in the request body as applicable

     

    Regards,

    Jay