OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xacml-users message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [Fwd: Retrieving subject attributes in EvaluationCtx objects]

Hello all
I have been trying to retrieve a subject attribute value from a
EvaluationCtx object for a couple days without a success.

What I want to do is to write a method into my custom AttributeFinder
module which in turns evaluates the subject attribute value in the
original incoming request, and to retrieve the additional required
attributes based on the identity of the subject.

How can I retrieve subject attribute values from a given EvaluationCtx

My Attribute Finder code is as follows:

        public EvaluationResult findAttribute(URI attributeType, URI
attributeId, URI issuer, URI subjectCategory, EvaluationCtx
context, int designatorType ){
                        return new
                        return new

                //This is the method to process incoming subject
attrribute value
                String X509CaName=initiateTrustEvaluator(context);

                Set set=new HashSet();

                set.add(new StringAttribute(X509CaName));
                return new EvaluationResult(new
BagAttribute(attributeType, set));
        public String initiateTrustEvaluator(EvaluationCtx context){
                URI type = null;
                URI id = null;
                URL subjectGSH = null;
                String att = null;
                EvaluationResult evalResult = null;

                        type = new URI(AnyURIAttribute.identifier); id = new
                }catch(java.net.URISyntaxException e){System.out.println(e);}


                BagAttribute attr2 =
                Iterator iter= attr2.iterator();
                Subject subject=((Subject)(iter.next()));
                Set set = subject.getAttributes();
                Iterator iter2= set.iterator();

                /*the following piece of code worked for retrieveing
resource attribute but not for the subject attribute value

                 BagAttribute attr2 =
                Iterator iter= attr2.iterator();

This is my request builder code

        public Set setupSubjects(URI subjectLocation) throws
URISyntaxException {

                // setup the id and value for the requesting subject URI
subjectId =
AnyURIAttribute value =
                new AnyURIAttribute(subjectLocation);

                HashSet subjects = new HashSet();
                HashSet attributes = new HashSet();
                attributes.add(new Attribute(subjectId, null, null,
value)); subjects.add(new Subject(null, attributes));

                return subjects;

What am I doing wrong?
I really appreciate your help. I almost finished my project however, got
stuck in this one point...

Mine Altunay
PhD student,
Computer Engineering Dept, NC State Univ
Phone: (919) 395 2789

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]