子租户 REST 终结点的微服务下标不起作用



>我在主租户上部署了我的微服务,并将其下标到子租户。

如果我打电话: 获取 https://subtenant.cumulocity.com/service/mymicroservice/health 我得到状态代码 200 及以上

但是,如果我打电话: 获取 https://subtenant.cumulocity.com/service/mymicroservice/myendpoint/data 我收到状态代码 500 并且

{
"timestamp": 1534235792950,
"status": 500,
"error": "Internal Server Error",
"exception": "com.cumulocity.sdk.client.SDKException",
"message": "Http status code: 403n{error="security/Forbidden",message="Access is denied",info="https://www.cumulocity.com/guides/reference-guide/#error_reporting",details="null"}",
"path": "/ mymicroservice /data"

}

当我订阅主租户时,微服务工作正常!似乎不允许子租户的用户访问积云 API...我还检查了用户和角色。访问权限全部授予。如何在子租户上访问我的微服务?

我自己解决了这个问题。我犯了一个错误;我忘了将清单中的角色添加到必需角色。它在主租户中也不起作用。

最新更新