标签: fiware

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

我想在 Orion Context Broker NGSI API 级别提供访问控制,以确保真正的数据隔离。我想确保租户只能查询/更新他们的上下文,而不能查询/更新其他租户的上下文。

为此,我开始在 Orion Context Broker 前面放置一个Wilma PEP Proxy实例。然后,我根据官方IdM Keyrock docker映像配置了自己的 Identity Manager keyrock GE 实例,并根据官方AuthzForce docker 映像配置了自己的 Authorization PDP GE 。

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

但是,2 级授权不足以保证我想要的,因为服务(租户)和子服务(应用程序路径)信息都在请求的标头中。特别是在Fiware-Service 和Fiware-ServicePath 标头中。为了构建基于标头的授权策略,您需要使用级别 3:XACML 授权。

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

由于这种情况被认为是检查请求的高级参数,例如正文或自定义标头,因此这取决于具体的用例。因此,程序员应该修改 PEP 代理源代码以包含特定要求。

有这样可能吗?

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

authorization fiware-orion fiware fiware-wilma authzforce

5
推荐指数
1
解决办法
337
查看次数

如何在创建VM实例后扩展默认分区?

我使用FI-WARE云创建了一个带有12GB磁盘的Centos x64 VM实例.我可以访问它没有问题,我已经开始安装软件.但是,默认创建的分区/ dev/vda1只有5GB,我已经填充了它.我想知道如何扩展分区以使用完整的磁盘.

谢谢,

virtual-machine fiware

3
推荐指数
1
解决办法
2400
查看次数

如何配置系统以使用FIWARE yum存储库?

我知道FI-WARE在http://repositories.testbed.fiware.org/上提供了一个公共yum存储库,可用于安装FI-WARE软件包,如Orion contexto Broker.

但是,如何配置我的系统以使用该存储库?例如,我需要在/etc/yum.repos.d/目录中添加哪个.conf文件才能使其正常工作.

谢谢!

yum fiware filab

3
推荐指数
1
解决办法
3870
查看次数

即使使用管理员权限,Keyrock 也不接受用户

我创建了两个用户,管理员,具有管理员权限,另一个用户,现在也具有管理员权限,但最初是社区(我将将此帐户称为社区)。

我已向社区用户注册了一个应用程序,并稍后关联了管理员。作为callbackUrl,我已在我的 keyrock 实例中注册了以下地址

<keystone ip>:/oauth2/token 
Run Code Online (Sandbox Code Playgroud)

我要获取 oauth2 的请求如下,它使用https://raw.githubusercontent.com/Bitergia/fiware-chanchan-docker/master/images/pep-wilma/4.3.0/auth-token.sh作为指导方针。我更改了用户、通行证、主机、客户端 ID 和应用程序密钥

curl -s --insecure -i --header "Authorization: Basic NmJjODMyMWMzNDQwNGVlYzkwYzNhNzhlYTU0ZTE2NjY6M2YwMzQyZjE4ZTM1NGI0ZDg5YjhlYWVkNTZmNGI5Mjc=" --header "Content-Type: application/x-www-form-urlencoded" -X POST http://<keyrock IP>/oauth2/token -d 'grant_type=password&username=<user>&password=<pass>&client_id=<clientID>&client_secret=<secret>'
Run Code Online (Sandbox Code Playgroud)

请求到达 keystone 并回复 404(未找到访问令牌)。

当我尝试从 keyrock 为管理员和社区获取 oauth2 令牌时,它说

Error: Root - User access-token not authorized
Run Code Online (Sandbox Code Playgroud)

我可以用两个用户登录 Horizo​​n。

为了从 idm 获取 oauth2 令牌,我错过了什么?

编辑:用于创建用户的代码:

users_default_pass = '...'
user0 = _register_user(keystone,"user0",passwd=users_default_pass)
keystone.roles.grant(user=user0.id,role=keystone.roles.find(name='community'), project=user0.default_project_id)
Run Code Online (Sandbox Code Playgroud)

Edit2:原始响应和来自使用 tcpflow 捕获的 keystone 的响应

要求:

POST /oauth2/token HTTP/1.1
User-Agent: curl/7.35.0
Host: 130.206.118.xxx:5000
Accept: */*
Authorization: …
Run Code Online (Sandbox Code Playgroud)

keystone fiware

3
推荐指数
1
解决办法
711
查看次数

NGSI-LD 和 JSON-LD 有哪些区别?

在 Fiware 教程中,我读到 NGSI-LD 不是 100% JSON-LD。你能解释一下有哪些区别吗?

fiware

3
推荐指数
1
解决办法
1202
查看次数

在Fi-lab上访问VM

我正在接受培训,以熟悉Fi-Ware云服务.我可以创建蓝图模板和实例,但我无法在SSH或Connect to VM显示中访问.我已经启动并运行了服务器,我可以看到Apache的"它的工作原理"页面.我遇到的问题是:

  1. 使用SSH我不知道我必须使用什么凭证,我尝试使用我的Fi-Ware凭证,但服务器总是向我显示"访问被拒绝"
  2. 连接到VM显示它永远不会出现登录界面.有一些教程,我可以看到如何执行它的示例或详细的文档如何在蓝图实例中配置和访问?

fiware filab

2
推荐指数
1
解决办法
1972
查看次数

axios.post 导致错误请求 - grant_type:'client_credentials'

我的 axios POST 方法无法正常工作。虽然调用语法似乎是正确的,但我想在我的具体案例中存在一些根深蒂固的问题。我正在尝试使用 grant_type=client_credentials 获取访问令牌,使用对固件 IDM 服务器的 POST 请求。调用结果为400: bad request

curl 命令效果很好。当我使用简单的 http 请求时,似乎存在 CORS 违规,因此我切换到使用 node.js。我通过在单独的正文中发送数据来尝试 axios,它也不起作用,然后有人建议使用 axios.post 在呼叫中发送数据,它也以同样的问题结束。注意:grant_type=password然而,我尝试过,也遇到了同样的命运。

axios.post('https://account.lab.fiware.org/oauth2/token',{ 
'grant_type':'client_credentials'},{
headers: 
{
'Content-Type':'application/x-www-form-urlencoded',     
'Authorization': 'Basic xxxx'   
}

}).then((response) => {
    console.log(response);
    }).catch((error) =>{
    console.log(error.response.data.error);
    })
Run Code Online (Sandbox Code Playgroud)

我希望获得访问令牌,但是,我收到错误 400,如下所示:

{ message: 'grant_type missing in request body: {}',
code: 400,
title: 'Bad Request' }
Run Code Online (Sandbox Code Playgroud)

post node.js oauth-2.0 fiware axios

2
推荐指数
1
解决办法
5003
查看次数

错误:池与此地址空间上的其他池重叠

我正在尝试实施本教程。“docker-compose”内容是这样的:

 # WARNING: Do not deploy this tutorial configuration directly to a production environment
#
# The tutorial docker-compose files have not been written for production deployment and will not 
# scale. A proper architecture has been sacrificed to keep the narrative focused on the learning 
# goals, they are just used to deploy everything onto a single Docker machine. All FIWARE components 
# are running at full debug and extra ports have been exposed to allow for …
Run Code Online (Sandbox Code Playgroud)

docker fiware-orion fiware docker-compose

2
推荐指数
1
解决办法
1万
查看次数

在lubuntu 15.04上建造Kurento

我正在尝试在我的lubuntu 15.04上构建整个Kurento(与ubuntu 15.04相同,生动,具有不同的UI).我开始克隆所有回购:

mkdir kurento
cd kurento

git clone  https://github.com/Kurento/kms-jsonrpc.git
git clone https://github.com/Kurento/kurento-module-creator.git
git clone https://github.com/Kurento/kms-filters.git
git clone https://github.com/Kurento/kms-core.git
git clone https://github.com/Kurento/kms-elements.git
git clone https://github.com/Kurento/adm-scripts.git
git clone https://github.com/Kurento/kms-cmake-utils.git
git clone https://github.com/Kurento/kms-crowddetector.git
git clone https://github.com/Kurento/kms-pointerdetector.git
git clone https://github.com/Kurento/kms-platedetector.git
git clone https://github.com/Kurento/kurento-media-server.git
git clone https://github.com/Kurento/kms-plugin-sample.git
git clone https://github.com/Kurento/kms-opencv-plugin-sample.git
Run Code Online (Sandbox Code Playgroud)

然后安装kms-cmake-utils:

cd kms-cmake-utils
mkdir build
cd build
cmake ..
make install
Run Code Online (Sandbox Code Playgroud)

好的,它在cmake模块目录中安装了一堆文件.然后我尝试安装kms-core:

cd kms-core
mkdir build
cd build
cmake ..
Run Code Online (Sandbox Code Playgroud)

但是cmake因以下错误而停止

-- checking for module 'KurentoModuleCreator'
--   package 'KurentoModuleCreator' not found
CMake Error at …
Run Code Online (Sandbox Code Playgroud)

cmake fiware kurento

0
推荐指数
1
解决办法
1965
查看次数