2017-02-08 5 views
0

内部の二番目のルールをチェックしません。 )Res1をへFIWARE AuthZForceは、私がKeyRock上の2つの役割を、作成している、それらの各々のために、私は別の許可</p> <p>User1-> Role1-> Perm1(アクセスがリンクしている同じPOLICYSET

User2-> Role2-> Perm2(RES2へのアクセス)

保存した後、私はAuthZforceのファイルシステムには3つのポリシーを持つ新しいドメインに参照してください。

最初のポリシーはcm9vdA /です。 < Policy>、<ポリシー>、および<ルール効果= "許可" RuleId = "permit-all" /> 最後のポリシーは<ポリシーセット>、2つの<ポリシー>、2つのルールアクセス許可) ドメインのpdp.xmlには、最後に作成されたポリシー(< policyRef> 331409a9-6014-4cfd-9180-f04bb22481f4 </policyRef>)を対象とする< policyRef>が含まれています。

ポリシーのxmlファイルがあります。

<PolicySet xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicySetId="331409a9-6014-4cfd-9180-f04bb22481f4" Version="1.0" PolicyCombiningAlgId="urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit"> 
<Description>Policy Set for application 3829292cdc25477dace68f376ef79d8b</Description> 
<Target/> 
<Policy PolicyId="" Version="1.0" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit"> 
    <Description>Role 9d2ebfde53044d2a8c22df3fe753b630 from application 3829292cdc25477dace68f376ef79d8b</Description> 
    <Target> 
     <AnyOf> 
      <AllOf> 
       <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 
        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">3829292cdc25477dace68f376ef79d8b</AttributeValue> 
        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> 
       </Match> 
      </AllOf> 
     </AnyOf> 
    </Target> 
    <Rule RuleId="fe8f4ebb98054feeb26bfc01eb93cce1" Effect="Permit"> 
     <Description>res1</Description> 
     <Target> 
      <AnyOf> 
       <AllOf> 
        <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 
         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">res1</AttributeValue> 
         <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:thales:xacml:2.0:resource:sub-resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> 
        </Match> 
       </AllOf> 
      </AnyOf> 
      <AnyOf> 
       <AllOf> 
        <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 
         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GET</AttributeValue> 
         <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> 
        </Match> 
       </AllOf> 
      </AnyOf> 
     </Target> 
     <Condition> 
      <Apply FunctionId="urn:oasis:names:tc:xacml:3.0:function:any-of"> 
       <Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/> 
       <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">9d2ebfde53044d2a8c22df3fe753b630</AttributeValue> 
       <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> 
      </Apply> 
     </Condition> 
    </Rule> 
</Policy> 
<Policy PolicyId="" Version="1.0" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit"> 
    <Description>Role 729019b1a9d44380b8b74dc788053dde from application 3829292cdc25477dace68f376ef79d8b</Description> 
    <Target> 
     <AnyOf> 
      <AllOf> 
       <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 
        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">3829292cdc25477dace68f376ef79d8b</AttributeValue> 
        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> 
       </Match> 
      </AllOf> 
     </AnyOf> 
    </Target> 
    <Rule RuleId="1d9bce94aaf04127b7ec8cfc63d17622" Effect="Permit"> 
     <Description>res2</Description> 
     <Target> 
      <AnyOf> 
       <AllOf> 
        <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 
         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">res2</AttributeValue> 
         <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:thales:xacml:2.0:resource:sub-resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> 
        </Match> 
       </AllOf> 
      </AnyOf> 
      <AnyOf> 
       <AllOf> 
        <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 
         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GET</AttributeValue> 
         <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/> 
        </Match> 
       </AllOf> 
      </AnyOf> 
     </Target> 
     <Condition> 
      <Apply FunctionId="urn:oasis:names:tc:xacml:3.0:function:any-of"> 
       <Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/> 
       <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">729019b1a9d44380b8b74dc788053dde</AttributeValue> 
       <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> 
      </Apply> 
     </Condition> 
    </Rule> 
</Policy> 

User1がRES1に(ウィルマPEPプロキシによって)アクセスしようとすると、マッチングが真で、条件が満たされると判定が「許可」です。

ユーザー1がres2にアクセスしようとすると、決定は「拒否」になります。

しかし....

User2がRES2に(ウィルマPEPプロキシで)アクセスしようとすると...意思決定が "拒否" です。

AuthZforceのログファイルを見ると、PolicySetId = "331409a9-6014-4cfd-9180-f04bb22481f4"が正しく識別されていますが、チェックは最初のルールで停止しています。実際には、要求されたリソース "res2"と "res1"を比較し、一致しないため拒否します。このチェックは、「res2」が存在する次のルールを評価し続けることはなく、比較は真でなければなりません。

どのような問題がありますか?

ご協力ありがとうございます。

答えて

0

FIWARE issue SEC-1043によると、これはKeyRock v5.4.1とAuthzForce Server v5.4.1にアップグレードすることで修正されています。

関連する問題

 関連する問題