Security
  Home arrow Security arrow Page 6 - Trust, Access Control, and Rights for ...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
SECURITY

Trust, Access Control, and Rights for Web Services, Part 2
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2004-10-12

    Table of Contents:
  • Trust, Access Control, and Rights for Web Services, Part 2
  • The XKMS Services
  • X-KRSS
  • eXtensible Access Control Markup Language (XACML) Specification
  • The XACML Data Model
  • XACML Policy Example
  • eXtensible Rights Markup Language (XrML) Management Specification
  • XrML Use Case Example
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Dell PowerEdge Servers

    Trust, Access Control, and Rights for Web Services, Part 2 - XACML Policy Example
    (Page 6 of 9 )

    Following in Listing 9.11 is a simple example to illustrate implementation of an XACML Policy. The Target says that the Policy applies only to requests for the server called "SampleServer". The Policy has a Rule with a Target that requires an action of "login" and a Condition that applies only if the Subject is trying to log in between 9 a.m. and 5 p.m.

    Listing 9.11 -XACML for SamplePolicy on SampleServer for Login Only Between 9 and 5

     <Policy PolicyId="SamplePolicy"
         RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:
          rule-combining-algorithm:first-applicable">

      <!-- This Policy only applies to requests on the SampleServer -->
      <Target>
       <Subjects>
        <AnySubject/>
       </Subjects>
       <Resources>
        <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:
          function:string-equal">
         <AttributeValue DataType="
    http://www.w3.org/2001/XMLSchema#string">
           SampleServer</AttributeValue>
         <ResourceAttributeDesignator DataType="
    http://www.w3.org/2001/
           XMLSchema#string"
                        AttributeId="urn:oasis:names:tc:xacml:
                         1.0:resource:resource-id"/>
        </ResourceMatch>
       </Resources>
       <Actions>
        <AnyAction/>
       </Actions>
      </Target>

      <!-- Rule to see if we should allow the Subject to login -->
      <Rule RuleId="LoginRule" Effect="Permit">

       <!-- Only use this Rule if the action is login -->
       <Target>
        <Subjects>
         <AnySubject/>
        </Subjects>
        <Resources>
         <AnyResource/>
        </Resources>
        <Actions>
         <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:
           function:string-equal">
          <AttributeValue DataType="
    http://www.w3.org/2001/XMLSchema#string">
           login</AttributeValue>
          <ActionAttributeDesignator DataType="
    http://www.w3.org/2001/
            XMLSchema#string"
                        AttributeId="ServerAction"/>
         </ActionMatch>
        </Actions>
       </Target>

       <!-- Only allow logins from 9am to 5pm -->
       <Condition FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
        <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:
         function:time-greater-than-or-equal"
         <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:
           time-one-and-only">
          <EnvironmentAttributeSelector DataType="
    http://www.w3.org/2001/
            XMLSchema#time"
                         AttributeId="urn:oasis:names:tc:
                         xacml:1.0:environment:current-time"/>
         </Apply>
         <AttributeValue DataType="
    http://www.w3.org/2001/XMLSchema#time">
           09:00:00</AttributeValue>
        </Apply>
        <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:
         function:time-less-than-or-equal"
         <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:
          function:time-one-and-only">
          <EnvironmentAttributeSelector DataType="
    http://www.w3.org/2001/
            XMLSchema#time"
                         AttributeId="urn:oasis:names:tc:
                         xacml:1.0:environment:current-time"/>
         </Apply>
         <AttributeValue DataType="
    http://www.w3.org/2001/XMLSchema#time">
          17:00:00</AttributeValue>
        </Apply>
       </Condition>

      </Rule>

      <!-- We could include other Rules for different actions here -->

      <!-- A final, "fall-through" Rule that always Denies -->
      <Rule RuleId="FinalRule" Effect="Deny"/>

     </Policy>

    XACML will probably affect the way security policy is built into applications, making less work for developers. XACML would do that by taking implicit policy that today is often spread across multiple applications in the form of executable code and bringing it to a central point of administration where it can be more easily created, modified, made consistent, and analyzed for effect by individuals other than developers responsible for security policy.

    The following are some XACML resources:

    http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml

    http://sunxacml.sourceforge.net/guide.html#xacml

    http://www.idevnews.com/TipsTricks.asp?ID=57

    http://www.entrust.com/resources/standards/xacml.htm

    SamsThis chapter is from Securing Web Services Security with WS-Security, by Jothy Rosenberg and David Remy (Sams, 2004, ISBN: 0672326515). Check it out at your favorite bookstore today.

    Buy this book now.

    More Security Articles
    More By Sams Publishing


     

       

    SECURITY ARTICLES

    - An Epilogue to Cryptography
    - A Sequel to Cryptography
    - An Introduction to Cryptography
    - Security Overview
    - Network Security Assessment
    - Firewalls
    - What’s behind the curtain? Part II
    - What’s behind the curtain? Part I
    - Vectors
    - PKI: Looking at the Risks
    - A Quick Look at Cross Site Scripting
    - PKI Architectures: How to Choose One
    - Trust, Access Control, and Rights for Web Se...
    - Basic Concepts of Web Services Security
    - Safeguarding the Identity and Integrity of X...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway