Back to index

nordugrid-arc-nox  1.1.0~rc6
ArcAuthZ.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_ARCAUTHZ_H__
00002 #define __ARC_SEC_ARCAUTHZ_H__
00003 
00004 #include <stdlib.h>
00005 
00006 #include <arc/ArcConfig.h>
00007 #include <arc/message/Message.h>
00008 #include <arc/message/SecHandler.h>
00009 #include <arc/security/PDP.h>
00010 #include <arc/loader/Plugin.h>
00011 
00012 namespace ArcSec {
00013 
00015 
00023 class ArcAuthZ : public SecHandler {
00024  private:
00025   class PDPDesc {
00026    public:
00027     PDP* pdp;
00028     enum {
00029       breakOnAllow,
00030       breakOnDeny,
00031       breakAlways,
00032       breakNever
00033     } action;
00034     std::string id;
00035     PDPDesc(const std::string& action,const std::string& id,PDP* pdp);
00036   };
00037   typedef std::list<PDPDesc> pdp_container_t;
00038 
00040   Arc::PluginsFactory *pdp_factory;
00042   pdp_container_t pdps_;
00043 
00044  protected:
00046   bool MakePDPs(Arc::XMLNode cfg);
00047 
00048  public:
00049   ArcAuthZ(Arc::Config *cfg, Arc::ChainContext* ctx);
00050   virtual ~ArcAuthZ(void);
00051   static Plugin* get_sechandler(Arc::PluginArgument* arg);  
00053   virtual bool Handle(Arc::Message* msg) const;
00054 };
00055 
00056 } // namespace ArcSec
00057 
00058 #endif /* __ARC_SEC_ARCAUTHZ_H__ */
00059