简体   繁体   English

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

[英]Disable REST security and authentication- Websphere Commerce

I want to access Subscription's REST, 我要访问订阅的REST,

For instance ; 例如 ;

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

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

but if I explicitly pass member_id of the buyer of subscription to the REST call on some other user's login, it gives me authentication error and doesn't return anything. 但是,如果我在其他用户的登录名上明确地将订阅购买者的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".

What should I do to byPass this authentication and get desired data? 我应该怎么做才能通过此身份验证并获取所需的数据?

You could try giving this line in your wc-rest-security.xml file. 您可以尝试在wc-rest-security.xml文件中提供这一行。

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

You could also be specific and mention 您也可以具体提及

store/{storeId}/subscription

instead of 代替

store/{storeId}/

I haven't verified the above line, but I am pretty sure the solution to your issue lies in configuring the wc-rest-security.xml file. 我还没有验证上面的行,但是我很确定解决您问题的方法在于配置wc-rest-security.xml文件。 Link to the IBM Documentation on this : https://www-01.ibm.com/support/knowledgecenter/SSZLC2_8.0.0/com.ibm.commerce.webservices.doc/tasks/twvrestpartialauth.htm 链接到此的IBM文档: https : //www-01.ibm.com/support/knowledgecenter/SSZLC2_8.0.0/com.ibm.commerce.webservices.doc/tasks/twvrestpartialauth.htm

You shouldn't. 你不应该 For obvious reasons. 出于明显的原因。

You should not allow access to other users' subscription data. 您不应允许访问其他用户的订阅数据。 If what you're trying to accomplish is to allow specific users access to other users' data (eg a CSR), then you need to solve this through access control policies and appropriate user roles. 如果您要完成的工作是允许特定用户访问其他用户的数据(例如CSR),那么您需要通过访问控制策略和适当的用户角色来解决此问题。

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

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