Universal-Inves
Mar 28, 2018Nimbostratus
iRule for APM Ressource Assignment
Hello,
we use our F5 as a gateway for RDP sessions. We have a logon page, a radius authentication and then an Advanced Resource Assign to assign the RDP session. Every user has a different RDP connection. I have configured this via VPE and it works.
Now over 200 users should be added and this is wasteful over VPE. That's why I'm writing an iRule to solve the resource assignment.
In the Advanced Ressource Assign I only assign a webtop.
My iRule:
when ACCESS_POLICY_AGENT_EVENT {
switch [ACCESS::policy agent_id] {
"do_something" {
set username [ACCESS::session data get session.logon.last.username]
set domain "xxx"
set terminalrdp "/Common/Terminalserver-RDP-pool"
set c2123 "/Common/C2123"
set c2124 "/Common/C2124"
if {$username contains "Testuser"} {
ACCESS::session data set session.logon.last.domain $domain
ACCESS::session data set session.assigned.resources.rd $terminalrdp
}
if {$username == "UserX"} {
ACCESS::session data set session.assigned.resources.rd $c2123
}
if {$username == "UserY"} {
ACCESS::session data set session.assigned.resources.rd $c2124
}
}
}
}
But this doesn´t work as expected and I hope someone can help me. Maybe there is a simpler and better solution for the problem.