WSO身份服务器,使用权限创建服务提供商不起作用

时间:2018-03-15 12:50:55

标签: permissions wso2 wso2carbon

我在创建具有权限的新服务提供程序时遇到以下异常,以下是其代码的一部分。

iManagementServiceStub = new IdentityApplicationManagementServiceStub();
iManagementServiceStub.createApplication(createApplication);

以下是我在客户端的例外情况。

  

identity.IdentityApplicationManagementServiceIdentityApplicationManagementException:存储应用程序sp3的权限时出错   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  在java.lang.reflect.Constructor.newInstance(Constructor.java:422)
  at identity.IdentityApplicationManagementServiceStub.createApplication(IdentityApplicationManagementServiceStub.java:1007)
  在identity.AddServiceProvider.main(AddServiceProvider.java:92)

以下是服务器端的例外情况。

  

引起:org.wso2.carbon.registry.core.exceptions.RegistryException:路径'/_system/governance/permission/applications/sp3/org.wso2.carbon.identity.application.common.model.ApplicationPermission@ 12809798'包含一个或多个非法字符(〜!@#;%^ *()+ = {} | \<>“',)   在org.wso2.carbon.registry.core.jdbc.Repository.put(Repository.java:262)   在org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put(EmbeddedRegistry.java:717)   在org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put(CacheBackedRegistry.java:591)   在org.wso2.carbon.registry.core.session.UserRegistry.putInternal(UserRegistry.java:828)   在org.wso2.carbon.registry.core.session.UserRegistry.putInternal(UserRegistry.java:796)   在org.wso2.carbon.registry.core.session.UserRegistry.access $ 900(UserRegistry.java:61)   在org.wso2.carbon.registry.core.session.UserRegistry $ 10.run(UserRegistry.java:786)   在org.wso2.carbon.registry.core.session.UserRegistry $ 10.run(UserRegistry.java:783)   at java.security.AccessController.doPrivileged(Native Method)   在org.wso2.carbon.registry.core.session.UserRegistry.put(UserRegistry.java:783)   在org.wso2.carbon.identity.application.mgt.ApplicationMgtUtil.storePermissions(ApplicationMgtUtil.java:299)   ......还有64个

请建议。

1 个答案:

答案 0 :(得分:0)

在分析错误日志时,您可以看到您的许可中存在非法字符。

Caused by: org.wso2.carbon.registry.core.exceptions.RegistryException: The path '/_system/governance/permission/applications/sp3/org.wso2.carbon.identity.application.common.model.ApplicationPermission@12809798' contains one or more illegal characters (~!@#;%^*()+={}|\<>"',)

请检查权限名称。基本上这些特征是保留的并具有特定用途。所以你不能在其他地方使用它们而不用编码它们[1]。

[1] https://en.wikipedia.org/wiki/Percent-encoding