“未为应用程序创建 AZF 域”AuthZforce

“AZF domain not created for application” AuthZforce

我有一个使用 KeyRock、PEP、PDP(AuthZForce) 的应用程序。

Keyrock 和 PEP 的安全级别 1(身份验证)正在运行,但是当我们尝试使用 AuthZForce 检查授权时,我收到错误消息:

AZF domain not created for application

我的用户和应用程序是按照 Fiware IdM 用户和程序员指南中的步骤创建的。

我也可以按照 AuthZForce - 安装和管理指南中的说明创建域,但我不知道如何在创建它们时将域 ID 与用户角色绑定。

那么,我怎样才能在特定域下插入 users/organizations/applications,然后获得安全级别 2?

我的 config.js 文件:

config.azf = {
    enabled: true,
    host: '192.168.99.100',
    port: 8080,
    path: '/authzforce/domains/',
    custom_policy: undefined  
};

我的 docker-compose.yml 文件是:

authzforce:
    image: fiware/authzforce-ce-server:release-5.4.1
    hostname: authzforce
    container_name: authzforce
    ports:
      - "8080:8080"

keyrock:
    image: fiware/idm:v5.4.0
    hostname: keyrock
    container_name: keyrock 
    ports:
        - "5000:5000"
        - "8000:8000" 

pepproxy:
    build: Docker/fiware-pep-proxy
    hostname: pepproxy
    container_name: pepproxy
    ports:
        - 80:80
    links:
        - authzforce
        - keyrock 

这个问题和AuthZForce Security Level 2: Basic Authorization error "AZF domain not created for application"是一样的,但是我得到同样的错误,我的keyrock版本是v5.4.0。

我更改了 AuthZForce GE 配置: http://fiware-idm.readthedocs.io/en/latest/admin_guide.html#authzforce-ge-configuration

在查看 horizo​​n 源代码后,我发现函数 "policyset_update" in openstack_dashboard/fiware_api/access_control_ge.py returns inmediatly if ACCESS_CONTROL_MAGIC_KEY是 None (默认配置)或空字符串,因此与 AuthZForce 的通信永远不会发生。尽管在 PEP 代理后面没有 AuthZForce 时此参数是可选的,但您必须输入一些文本以避免此错误。

在你的例子中,你的字符串 'undefined' 完成了工作。事实上,结果生成了一个 'X-Auth-Token: undefined',但当 horizo​​n 直接与 AuthZForce 通信时被忽略。

相关主题: