Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  How to set samesite attribute to icn generated cookies

    Posted Fri November 20, 2020 08:18 AM

    Hi, I have a requirement where i need to set samesite attribute to content navigator cookie.

    I set the following attribute on ihs conf file and was able to set samesite attribute to jsessionid.

    Header edit Set-Cookie (.*) "$1; SameSite=None; Secure"

    However, for ICN generated cookies like bidi_support_flag and icn_locale cookies samsite attribute is not being set. Can any icn resource suggest on how to set the attribute to icn generated cookies.

    Thanks,

    Amit



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: How to set samesite attribute to icn generated cookies
    Best Answer

    Posted Fri November 20, 2020 09:07 AM

    Hi Amit,

    You may set SameSite cookie from Websphere. I found a technote https://www.ibm.com/support/pages/node/6229754 that might help.

    Regards,

    Angie



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: How to set samesite attribute to icn generated cookies
    Best Answer

    Posted Fri November 20, 2020 09:50 AM

    Hi Angie,


    I tried all the settings in the technote. But none of them worked. Even the websphere version is 9.0.5.4. Can you please check from your side and let me know.


    Thanks and Regards,

    Amit



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: How to set samesite attribute to icn generated cookies
    Best Answer

    Posted Fri November 20, 2020 09:54 AM

    Hi Amit,

    ICN does not set Samesite cookie. You may consult with Websphere team on this.

    Regards,

    Angie



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 5.  RE: How to set samesite attribute to icn generated cookies
    Best Answer

    Posted Tue December 15, 2020 04:22 PM

    Hi Angie,


    The websphere settings workfor normal session cookies are they are set correctly. However, cookies like bidi_support_flag and icn_locale cookies are set by icn and any setting in websphere doesnt work.

    Can a plugin be used to set the samesite for all the icn generated cookies like above?


    Thanks,

    Amit



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 6.  RE: How to set samesite attribute to icn generated cookies
    Best Answer

    Posted Thu December 17, 2020 03:42 AM

    Hi Amit,

    You may set samesite for icn generated cookies via a plugin. Overwrite the ecm.widget.dialog.ChangeLocaleDialog._onSave() function like below in your plugin JS.

    ChangeLocaleDialog.prototype._onSave = function() { // >>>>>> copy code from ICN and add SameSite: "None" to cookie var selectedLanguageLocale = this._languageLocale.get("value"); if (selectedLanguageLocale) { var locale = this._getLocaleWithDash(selectedLanguageLocale); // change from _ in locale to - cookie(ecm.model.Desktop.cookieLocaleLanguage, locale, { expires: new Date(2035, 0, 1), SameSite: "None" }); } ...

    Regards,

    Angie



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration