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

Add SameSite attribute to APM Cookies

Problem this snippet solves: This irule add SameSite attribute with value None to APM Cookies. related to Chrome 80 behavior change : Cookies default to SameSite=Lax When you put "SameSite=None...
Published Jan 30, 2020
Version 1.0
application delivery
BIG-IP Access Policy Manager (APM)
iRules
security
Yann_Desmarest's avatar
Yann_Desmarest
Icon for Cirrus rankCirrus
Joined September 11, 2012
View Profile
Lucas_Thompson's avatar
Lucas_Thompson
Icon for Employee rankEmployee
Jan 31, 2020

Thanks Yann! We've been testing with this more conservative iRule. I think this may work for some (most?) LTM+APM use cases and should execute less code less often. However, as you know APM is deployed in a lot of different ways and it's going to be hard to know for sure what the impacts are before we get bigger user populations on Chrome 80.

 

Any feedback is welcome.

 

edit: changed "Lax" to "None".

It's been brought up that this issue will also impact LTM persistence cookies, which have a much bigger use case.

 

when CLIENT_ACCEPTED {
  # This allows events to fire when APM is doing policy operations
  ACCESS::restrict_irule_events disable
}
 
when HTTP_RESPONSE_RELEASE {
  # APM cookies are set only in 302s
  if { [HTTP::status] == "302" } {
    # Make sure we have a mrhsession cookie here
    if { [HTTP::cookie exists "MRHSession"] } {
      HTTP::cookie attribute "MRHSession" insert "SameSite" "None"
    } else {
      #log local0. "No MRHSession Found"
    }
  }
}

 

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