繁体   English   中英

禁用REST安全性和身份验证-Websphere Commerce

[英]Disable REST security and authentication- Websphere Commerce

我要访问订阅的REST,

例如 ;

/store/{storeId}/subscription?q=byBuyerIdAndSubscriptionType

参考: https : //www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.starterstores.doc/code/rsm_subscription_fep8.htm? lang =en

但是,如果我在其他用户的登录名上明确地将订阅购买者的member_id传递给REST调用,则会给我带来身份验证错误,并且不会返回任何内容。

User 2581 does not have the authority to perform action "Display" on resource "com.ibm.commerce.subscription.facade.server.authorization.SubscriptionTypeProtectableProxy" for command "Display".

我应该怎么做才能通过此身份验证并获取所需的数据?

您可以尝试在wc-rest-security.xml文件中提供这一行。

<partialAuthentication resource="store/{storeId}/" method="GET" enabled="false"/>

您也可以具体提及

store/{storeId}/subscription

代替

store/{storeId}/

我还没有验证上面的行,但是我很确定解决您问题的方法在于配置wc-rest-security.xml文件。 链接到此的IBM文档: https : //www-01.ibm.com/support/knowledgecenter/SSZLC2_8.0.0/com.ibm.commerce.webservices.doc/tasks/twvrestpartialauth.htm

你不应该 出于明显的原因。

您不应允许访问其他用户的订阅数据。 如果您要完成的工作是允许特定用户访问其他用户的数据(例如CSR),那么您需要通过访问控制策略和适当的用户角色来解决此问题。

暂无
暂无

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

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