一、问题复现:
1.当打开SAP磁贴后,提示错误信息:
2.提示错误信息如下:
二、解决办法:
一、首选解决方案:
1.更新当前系统kernel和WDP代理服务器(或者IDP的跨域cookie设置)
2.设置如下参数值:
icm/HTTP/samesite = None
二、备用解决方案:
使用修改规则添加SameSite属性:
1.检查系统当前内核版本:T-code:SM51
2.确定当前版本内核为773:
3.登录Linux系统,进入到目录:/sapmnt/<SID>/profile/设置一个文件rule_file,同时修改访问权限:
chown <sid>adm:sapsys rule_file
4.将如下代码,粘贴到rule_file文件中:
SetHeader sap-ua-protocol ""
if %{HEADER:clientprotocol} stricmp http [OR]
if %{HEADER:x-forwarded-proto} stricmp http [OR]
if %{HEADER:forwarded} regimatch proto=http
begin
SetHeader sap-ua-protocol "http"
end
if %{HEADER:clientprotocol} stricmp https [OR]
if %{HEADER:x-forwarded-proto} stricmp https [OR]
if %{HEADER:forwarded} regimatch proto=https
begin
SetHeader sap-ua-protocol "https"
end
if %{HEADER:sap-ua-protocol} strcmp "" [AND]
if %{SERVER_PROTOCOL} stricmp https
begin
SetHeader sap-ua-protocol "https"
end
if %{RESPONSE_HEADER:set-cookie} !strcmp "" [AND]
if %{HEADER:sap-ua-protocol} stricmp https [AND]
if %{HEADER:user-agent} regmatch "^Mozilla" [AND]
if %{HEADER:user-agent} !regmatch "(Chrome|Chromium)/[1-6]?[0-9]\." [AND]
if %{HEADER:user-agent} !regmatch "(UCBrowser)/([0-9]|10|11|12)\." [AND]
if %{HEADER:user-agent} !regmatch "\(iP.+; CPU .*OS 12_.*\) AppleWebKit\/" [AND]
if %{HEADER:user-agent} !regmatch "\(Macintosh;.*Mac OS X 10_14.*(Version\/.* Safari.*|AppleWebKit\/[0-9\.]+.*\(KHTML, like Gecko\))$"
begin
RegIRewriteResponseHeader set-cookie "^([^=]+)(=.*)" "$1$2; SameSite=None; Secure"
RegIRewriteResponseHeader set-cookie "^([^=]+)(=.*; *SameSite=[a-zA-Z]+.*); SameSite=None; Secure" $1$2
RegIRewriteResponseHeader set-cookie "^([^=]+)(=.*; *Secure.*); Secure" $1$2
end
5.保存并返回。
6.在Linux后台打开DEFAULT.PLF文件,找到如下参数:
icm/HTTP/mod_1 = PREFIX=/,FILE=/sapmnt/<SID>/profile/rule_file
设置如上新的mod参数,并在FILE中添加设置的文件路径和文件位置所在。
7.保存&重启SAP应用服务器。
8.设置规则集完成。
三、注意事项
针对Samesit Cookie问题,如若内核版本已经高于749.则参数可以直接通过SMICM中的参数设置secure为None值。如若内核版本过低,则可以考虑配置规则集的方式去缓释samesit cookie的问题。
但是,官方明确给出答复:强烈建议提升当前系统的内核版本。此处,仁者见仁智者见智。
另外,如若按照如上设置并未解决当前问题,则还需要考虑IAM系统的配置与单点登录。
四、参考KBA
2887651 - Issues with SameSite cookie handling
2959070 - Fiori: Logon with URL parameter not possible logon cookie is missing
2893546 - SameSite support in SAP Web Dispatcher and ICM