Back to index

nordugrid-arc-nox  1.1.0~rc6
XACMLEvaluationCtx.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_XACMLEVALUATIONCTX_H__
00002 #define __ARC_SEC_XACMLEVALUATIONCTX_H__
00003 
00004 #include <list>
00005 #include <fstream>
00006 #include <arc/XMLNode.h>
00007 #include <arc/Logger.h>
00008 #include <arc/security/ArcPDP/attr/AttributeValue.h>
00009 #include <arc/security/ArcPDP/Request.h>
00010 #include <arc/security/ArcPDP/EvaluationCtx.h>
00011 
00012 namespace ArcSec {
00013 
00014 #if 0
00015 
00016 class ArcRequestTuple : public RequestTuple {
00017 public:
00018   RequestTuple* duplicate(const RequestTuple*);
00019   //virtual Arc::XMLNode& getNode() { return tuple; };
00020   ArcRequestTuple();
00021   virtual ~ArcRequestTuple();
00022   virtual void erase();
00023 };
00024 #endif
00025 
00027 class XACMLEvaluationCtx : public EvaluationCtx {
00028 public:
00030   XACMLEvaluationCtx (Request* request);
00031 
00032   virtual ~XACMLEvaluationCtx();
00033   
00034   virtual Request* getRequest() const;
00035 
00036   virtual std::list<AttributeValue*> getSubjectAttributes(std::string& id, std::string& type, std::string& issuer, std::string& category, AttributeFactory* attrfactory);
00037 
00038   virtual std::list<AttributeValue*> getResourceAttributes(std::string& id, std::string& type, std::string& issuer, AttributeFactory* attrfactory);
00039 
00040   virtual std::list<AttributeValue*> getActionAttributes(std::string& id, std::string& type, std::string& issuer, AttributeFactory* attrfactory);
00041 
00042   virtual std::list<AttributeValue*> getContextAttributes(std::string& id, std::string& type, std::string& issuer, AttributeFactory* attrfactory);
00043  
00044   virtual std::list<AttributeValue*> getAttributes(std::string& reqctxpath,
00045        Arc::XMLNode& policy, std::string& data_type, AttributeFactory* attrfactory); 
00046 
00047 private:
00048   std::list<AttributeValue*> getAttributesHelper(std::string& id,
00049        std::string& type, std::string& issuer, AttributeFactory* attrfactory, const std::string& target_class);
00050 
00051 private:
00052   static Arc::Logger logger;
00053   Request* req;
00054   std::map<std::string, std::string> subjects;
00055   std::map<std::string, std::string> resources;
00056   std::map<std::string, std::string> actions;
00057   std::map<std::string, std::string> enviornments;
00058 
00059 };
00060 
00061 } // namespace ArcSec
00062 
00063 #endif /* __ARC_SEC_XACMLEVALUATIONCTX_H__ */