RE: [xacml] REST Profile Entry Point

From
Sinnema, Remon <>
Date
2013-03-07T15:19:01+00:00
ID
Thread
RE: [xacml] REST Profile Entry Point
HI Steven,


> -----Original Message-----
> From:  [mailto:] On
> Behalf Of Steven Legg
> Sent: Thursday, March 07, 2013 3:27 AM
> To: Sinnema, Remon
> Cc: XACML-TC-mailinglist
> Subject: [xacml] REST Profile Entry Point
>
> The latest draft of the REST profile (xacml-rest-v1.0-wd07.doc) has this
> example response from a server for a GET request on the entry point:
>
> <resources xmlns="http://ietf.org/ns/home-documents"
>      xmlns:atom="http://www.w3.org/2005/Atom">
>    <resource rel="http://docs.oasis-open.org/ns/xacml/relation/pdp">
>      <atom:link href="/authorization/pdp"/>
>    </resource>
> </resources>
>
> I haven't been able to find an XML Schema for the "http://ietf.org/ns/home-
> documents"
> namespace, nor a specification that defines the <resources> element and its
> contents. Where is the normative definition of these things ?

Section 2.2.1, Entry Point, refers to http://tools.ietf.org/html/draft-nottingham-json-home-00, the Internet-Draft for home documents. It doesn't contain any XML schema, but it does have JSON examples. I simply translated those to XML.

I think my colleague Erik Wilde has contacted the I-D author about including XML schema, but I don't know what the status is. In the meantime, this is what I use for my current project:

  <xs:element name="link">
    <xs:complexType>
      <xs:attribute name="href" type="xs:anyURI" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="template">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded" minOccurs="0">
        <xs:element name="var">
          <xs:complexType>
            <xs:attribute name="name" use="required"/>
            <xs:attribute name="uri" type="xs:anyURI" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="href-template" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="resource">
    <xs:complexType>
      <xs:choice>
        <xs:element ref="link"/>
        <xs:element ref="template"/>
      </xs:choice>
      <xs:attribute name="rel" type="xs:anyURI" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="resources">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="resource" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

Note that in this case I chose to define "link" myself, instead of borrowing from Atom, as the REST profile example does.


Thanks,
Ray