1
Advice
또는 Obligation
문자열을 평가에 사용 된 속성 (예 : 환경)에 따라 XACML 응답에 동적으로 반환하는 방법이 있습니까?정책 또는 규칙에서 동적으로 XACML 조언 문자열 생성
예를 들어, 논리를 구현하는 확장을 통해.
Advice
또는 Obligation
문자열을 평가에 사용 된 속성 (예 : 환경)에 따라 XACML 응답에 동적으로 반환하는 방법이 있습니까?정책 또는 규칙에서 동적으로 XACML 조언 문자열 생성
예를 들어, 논리를 구현하는 확장을 통해.
XACML 3.0에서 Obligation
및 Advice
요소에는 특성 할당이 포함될 수 있습니다. 속성 할당은 고정 값 또는 동적 값으로 채울 수있는 자리 표시 자입니다. 다른 XACML 특성에서 오는 값입니다. 예를 들어, 우리는 다음 (사용 alfa 표기 - Axiomatics Language for Authorization) 수 :
obligation notifyManager = "com.axiomatics.examples.notification.notifyManager"
policy accessDocs{
apply firstApplicable
rule denyOutOfOffice{
target clause currentTime>"17:00:00":time or currentTime<"09:00:00":time
deny
on deny{
obligation notifyManager{
com.axiomatics.examples.message = "You cannot access anything outside office hours"
com.axiomatics.examples.user.managerEmail = com.axiomatics.examples.user.managerEmail
}
}
}
}
를, 의무는이 자리를 가지고이 자리를 정적 값을 포함합니다.
예를 들어 자리 표시 자에 함수를 사용할 수 있습니다. 문자열 연결.
<?xml version="1.0" encoding="UTF-8"?>
<!--This file was generated by the ALFA Plugin for Eclipse from Axiomatics AB (http://www.axiomatics.com).
Any modification to this file will be lost upon recompilation of the source ALFA file-->
<xacml3:Policy xmlns:xacml3="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
PolicyId="http://axiomatics.com/alfa/identifier/example.accessDocs"
RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"
Version="1.0">
<xacml3:Description />
<xacml3:PolicyDefaults>
<xacml3:XPathVersion>http://www.w3.org/TR/1999/REC-xpath-19991116</xacml3:XPathVersion>
</xacml3:PolicyDefaults>
<xacml3:Target />
<xacml3:Rule
Effect="Deny"
RuleId="http://axiomatics.com/alfa/identifier/example.accessDocs.denyOutOfOffice">
<xacml3:Description />
<xacml3:Target>
<xacml3:AnyOf>
<xacml3:AllOf>
<xacml3:Match MatchId="urn:oasis:names:tc:xacml:1.0:function:time-less-than">
<xacml3:AttributeValue
DataType="http://www.w3.org/2001/XMLSchema#time">17:00:00</xacml3:AttributeValue>
<xacml3:AttributeDesignator
AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time"
DataType="http://www.w3.org/2001/XMLSchema#time"
Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
MustBePresent="false"
/>
</xacml3:Match>
</xacml3:AllOf>
<xacml3:AllOf>
<xacml3:Match MatchId="urn:oasis:names:tc:xacml:1.0:function:time-greater-than">
<xacml3:AttributeValue
DataType="http://www.w3.org/2001/XMLSchema#time">09:00:00</xacml3:AttributeValue>
<xacml3:AttributeDesignator
AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time"
DataType="http://www.w3.org/2001/XMLSchema#time"
Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
MustBePresent="false"
/>
</xacml3:Match>
</xacml3:AllOf>
</xacml3:AnyOf>
</xacml3:Target>
<xacml3:ObligationExpressions>
<xacml3:ObligationExpression ObligationId="com.axiomatics.examples.notification.notifyManager"
FulfillOn="Deny">
<xacml3:AttributeAssignmentExpression AttributeId="com.axiomatics.examples.message" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment">
<xacml3:AttributeValue
DataType="http://www.w3.org/2001/XMLSchema#string">You cannot access anything outside office hours</xacml3:AttributeValue>
</xacml3:AttributeAssignmentExpression>
<xacml3:AttributeAssignmentExpression AttributeId="com.axiomatics.examples.user.manager.email" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
<xacml3:AttributeDesignator
AttributeId="com.axiomatics.examples.user.manager.email"
DataType="http://www.w3.org/2001/XMLSchema#string"
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
MustBePresent="false"
/>
</xacml3:AttributeAssignmentExpression>
</xacml3:ObligationExpression>
</xacml3:ObligationExpressions>
</xacml3:Rule>
</xacml3:Policy>
이 좀 더 구체적으로 할 수 다음과 같이
XACML의 소스가 보인다? –
아이디어는 모든 사람에 대한 규칙을 정의하지 않고도 사용자에 따라 특정 조언을 생성하는 것입니다. 이것이 명확한 지 확실하지 않습니다. – Hos