0

以下のように、リクエストからresource:root-resource-idを送信するシナリオがあります

<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" IncludeInResult="true">
        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
            Customer
        </AttributeValue>
    </Attribute>
    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:root-resource-id" IncludeInResult="true">
        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
            Customer
        </AttributeValue>
    </Attribute>
    <Attribute AttributeId="urn:oasis:names:tc:xacml:2.0:resource:scope" IncludeInResult="false">
        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
            Descendants
        </AttributeValue>
    </Attribute>
</Attributes>`

ここで、resource:resource-id にアクセスする場合と同様に、SampleResourceFinderModule の resource:root-resource-id にアクセスする必要があります。

if("Customer".equals(parentResourceId.encode())){}

これを行う方法を教えてください。

4

1 に答える 1

0

あなたが正確に何をしようとしているのか、正確な質問は何なのかわかりません。hereとして言及されている WSO2IS で階層型リソース プロファイルを試していると思います。「PIPResourceFinder」を実装して新しい拡張機能を書いたようです。この拡張機能のアイデアは、指定されたルート リソースの下にある子または子孫のリソースを取得することです。したがって、XACML リクエストでは、ルート リソースとスコープ (子または子孫) を送信する必要があります。

次に、ルート リソースは「urn:oasis:names:tc:xacml:1.0:resource:resource-id」属性 ID によって識別されます。(「urn:oasis:names:tc:xacml:1.0:resource:root-resource-id」属性 IDではありません。ブログ投稿に間違いがあると思います。ブログ投稿のシナリオによると、異なる属性 ID を持つルート リソース)。

スコープは、「urn:oasis:names:tc:xacml:2.0:resource:scope」属性 ID によって識別されます。

最後に、「PIPResourceFinder」ファインダーでルート リソースにアクセスできます。次に、ルート リソースに関連付けられている子リソースを返すことができます。このブログに記載されているサンプル実装を試すことができます。

于 2014-02-04T16:09:03.197 に答える