eu.xtreemos.xosd.security.vops.xacml.utils
Class SampleRequestBuilder

java.lang.Object
  extended by eu.xtreemos.xosd.security.vops.xacml.utils.SampleRequestBuilder

public class SampleRequestBuilder
extends java.lang.Object

This is an example program that shows how to build and generate an XACML Request. This is a major part of what a PEP does. An equivalent Request to that generated here is found in the request directory as generated.xml. The generated policy can be used with this request.

Since:
1.1
Author:
seth proctor

Field Summary
(package private) static com.sun.xacml.ctx.RequestCtx request
           
 
Constructor Summary
SampleRequestBuilder()
           
 
Method Summary
static com.sun.xacml.ctx.RequestCtx getRequest()
           
static void main(java.lang.String[] args)
          Command-line interface that creates a new Request by invoking the static methods in this class.
static java.util.Set setupAction()
          Creates an Action specifying the action-id, an optional attribute.
static java.util.Set setupResource()
          Creates a Resource specifying the resource-id, a required attribute.
static java.util.Set setupSubjects()
          Sets up the Subject section of the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

static com.sun.xacml.ctx.RequestCtx request
Constructor Detail

SampleRequestBuilder

public SampleRequestBuilder()
Method Detail

setupSubjects

public static java.util.Set setupSubjects()
                                   throws java.net.URISyntaxException
Sets up the Subject section of the request. This Request only has one Subject section, and it uses the default category. To create a Subject with a different category, you simply specify the category when you construct the Subject object.

Returns:
a Set of Subject instances for inclusion in a Request
Throws:
java.net.URISyntaxException - if there is a problem with a URI

setupResource

public static java.util.Set setupResource()
                                   throws java.net.URISyntaxException
Creates a Resource specifying the resource-id, a required attribute.

Returns:
a Set of Attributes for inclusion in a Request
Throws:
java.net.URISyntaxException - if there is a problem with a URI

setupAction

public static java.util.Set setupAction()
                                 throws java.net.URISyntaxException
Creates an Action specifying the action-id, an optional attribute.

Returns:
a Set of Attributes for inclusion in a Request
Throws:
java.net.URISyntaxException - if there is a problem with a URI

getRequest

public static com.sun.xacml.ctx.RequestCtx getRequest()

main

public static void main(java.lang.String[] args)
Command-line interface that creates a new Request by invoking the static methods in this class. The Request has no Environment section.