cancel
Showing results for 
Search instead for 
Did you mean: 

SAC with Hana Analytics Adapter XSA App (HANA On-Premise) SameSite Cookie Issue

Dear SAP Community,

I have an issue with one of our customers who wants to work with the SAP Analytics Cloud.

The issue is that they can only use old Chrome/Edge Versions to open a Live Connection to the on-premise HANA DB.

They want a server-side solution so that all modern browsers can work with the SAC.

I have installed a new HANA DB (SPS05) with xsa cockpit/webide and then installed the HAA:

SAP Development Tools (ondemand.com) => xsahaa-onprem-1.6.1-XSACHAADP06_1.zip (sha1)

I was following this blog post for the setup of the user and the HAA:

From zero to Analytics pt4: Installing the HANA Analytics Adapter | SAP Blogs

We have tested the calculation views with old browsers and everything works as intended.

Trying with an up2date chrome browser yields following errors:

And in the console:

The solution to this problem is to set the SameSite to None; Secure but I could not find a way to change this parameter with the Hana Analytics Adapter App.

There are guides for other implementation methods like the internal HANA Webdispatcher:

2887651 - Issues with SameSite cookie handling - SAP ONE Support Launchpad

How to fix Google Chrome SameSite Cookie issue with SAC and HANA XS | SAP Blogs

But sadly those solutions did not work with the XSA Runtime as the same issue continues.

Example on old chromium browser:

And then the customer can select the data source to work with.

I also tried to set the COOKIES Parameter in the environment but it didn't work out - was just trying my luck!

Of Course we also considered a browser-side solution but that also didn't work out:

*Please note: As of Google Chrome and Microsoft Edge Release 91+ the option to disable these flags is no longer possible as the required flags have now been removed


Thanks in advance!

With best regards and stay safe,

Lazar Lukic

View Entire Topic
thomasyuan
Explorer

Hi Lazar,

Not sure if you have got the answer from SAP Support. But I faced the same issue and finally found the fix.

Essentially the steps for XSA is similar to CF:

SameSite Cookie Configuration for Live Data Connections - SAP Help Portal

In your case, you will first modify mtad.yml in your downloaded mtar for CORS and SameSite according to this page.

SameSite rewrite is actually handled by @sap/approuter 6.7.2+, so two steps are involved:

1. Change package.json to update dependency:

"dependencies": { "@sap/approuter": "^6.7.2" },

2. Rebuild node_modules directory using npm, because it is already mtar, so changing package.json doesn't automatically update node_modules any more.

I don't think the paramters that you were tuning will work, as apparently XS Advanced should have a different Web Dispatcher under /hana/shared/<SID>/xs/router/webdispatcher.

Hi Thomas!

I have opened a sap incident a couple of weeks ago but to this day it only went back and forth without any meaningful insight.

Your solution was the right solution! Thank you!

It was quite a challenge for me to rebuild the npm packages as I have zero experience with nodejs and the underlying structure but I managed nicely by trial and error.

For anyone needing a little bit more insight - here is a general overview of my steps:

  1. I used a ubuntu system for the steps - but I suppose you don't have to
  2. Download the HAA from the offical Downloadsite as a ZIP file
  3. Unzip it two times
  4. Find the mtad.yaml file and add the unique SAC Url and SameSite Attribute under the properties

  5. Find the package.json under approuter folder and make the change as stated by Thomas

  6. Now comes the rebuild part of the npm modules - I had to install nodejs first
    sudo apt install nodejs npm
    nodejs --version (should give you the version of your nodejs)
  7. Go the folder where your package.json is contained and execute the following command
    sudo npm install
    It should fix all required modules needed by HAA - takes a couple of minutes to complete
  8. You should see a structure like the following
    XSA HAA NPM Rebuild Structure
  9. After the npm is done - zip everything twice (the same way as you unzipped it)
  10. Yes you can use zip to make a mtar file
    zip -r new_xsa.mtar *
    The * symbol takes all files from the directory and puts it into the new_xsa.mtar file
  11. This new_xsa.mtar file you have to zip again with the META-INF folder it came with
    zip -r new_xsa.zip *
  12. This zip you can upload into your XSA via
    xs install /<path to file>/new_xsa.zip
  13. After the upload check the connection from the SAC directly:
  14. XSA HAA Microsoft Edge / Chrome Test

I hope that people find this post who are in help of the same problem.

SAP should definitly make a launchpad article about this as that was the first place I looked for a solution.

I wish you all the best Thomas!

Lazar