简体   繁体   English

SICF:如果通过 Cloud Connector 请求,为什么对 SAP REST 服务的 GET 请求会失败并显示 HTTP 403(禁止)?

[英]SICF: Why does a GET request to a SAP REST service fail with HTTP 403 (Forbidden) if requested via Cloud Connector?

Using the transaction sicf I created a REST web service that returns some data on GET.使用事务sicf ,我创建了一个 REST web 服务,该服务在 GET 上返回一些数据。 When I accessed the SAP system directly by using its IP in postman/insomnia or using the built-in test fuctionality in sicf the data are returned as expected with a HTTP status 200.当我在邮递员/失眠症中使用其 IP 或使用sicf中的内置测试功能直接访问 SAP 系统时,数据按预期返回,HTTP 状态为 200。

When I tried to GET the same data with the Cloud Connector in between as a proxy the requests fail with HTTP status 403 -- forbidden.当我尝试使用 Cloud Connector 作为代理获取相同的数据时,请求失败,HTTP 状态为 403 - 禁止。 The error message says (sorry, original is German only):错误消息说(对不起,原文只有德语):

Der Aufruf der URL wurde abgebrochen, da der entsprechende Service nicht verfügbar ist. Der Aufruf der URL wurde abgebrochen, da der entsprechende Service nicht verfügbar ist.

My own translation is "The request was cancelled because the service is unavailable."我自己的翻译是“请求被取消,因为服务不可用。”

The service has been successfully activated in sicf , otherwise the direct tests wouldn't work.该服务已在sicf中成功激活,否则直接测试将不起作用。 The path + all sub paths are whitelisted in the cloud connector.路径 + 所有子路径在云连接器中列入白名单。 There are no error logs or traces written inside the ICF. ICF 内部没有写入错误日志或跟踪。 The headers of the 403 response do not contain any useful information (like eg a required CSRF token for failing POST requests). 403 响应的标头不包含任何有用的信息(例如失败的 POST 请求所需的 CSRF 令牌)。

The cloud connector was configured to use the HTTP service port but the configuration of my service in sicf required a SSL/HTTPS connection that runs on a different port.云连接器配置为使用 HTTP 服务端口,但我在sicf中的服务配置需要在不同端口上运行的 SSL/HTTPS 连接。 Mutual adjustment of HTTP vs. HTTPS in the sicf and cloud connector configuration respectively fixed the problem. HTTP 与 HTTPS 在sicf和 cloud 连接器配置中的相互调整分别修复了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM