<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
   The contents of this file are subject to the terms
   of the Common Development and Distribution License
   (the License). You may not use this file except in
   compliance with the License.

   You can obtain a copy of the License at
   https://opensso.dev.java.net/public/CDDLv1.0.html or
   opensso/legal/CDDLv1.0.txt
   See the License for the specific language governing
   permission and limitations under the License.

   When distributing Covered Code, include this CDDL
   Header Notice in each file and include the License file
   at opensso/legal/CDDLv1.0.txt.
   If applicable, add the following below the CDDL Header,
   with the fields enclosed by brackets [] replaced by
   your own identifying information:
   "Portions Copyrighted [year] [name of copyright owner]"

   $Id: policyevaluationtest_ipcondition.xml,v 1.3 2008/05/06 17:25:02 inthanga Exp $

   Copyright 2006 Sun Microsystems Inc. All Rights Reserved
-->

<!DOCTYPE Policies
PUBLIC "-//Sun Java System Access Manager 7.1 2006Q3 Admin CLI DTD//EN"
"jar://com/sun/identity/policy/policyAdmin.dtd"
>
<Policies>
    
    <Policy name="policyevaluationtest_ipcondition0" description=" Policy 
            Evaluation test with Valid IP Number" referralPolicy="false" >
        <Rule name="rule1">
            <ServiceName name="iPlanetAMWebAgentService" />
            <ResourceName name="http://www.yahooIP0.com:80/index.html" />
            <AttributeValuePair>
                <Attribute name="GET" />
                <Value>allow</Value>
            </AttributeValuePair>
            <AttributeValuePair>
                <Attribute name="POST" />
                <Value>allow</Value>
            </AttributeValuePair>
        </Rule>        
        <Subjects name="Subjects1" description="">
            <Subject name="user user1" type="AMIdentitySubject" 
                     includeType="inclusive">
                <AttributeValuePair><Attribute name="Values"/>
                    <Value>id=ipuser0,ou=user,SM_SUFFIX</Value>
                </AttributeValuePair>
            </Subject>            
        </Subjects>
        <Conditions name="Conditions1" description="">
            <Condition name="ip_condition1" type="IPCondition">
                <AttributeValuePair><Attribute name="StartIp"/>
                    <Value>192.18.178.74</Value>
                </AttributeValuePair>
                <AttributeValuePair><Attribute name="EndIp"/>
                    <Value>192.18.178.74</Value>
                </AttributeValuePair>
                 </Condition>
                <Condition name="condition2" type="AuthSchemeCondition">
                    <AttributeValuePair><Attribute name="AuthScheme"/>
                        <Value>ldap</Value>
                    </AttributeValuePair>                             
            </Condition>
        </Conditions>        
    </Policy>
    
    <Policy name="policyevaluationtest_ipcondition1" description=
            " Policy Evaluation test with Valid IP Range" 
            referralPolicy="false" >
        <Rule name="rule1">
            <ServiceName name="iPlanetAMWebAgentService" />
            <ResourceName name="http://www.yahooIP1.com:80/public" />
            <AttributeValuePair>
                <Attribute name="GET" />
                <Value>allow</Value>
            </AttributeValuePair>
            <AttributeValuePair>
                <Attribute name="POST" />
                <Value>allow</Value>
            </AttributeValuePair>
        </Rule>
        <Subjects name="Subjects1" description="">
            <Subject name="user user1" type="AMIdentitySubject" 
                     includeType="inclusive">
                <AttributeValuePair><Attribute name="Values"/>
                    <Value>id=ipuser1, ou=user,SM_SUFFIX</Value>
                </AttributeValuePair>
            </Subject>            
        </Subjects>
        <Conditions name="Conditions1" description="">
            <Condition name="ip_condition1" type="IPCondition">
                <AttributeValuePair><Attribute name="StartIp"/>
                    <Value>192.18.178.84</Value>
                </AttributeValuePair>
                <AttributeValuePair><Attribute name="EndIp"/>
                    <Value>192.18.178.99</Value>
                </AttributeValuePair>                
            </Condition>
            <Condition name="condition2" type="AuthSchemeCondition">
                <AttributeValuePair><Attribute name="AuthScheme"/>
                    <Value>ldap</Value>
                </AttributeValuePair>
            </Condition>
        </Conditions>
        
    </Policy>
    
    <Policy name="policyevaluationtest_ipcondition2" description=
            " Policy Evaluation test with Valid IP Range" 
            referralPolicy="false" >
        <Rule name="rule1">
            <ServiceName name="iPlanetAMWebAgentService" />
            <ResourceName name="http://www.yahooIP2.org:80/public" />
            <AttributeValuePair>
                <Attribute name="GET" />
                <Value>allow</Value>
            </AttributeValuePair>
            <AttributeValuePair>
                <Attribute name="POST" />
                <Value>allow</Value>
            </AttributeValuePair>
        </Rule>
        <Subjects name="Subjects1" description="">
            <Subject name="user user1" type="AMIdentitySubject" 
                     includeType="inclusive">
                <AttributeValuePair><Attribute name="Values"/>
                    <Value>id=ipdnsuser1, ou=user,SM_SUFFIX</Value>
                </AttributeValuePair>
            </Subject>            
        </Subjects>
        <Conditions name="Conditions1" description="">
            <Condition name="ip_condition1" type="IPCondition">
                <AttributeValuePair><Attribute name="StartIp"/>
                    <Value>192.18.178.84</Value>
                </AttributeValuePair>
                <AttributeValuePair><Attribute name="EndIp"/>
                    <Value>192.18.178.99</Value>
                </AttributeValuePair>                              
            </Condition>            
            <Condition name="dns_condition1" type="IPCondition">
                <AttributeValuePair><Attribute name="DnsName"/>
                    <Value>yahoo.org</Value>
                </AttributeValuePair>
            </Condition>            
            <Condition name="condition2" type="AuthSchemeCondition">
                <AttributeValuePair><Attribute name="AuthScheme"/>
                    <Value>ldap</Value>
                </AttributeValuePair>
            </Condition>
        </Conditions>        
    </Policy>
</Policies>
