如何使用 Wilma PEP 代理和 IdM Keyrock 在 Orion NGSI API 中配置访问控制以实现租户隔离?

How to configure access control in Orion NGSI API for tenant isolation using Wilma PEP Proxy and IdM Keyrock?

我想在 Orion Context Broker NGSI API 级别提供访问控制以确保真正的数据隔离。我想确保一个租户只能 query/update 他们的上下文,而不是另一个租户的上下文。

为此,我开始放置 Wilma PEP Proxy in front of Orion Context Broker. Then I configured my own Identity Manager keyrock GE instance based on official IdM Keyrock docker image and my own Authorization PDP GE based on official AuthzForce docker 图片的实例。

经过几天的配置和多次尝试,我终于可以让这三个安全通用启用程序正常工作,使用 PEP 代理对 Orion Context Broker NGSI API 的请求进行身份验证和授权2级.

但是2级授权并不能保证我想要的,因为服务(租户)和子服务(应用路径)信息在请求的headers中。特别是在 Fiware-Service 和 Fiware-Service 路径 headers 中。为了构建 header-based 授权策略,您需要使用 级别 3:XACML 授权。

问题是我在 Fiware 的官方文档中进行了一些挖掘,但找不到 XACML 策略的任何示例。除了 Wilma PEP Proxy 的官方文档(参见 here)之外,您可能需要修改 PEP Proxy 源代码才能获得此级别的授权。

As this case is thought to check advanced parameters of the request such us the body or custom headers, it depends on the specific use case. So the programmer should modify the PEP Proxy source code in order to include the specific requirements.

这可能吗?

我真的必须修改 PEP 代理源代码来实现像租户只能访问他的数据这样简单的事情吗?

很好的问题。有替代的 GE 可以完美地支持您所指的用例。请查看此演示文稿

https://es.slideshare.net/FI-WARE/building-your-own-iot-platform-using-fiware-geis

谢谢,最好的