Hi,
you can use this irule.
when ACCESS_POLICY_COMPLETED {
if {([ACCESS::policy result] equals "allow") && [set maxSession [ ACCESS::session data get session.custom.maxSession ]] } {
set apm_uuid "[PROFILE::access name].[ACCESS::session data get session.logon.last.username]"
set apm_cookie_list [ ACCESS::uuid getsid $apm_uuid ]
if {[llength $apm_cookie_list] > $maxSession} {
set apm_oldestid [ lindex $apm_cookie_list 0 ]
ACCESS::session remove -sid $apm_oldestid
}
}
}
The max session value must be set in variable
session.custom.maxSession
the irule will have the same behavior as the default option, remove the oldest session with same uuid (username authenticated on the current profile)