简体   繁体   English

请求中的XACML JSON强制性类别

[英]XACML JSON Mandatory categories in request

I have a doubt with respect to the 4 categories of the JSON Profile of XACML 3.0 . 对XACML 3.0JSON概要文件的4个类别有疑问。

When I send a request in JSON from the PEP to the PDP, does the PEP always need to send AccessSubject, Resource, Action and Enviroment to the PDP or can the PEP send any category in the JSON request? 当我从PEP向PDP发送JSON请求时,PEP是否始终需要向PDP发送AccessSubject,Resource,Action和Enviroment,还是PEP可以在JSON请求中发送任何类别?

This is the diagram JSON request . 这是图JSON请求

A JSON request may contain any number of categories including custom categories. JSON请求可以包含任意数量的类别,包括自定义类别。 This applies to a XACML request whether it be encoded in JSON or XML (I am the editor of this profile and work for the company, Axiomatics , which implements it). 这适用于XACML请求,无论该请求是以JSON或XML编码(我是此配置文件的编辑,并且为实现它的Axiomatics公司工作)。

The JSON profile also defines 8 default categories which can be used. JSON配置文件还定义了可以使用的8个默认类别。 These category names are: 这些类别名称是:

  • urn:oasis:names:tc:xacml:3.0:attribute-category:resource : Resource urn:oasis:names:tc:xacml:3.0:attribute-category:resource:资源
  • urn:oasis:names:tc:xacml:3.0:attribute-category:action : Action urn:oasis:names:tc:xacml:3.0:attribute-category:action:操作
  • urn:oasis:names:tc:xacml:3.0:attribute-category:environment : Environment urn:oasis:names:tc:xacml:3.0:attribute-category:environment:Environment
  • urn:oasis:names:tc:xacml:1.0:subject-category:access-subject : AccessSubject urn:oasis:names:tc:xacml:1.0:subject-category:access-subject:AccessSubject
  • urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject : RecipientSubject urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject:RecipientSubject
  • urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject : IntermediarySubject urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject:IntermediarySubject
  • urn:oasis:names:tc:xacml:1.0:subject-category:codebase : Codebase urn:oasis:names:tc:xacml:1.0:subject-category:codebase:Codebase
  • urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine : RequestingMachine urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine:RequestingMachine

Here is an example which only uses 3 categories and uses their shorthand notation: 这是一个仅使用3个类别并使用其速记符号的示例:

{
    "Request": {
        "AccessSubject": {
            "Attribute": [
                {"AttributeId": "com.acme.user.employeeId",
                 "Value": "Alice"}
            ]},
        "Resource": {
            "Attribute": [
                {"AttributeId": "com.acme.record.recordId",
                    "Value": "123"},
                {"AttributeId": "com.acme.object.objectType",
                 "Value": "record"}
            ]},
        "Action": {
            "Attribute": [
                {"AttributeId": "com.acme.action.actionId",
                 "Value": "view"}
            ]}
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM