Common Policy

Common Policy, see http://www.ietf.org/rfc/rfc4745.txt, is a XML-based format for expressing privacy preferences. In order to be used it needs to be extended for a specific application usage. One such application using the Common Policy framework is for presence authorization (see http://tools.ietf.org/wg/simple/draft-ietf-simple-presence-rules/). A further example is location-based authorization policies (see Geolocation Policy described in http://tools.ietf.org/wg/geopriv/draft-ietf-geopriv-policy/).

Let us consider a presence authorization example to describe its usage. The watcher is allowed to access presence information (the ‘allow’ value for <sub-handling>).  They will be granted access to all services whose contact URI schemes are sip and mailto.  Person information is also provided.  However, since there is no <provide-devices>, no device information will be given to the watcher.  Within the service and person information provided to the watcher, the <activities> element will be shown, as will the <user-input> element.  However, any “idle-threshold” and “since” attributes in the <user-input> element will be removed.  Finally, the presence attribute <foo> will be shown to the watcher.  Any other presence attributes will be removed.  

<?xml version=”1.0″ encoding=”UTF-8″?>
<cr:ruleset xmlns=”urn:ietf:params:xml:ns:pres-rules”
    xmlns:pr=”urn:ietf:params:xml:ns:pres-rules”
    xmlns:cr=”urn:ietf:params:xml:ns:common-policy”>
    <cr:rule id=”a”>
        <cr:conditions>
            <cr:identity>
                <cr:one id=”sip:user@example.com”/>
            </cr:identity>
        </cr:conditions>
        <cr:actions>
            <pr:sub-handling>allow</pr:sub-handling>
        </cr:actions>
        <cr:transformations>
            <pr:provide-services>
                <pr:service-uri-scheme>sip</pr:service-uri-scheme>
                <pr:service-uri-scheme>mailto</pr:service-uri-scheme>
            </pr:provide-services>
            <pr:provide-persons>
                <pr:all-persons/>
            </pr:provide-persons>
            <pr:provide-activities>true</pr:provide-activities>
            <pr:provide-user-input>bare</pr:provide-user-input>
        </cr:transformations>
    </cr:rule>
</cr:ruleset>

1 thought on “Common Policy

Leave a Reply

Your email address will not be published. Required fields are marked *