Forum Discussion

Luis_C__Wiedema's avatar
Luis_C__Wiedema
Icon for Nimbostratus rankNimbostratus
Nov 05, 2014

Dropdown Domain Selector on APM Logon Page

Hello Everyone!

 

I've been tasked with implementing a portal for outside vendors and third party support contractors. Building the webtop and assigning resources etc, are all relatively easy for us but we're having issues with one piece, we can't seem to figure out how to get a dropdown domain selector on the logon page. I've followed the instructions as detailed in this guide...https://devcentral.f5.com/articles/big-ip-apmcustomized-logon-page without any luck. I konw it's for version 10.x but someone mentioned in the comments that it worked for them in 11.x so I gave it a go to no avail. Can anyone recommend an article, devcentral post or any other documentation that discusses how to get this done? Unfortunately we're running version 11.4 and due to customizations in other access policies/webtops, we really don't want to upgrade to 11.5 at this time. I'm sure there's a way, I just haven't found it yet! :)

 

Thanks in advance!

 

Luis

 

7 Replies

  • Hi Luis,

     

    You said the article didn't work for you... what is the issue? Does the dropdown list not show up or does it not save the domain information?

     

    This shouldn't be very difficult to accomplish. Let us know how far you have gotten with it and we can help you finish it up.

     

    Seth

     

  • bhs_114985's avatar
    bhs_114985
    Historic F5 Account

    Hi Luis,

     

    To customize the Logon Page in 11.4

     

    1. Access Policy>Customization>Advanced>Edit Mode>Advanced>Customization Settings>Access Profiles>”Access Profile name”>Access Policy>Logon Pages>Logon Page>logon.inc

    a.Navigate to line 486

     

    b.Insert the following code edited per your requirement:

     

    ?>
          
        
           Domain
            
               carnivalnetworks.com
               cn.com
               carnivalnetworks.net
               myfselab.com
          
       
      
    
    
    Navigate up a few lines to 403 and look for the following code: 
    foreach( $fields_settings as $id=>$field_settings )
    The “if” statement below will need to be edited so the form data txt for domain is sent but not visible as a field to the user. 
    Default: if( $field_settings["type"] != "none" )
    New Code:
    Click Save Draft/Save
    
    Create the VPE Login Page Action
    In VPE navigate to the Logon Page
    Configure the Field 3 settings as per below:
    a.Type: txt
    b.Post Variable Name: domain
    c.Session Variable Name: domain
    d.Logon Page Input Field: domain
    
    Click the Branch Rules Tab
    Click Add Branch Rule
    Give it a meaningful name: carnivalnetworks domain
    Click: Change
    Click: Add Expression
    Click: Add Expression again
    Click: Advanced
    Add the following expression adjusting the name for your environment: 
    expr { [mcget {session.logon.last.domain}] == "carnivalnetworks.com" }
    (Repeat steps 9-15 for each domain to be added)
    
    Tie it all together in policy
    • Luis_C__Wiedema's avatar
      Luis_C__Wiedema
      Icon for Nimbostratus rankNimbostratus
      This is getting me closer but I'm not sure about one thing... I think you're line 486 is different than mine. Can you post a few lines above and below where this code should go? The foreach( $fields_settings as $id=>$field_settings ) is also on line 395 not 403. Not trying to be picky but for future reference for anyone else reading this. :) Thanks again, Luis
  • bhs_114985's avatar
    bhs_114985
    Historic F5 Account

    Under the first "step 4" above here is the new code:

     

     if( $field_settings["type"] != "none" && $field_settings["name"] != "domain")
  • bhs_114985's avatar
    bhs_114985
    Historic F5 Account

    Hi Luis,

     

    Trying to upload a screenshot but it isn't allowing it. Please PM me your email addr and I will send it to you along with the full document for this.

     

    Regards,

     

    Brad

     

  • Lucas_Thompson_'s avatar
    Lucas_Thompson_
    Historic F5 Account
    Please note that version 11.5.x has this feature baked in. No customization is required.