F5 Sites
  • F5.com
  • F5 Labs
  • MyF5
  • NGINX
  • Partner Central
  • Education Services Portal (ESP)
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
GroupsEventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

Webtop Return Without Reauthentication

Problem this snippet solves: By default if you hit "/" on a VS with a webtop assigned it will terminate the session and require reauthentication. This iRule will cause the user hitting "/" to be red...
Published Mar 06, 2017
Version 1.0
application delivery
BIG-IP Access Policy Manager (APM)
iRules
saml
security
SSO
Graham_Alderso1's avatar
Graham_Alderso1
Ret. Employee
Joined May 22, 2019
View Profile
Stanislas_Piro2's avatar
Stanislas_Piro2
Icon for Cumulonimbus rankCumulonimbus
Oct 23, 2017

Graham,

session.policy.result.start_uri
variable contains the webtop URL used after authentication. you can use it instead of recreating it!

this code also include multi-domain support.

when HTTP_REQUEST {
    if { ( [set MRHSession_cookie [HTTP::cookie value "MRHSession"]] ne "" ) and ( [ACCESS::session exists -state_allow $MRHSession_cookie] ) } then {
        if { [HTTP::uri] equals "/" && ([set start_uri [ACCESS::session data get -sid $MRHSession_cookie "session.policy.result.start_uri"]] ne "")} {
            if {![PROFILE::access domain_mode] || [URI::host [PROFILE::access primary_auth_service]] equals [HTTP::host]} {
            HTTP::redirect $start_uri
            }
        }
    }
}

Help guide the future of your DevCentral Community!

What tools do you use to collaborate? (1min - anonymous)

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesTraining & Certification

SUPPORT

Manage SubscriptionsProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information