简体   繁体   English

S/4HANA 扩展 - 多租户

[英]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.

相关问题 使用S / 4HANA SDK使用SalesOrderItem API - Consuming SalesOrderItem API using S/4HANA SDK SAP S / 4HANA Cloud SDK请求语言 - SAP S/4HANA Cloud SDK Request language 尝试使用S / 4HANA Cloud SDK从S / 4HANA Cloud创建包含数据源的自定义OData v2服务 - Trying to create custom OData v2 service with data source from S/4HANA Cloud using S/4HANA Cloud SDK 如何通过S / 4HANA SDK发送功能导入请求? - How to send Function Import request via S/4HANA SDK? 适用于Javascript和目标服务的S / 4HANA Cloud SDK - S/4HANA Cloud SDK for Javascript and destination service 使用S / 4HANA Cloud SDK:web.xml错误,使用来自S / 4HANA Cloud的数据源创建自定义OData v2服务 - Create custom OData v2 service with data source from S/4HANA Cloud using S/4HANA Cloud SDK: web.xml error 使用S / 4HANA Cloud SDK管道时,如何跳过功能分支构建的生产部署阶段? - How to skip Production Deployment stage for feature branch build when using S/4HANA Cloud SDK Pipeline? 无法使用Cloud SDK在S / 4Hana上通过OData查询BAPI - Can't query BAPI via OData on S/4Hana using Cloud SDK S / 4HANA Cloud SDK:com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces不存在 - S/4HANA Cloud SDK :com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces does not exist 如何在现有应用程序中使用SAP S / 4HANA Cloud SDK访问OData服务? - How do I access OData service using the SAP S/4HANA Cloud SDK in existing application?
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM