DAP LUA match ipad device unique id to cert

Hi,
I am trying to configure a DAP policy using LUA to perform a check that a cert has not been moved. I cert has been configured to store the ipads device unique id in the subject cn field, which i have verified on the device. I have configured the following LUA statement but i am not getting a match:
EVAL(endpoint.anyconnect.deviceuniqueid, "NE", endpoint.certificate.user[“0”].subject_cn, "caseless")
Is this check posssible with ipads?
Thank you.

So in the end I had the same problem with this script.  Never really fixed it but did workaround with that script by making local match_valueX for X number of certs you think folks will have in the their store.  So most people won't have 64....but really you could cut and paste to any number you like.
assert(function()
local match_pattern = endpoint.device.hostname..".domain.com"
local match_value0 = endpoint.certificate.user["0"].subject_cn
local match_value1 = endpoint.certificate.user["1"].subject_cn
local match_value2 = endpoint.certificate.user["2"].subject_cn
if match_pattern==match_value0 then
return true
elseif match_pattern==match_value1 then
return true
elseif match_pattern==match_value2 then
return true
else
return false
end
end ) ()
Another option is to do a username to mapping from certificate script that simply
returns cert.subject.cn "/" cert.subject.ou (where the UDID was populated)
And the use a DAP to parse to verify anyconnect deviceuniqueid and aaa.cisco.username match (ie the UDID from anyconnect and what is in the cert)
assert function ()
local match_pattern = endpoint.anyconnect.deviceuniqueid
local match_value = aaa.cisco.username
if (type(match_value) == "string") then
if (string.find(match_value, match_pattern) ~= nil) then
return false
end
elseif (type(match_value) == "table") then
local k,v
for k,v in pairs(match_value) do
if (string.find(v, match_pattern) ~= nil) then
return false
end
end
end
return true
end) ()

Similar Messages

Maybe you are looking for

  • Update PS CC stalling at "99% complete"

    After trying to update PS CC, the computer is stalling at "99% complete" with the message "Update Progress - Currently Updating Adobe CSXS Infrastructure 4..." My system is Windows 7 Soren

  • DB + grid upgrade from 11.2.0.1 to 11.2.0.3 with EBS 12.1.3

    HI i am planning to upgrade oracle RAC DB and clusterware from 11.2.0.1 to 11.2.0.3 a little about my existing architecture EBS 12.1.3 on 2 node application tier and 2 node RAC DB OS RHEL 5 64-bit please help me on its documentation as i am not able

  • External Hard Disk not showing up on Finder

    Hi My HP Pocket Media Drive (USB), when plugged into my MacBook, does not show up on the Finder, even though it shows up on System Profiler. It only shows up on Disk Utility in certain occasions (such as after shutting down and starting up again). I

  • Can't Find File/Dir info  Error 3 :: 30 and (-43)

    Please help me with this issue. There's very little previous mention anywhere about this sort of problem. I'm trying to open an After Effects file that I haven't opened in a while, and the footage I used in the project has since been deleted. When I

  • How to unlock a carrier locked iPad 1?

    I have a iPad that was bought on contract on Orange. I have a 3 sim and when I try it, I get a message in iTunes "The Sim card inserted in this iPad does not appear to be supported" I am guessing it is carrier locked, I have found a few people on the