我正在我的计算机中部署 FIWARE 安全 GE(即 Wilma、AuthzForce、Keyrock)。安全级别 2(基本授权)运行良好,但现在我需要使用 XACML 的安全级别 3(高级授权)。
长话短说,我想要一个实现安全级别3的教程。但是,据我所知,任何关于安全级别3的教程或文档都不存在。
现在,我使用 PAP 的 API 创建策略,并将 config.js 中的“custom_policy”选项从“undefined”更改为“policy.js”。然后我在“PEP/policies”中创建“policy.js”文件,但与其模板文件相比不做任何更改,因为我不知道这段代码到底是做什么的。我想我应该使用“xml”变量制作 XACML 请求表单。但就我而言,当我使用“xml”变量发出 XACML 请求并返回该变量时,PEP 会给出错误。这是我的 PEP 错误:
Error: Root - Error in AZF communication <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error xmlns="http://authzforce.github.io/rest-api-model/xmlns/authz/S" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns:ns3="http://authzforce.github.io/core/xmlns/pdp/5.0" xmlns:ns4="http://authzforce.github.io/pap-dao-flat-file/xmlns/properties/3.6"><message>Invalid parameters: cvc-elt.1: Cannot find the declaration of element 'Request'.</message></error>
这是我在policy.js 中的“getPolicy”代码(XACML 请求)。我只是提出了非常简单的请求是否允许响应,因为我不确定当时我在做什么:
exports.getPolicy = function (roles, req, app_id) {
var xml = xmlBuilder.create('Request', {
'xmlns': 'urn:oasis:names:tc:xacml:3.0:core:schema:wd-17',
'CombinedDecision': 'false',
'ReturnPolicyIdList': 'false'})
.ele('Attributes', {
'Category': 'urn:oasis:names:tc:xacml:1.0:subject-category:access-subject'});
那么,任何人都可以给我有关实施安全级别 3 的任何信息吗?