Back to index

nordugrid-arc-nox  1.1.0~rc6
XACMLRule.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_ARCRULE_H__
00002 #define __ARC_SEC_ARCRULE_H__
00003 
00004 #include <arc/XMLNode.h>
00005 #include <list>
00006 
00007 #include <arc/security/ArcPDP/policy/Policy.h>
00008 #include <arc/security/ArcPDP/fn/Function.h>
00009 #include <arc/security/ArcPDP/alg/CombiningAlg.h>
00010 #include <arc/security/ArcPDP/attr/AttributeFactory.h>
00011 #include <arc/security/ArcPDP/fn/FnFactory.h>
00012 #include <arc/security/ArcPDP/Evaluator.h>
00013 
00014 #include "./XACMLTarget.h"
00015 #include "./XACMLCondition.h"
00016 
00017 namespace ArcSec {
00019 class XACMLRule : public Policy {
00020 
00021 public:
00022   XACMLRule(Arc::XMLNode& node, EvaluatorContext* ctx);  
00023 
00024   virtual std::string getEffect();
00025 
00026   virtual Result eval(EvaluationCtx* ctx);
00027 
00028   virtual MatchResult match(EvaluationCtx* ctx);
00029 
00030   virtual ~XACMLRule();
00031 
00032   virtual operator bool(void) const { return true; };
00033 
00034   virtual std::string getEffect() const { return effect; };
00035 
00036   virtual EvalResult& getEvalResult();
00037 
00038   virtual void setEvalResult(EvalResult& res) { evalres = res; };
00039 
00040   const char* getEvalName() const {   return "xacml.evaluator"; };
00041 
00042   const char* getName() const {   return "xacml.rule"; };
00043 
00044 private:
00045   std::string effect;
00046   std::string id;
00047   std::string version;
00048   std::string description;
00049 
00050   AttributeFactory* attrfactory;
00051   FnFactory* fnfactory;
00052 
00053   EvalResult evalres;
00054   Arc::XMLNode rulenode;
00055 
00056   XACMLTarget* target;
00057   XACMLCondition* condition;
00058 protected:
00059   static Arc::Logger logger;
00060 };
00061 
00062 } // namespace ArcSec
00063 
00064 #endif /* __ARC_SEC_ARCRULE_H__ */
00065