Calling access profile from VPE

I have a general access profile with default settings that assigns pools based on URI in the VPE:

/uri1 = app1

/uri2 = app2

Now, I want that /uri3 will have a different access profile with customized Settings like

“Max Sessions Per User” limit

basically, the user should hit the default access profile and switch to the customized access profile.

Is it possible to switch between access profiles within the VPE?

Thanks,

Noam.

You cannot use different ACCESS Profile based on VS. There is another question like this :

APM multiple profiles one VS

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)

Hi,

can you log this value to check if it is the same as variable apm_uuid?

[ACCESS::session data get session.assigned.uuid]

if it is different, change code with :

set apm_uuid [ACCESS::session data get session.assigned.uuid]