2014-06-24 2 views
0

가방 용 XACML 유형은 무엇입니까?가방 용 XACML 유형

내 상태 기능은 string-at-least-one-member-of이고 내 요청에는 string-bag 기능이 사용됩니다. 어떤 데이터 유형 DataType에 가방에 AttributeDesignator을 제공합니까? 나는 전체 파일에 관심있는 사람들을 위해

<Response xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"> 
    <Result> 
     <Decision>Deny</Decision> 
     <Status> 
      <StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok"/> 
     </Status> 
    </Result> 
</Response> 

를 얻을

 <xacml3:Condition> 
     <xacml3:Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of"> 
      <xacml3:AttributeDesignator AttributeId="test:xacml:1.0:county" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" MustBePresent="false"></xacml3:AttributeDesignator> 
      <xacml3:AttributeDesignator AttributeId="test:xacml:1.0:counties" DataType="WHAT SHOULD THIS BE?" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" MustBePresent="false"></xacml3:AttributeDesignator> 
     </xacml3:Apply> 
    </xacml3:Condition> 

내가 WSO2의 요청을하려고하면 내 속성은

<xacml3:Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"> 
     <xacml3:Attribute AttributeId="test:xacml:1.0:counties" IncludeInResult="false"> 
      <xacml3:Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag"> 
      <xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">travis</xacml3:AttributeValue> 
      <xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">brazoria</xacml3:AttributeValue> 
      <xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">dallas</xacml3:AttributeValue> 
      </xacml3:Apply> 
     </xacml3:Attribute> 
    </xacml3:Attributes> 

입니다 :

내 조건은 , 내 요청 :

331,내 정책은 다음과 같습니다

<xacml3:Policy xmlns:xacml3="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="county-based-3" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0"> 
    <xacml3:Description></xacml3:Description> 
    <xacml3:Target></xacml3:Target> 
    <xacml3:Rule Effect="Permit" RuleId="http://axiomatics.com/alfa/identifier/stackoverflow.example.checkGroup"> 
    <xacml3:Description></xacml3:Description> 
    <xacml3:Target></xacml3:Target> 
    <xacml3:Condition> 
     <xacml3:Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of"> 
      <xacml3:AttributeDesignator AttributeId="test:xacml:1.0:county" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" MustBePresent="false"></xacml3:AttributeDesignator> 
      <xacml3:AttributeDesignator AttributeId="test:xacml:1.0:counties" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" MustBePresent="false"></xacml3:AttributeDesignator> 
     </xacml3:Apply> 
    </xacml3:Condition> 
    </xacml3:Rule> 
    <xacml3:Rule Effect="Deny" RuleId="deny-rule"></xacml3:Rule> 

답변

2

데이터 유형이 http://www.w3.org/2001/XMLSchema#string해야한다 :

 <xacml3:Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of"> 
     <xacml3:AttributeDesignator AttributeId="test:xacml:1.0:county" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" MustBePresent="false"></xacml3:AttributeDesignator> 
     <xacml3:AttributeDesignator AttributeId="test:xacml:1.0:counties" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" MustBePresent="false"></xacml3:AttributeDesignator> 
    </xacml3:Apply> 

모든 속성 지정자는 XACML에서 실제로 가방에 있습니다. 데이터 유형은 가방의 전체 요소에 적용됩니다.

  • urn:oasis:names:tc:xacml:x.x:function:type-at-least-one-member-of

이 기능은 모두 두 개의 인수를 취한다

은 또한, 당신은 XACML 3.0 specification에 정의 된 문자열의 2 봉지를 취하는 기능 urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of를 사용 가방 '타입' 가치. 그것은 "http://www.w3.org/2001/XMLSchema#boolean"을 리턴해야한다. 첫 번째 인수의 적어도 하나의 요소가 "urn : oasis : names : tc : xacml : xx : function : type-is"에 의해 결정되는 으로 두 번째 인수에 포함되는 경우에만 함수는 "참" -에서".

귀하가 보낸 요청은 유효하지 않습니다. <Request/> 요소는 내부에 <Apply/> 요소를 포함 할 수 없습니다.

<Apply/>를 제거하고 다음과 같은 요청을 얻어야한다 :

<Request xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" CombinedDecision="false" ReturnPolicyIdList="true"> 
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"> 
    <Attribute AttributeId="test:xacml:1.0:county" IncludeInResult="true"> 
     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">travis</AttributeValue> 
    </Attribute> 
</Attributes> 
<Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"> 
    <Attribute AttributeId="test:xacml:1.0:counties" IncludeInResult="true"> 

     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">travis</AttributeValue> 
     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">brazoria</AttributeValue> 
     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">dallas</AttributeValue> 

    </Attribute> 
</Attributes> 
</Request> 

이것은 Axiomatics 정책 서버의 그래픽 표현입니다 :

Axiomatics Policy Server - Request Editor