Java 禁用REST安全性和身份验证-Websphere Commerce
我想访问订阅的其余部分 比如,Java 禁用REST安全性和身份验证-Websphere Commerce,java,rest,jsp,websphere-commerce,Java,Rest,Jsp,Websphere Commerce,我想访问订阅的其余部分 比如, /store/{storeId}/subscription?q=byBuyerIdAndSubscriptionType 参考: 但是,如果我在其他用户登录时显式地将订阅购买者的member_id传递给REST调用,它会给我身份验证错误,并且不会返回任何内容 User 2581 does not have the authority to perform action "Display" on resource "com.ibm.commerce.subscri
/store/{storeId}/subscription?q=byBuyerIdAndSubscriptionType
参考:
但是,如果我在其他用户登录时显式地将订阅购买者的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}/
我还没有验证上面这一行,但我非常确定您的问题的解决方案在于配置wc-rest-security.xml文件。链接到IBM文档:您不应该这样做。原因很明显 您不应允许访问其他用户的订阅数据。如果您试图实现的是允许特定用户访问其他用户的数据(例如CSR),那么您需要通过访问控制策略和适当的用户角色来解决这一问题
store/{storeId}/