Got it to work with some help fom Tim Cappalli. Thanks Tim!
Works as explained by wifidownunder. Here's some more detail.
STEP 1
First find the active session
ActiveSession
GET /session
filter for the active session of a certain mac address:
{"mac_address": "002682d2427e","acctstoptime": {"$exists":false}}
This gives you the sessionid of the active session for said mac address.
STEP 2
Use this sessionid to
- either terminate the session:
ActiveSessionDisconnect
POST /session/{id}/disconnect
body:
{
"confirm_disconnect": true
}
- or find available coa profiles (if not the correct response here, that indicates : is feedback for the back-end something is wrong)
ActiveSessionReauthorize
GET /session/{id}/reauthorize
STEP 3
push a new user-role:
ActiveSessionReauthorize
POST /session/{id}/reauthorize
body:
{
"confirm_reauthorize": true,
"reauthorize_profile": "Aruba CoA user-role authenticated"
}
My issue with "detail": "No applicable CoA templates found" was because for unknow reasons tha csession didn't allow CoA. kicking the client of and having it reconnect resolved the issue.
Step 2 makes sure that someone in the backend knows something went wrong.. pretty important, so don't skip on it.
And if you are wondering (like me) how the heck you are supposed to figure out the {"$exists":false} for example.
Try clicking on "More about JSON filter expressions", and you'll get the following.
A filter is specified as a JSON object, where the properties of the object specify the type of query to be performed.
Description JSON Filter Syntax
No filter, matches everything {}
Field is equal to "value" {"fieldName":"value"}
{"fieldName":{"$eq":"value"}}
Field is one of a list of values {"fieldName":["value1", "value2"]}
{"fieldName":{"$in":["value1", "value2"]}}
Field is not one of a list of values {"fieldName":{"$nin":["value1", "value2"]}}
Field contains a substring "value" {"fieldName":{"$contains":"value"}}
Field is not equal to "value" {"fieldName":{"$ne":"value"}}
Field is greater than "value" {"fieldName":{"$gt":"value"}}
Field is greater than or equal to "value" {"fieldName":{"$gte":"value"}}
Field is less than "value" {"fieldName":{"$lt":"value"}}
Field is less than or equal to "value" {"fieldName":{"$lte":"value"}}
Field matches a regular expression (case-sensitive) {"fieldName":{"$regex":"regex"}}
Field matches a regular expression (case-insensitive) {"fieldName":{"$regex":"regex", "$options":"i"}}
Field exists (does not contain a null value) {"fieldName":{"$exists":true}}
Field is NULL {"fieldName":{"$exists":false}}
Combining filter expressions with AND {"$and":[ filter1, filter2, ... ]}
Combining filter expressions with OR {"$or":[ filter1, filter2, ... ]}
Inverting a filter expression {"$not":{ filter }}
Field is greater than or equal to 2 and less than 5 {"fieldName":{"$gte":2, "$lt":5}}
{"$and":[ {"fieldName":{"$gte":2}}, {"fieldName":{"$lt":5}} ]}