[英]S/4HANA Extension - Multitenancy
I'm trying out the S/4HANA extension development exercises for multi-tenancy (Week 2 - Unit 4 of this course ).我正在尝试针对多租户的 S/4HANA 扩展开发练习(本课程第 2 周 - 第 4 单元)。 I was able to setup Postman as described in the video, but when I execute
PUT tenant
after executing GET csrf token
, I get an error that says Forbidden
and do not get a status of 204
as shown in the video, but get 403
instead.我能够按照视频中的描述设置 Postman,但是当我在执行
GET csrf token
后执行PUT tenant
时,我收到一条错误消息,指出Forbidden
并且没有获得视频中所示的204
状态,而是获得403
。 Could you please let me know what I might be doing wrong here.你能不能让我知道我在这里可能做错了什么。 Many thanks.
非常感谢。
Please find attached a copy of the response received via Postman.请在附件中找到通过邮递员收到的回复的副本。 In the logs of approuter, I can see this one message stand out (but my destination seems to be set) Msg: "Error during loading of destination service credentials. Verify Destination service is bound"
在approuter的日志中,我可以看到这条消息很突出(但我的目的地似乎已设置)Msg:“加载目的地服务凭据时出错。验证目的地服务已绑定”
Could there be any other reason why I am getting a 403 Forbidden
response instead of it creating a tenant successfully?是否还有其他原因导致我收到
403 Forbidden
响应而不是成功创建租户? Any pointers to proceed would be appreciated.任何继续进行的指示将不胜感激。
Access is forbidden because the backend is again being protected by a CSRF filter - in addition to the CSRF protection which the approuter provides.访问被禁止,因为后端再次受到 CSRF 过滤器的保护 - 除了 approuter 提供的 CSRF 保护。 Likely, you will see a header
x-csrf-token: Required
in the 403 response.您可能会在 403 响应中看到一个标头
x-csrf-token: Required
。
Fo fix this, in your backend application, remove the RestCsrfPreventionFilter
in line 47 of web.xml .为了解决这个问题,在您的后端应用程序中,删除web.xml 的第 47 行中的
RestCsrfPreventionFilter
。
Background: the approuter has its own CSRF protection mechanism.背景:approuter有自己的CSRF保护机制。 By providing a CSRF token in your request, you only deal with the approuter's CSRF protection.
通过在您的请求中提供 CSRF 令牌,您只需处理 approuter 的 CSRF 保护。 If the backend is again protected against CSRF, nothing is providing a CSRF token to the backend.
如果后端再次受到 CSRF 保护,则不会向后端提供 CSRF 令牌。 Additionally, the CSRF protection on the backend is no longer necessary as you have protected the backend so that it can only be accessed via the approuter.
此外,不再需要后端的 CSRF 保护,因为您已经保护了后端,使其只能通过 approuter 访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.