Back to index

nordugrid-arc-nox  1.1.0~rc6
Classes | Public Member Functions | Static Protected Attributes | Private Attributes
ArcSec::IdentityMap Class Reference

Apply Tests message against list of PDPs. More...

#include <IdentityMap.h>

Inheritance diagram for ArcSec::IdentityMap:
Inheritance graph
Collaboration diagram for ArcSec::IdentityMap:
Collaboration graph

List of all members.


struct  map_pair_t

Public Member Functions

 IdentityMap (Arc::Config *cfg, Arc::ChainContext *ctx)
virtual ~IdentityMap (void)
virtual bool Handle (Arc::Message *msg) const

Static Protected Attributes

static Arc::Logger logger

Private Attributes

std::list< map_pair_tmaps_

Detailed Description

Apply Tests message against list of PDPs.

This class implements SecHandler interface. It's Handle() method runs provided Message instance against all PDPs specified in configuration. If any of PDPs returns positive result Handle() return true, otherwise false.

Definition at line 22 of file IdentityMap.h.

Class Documentation

struct ArcSec::IdentityMap::map_pair_t

Definition at line 25 of file IdentityMap.h.

Collaboration diagram for ArcSec::IdentityMap::map_pair_t:
Class Members
PDP * pdp
LocalMap * uid

Constructor & Destructor Documentation

Definition at line 169 of file IdentityMap.cpp.

  Arc::PluginsFactory* pdp_factory = (Arc::PluginsFactory*)(*ctx);
  if(pdp_factory) {
    Arc::XMLNode plugins = (*cfg)["Plugins"];
    for(int n = 0;;++n) {
      Arc::XMLNode p = plugins[n];
      if(!p) break;
      std::string name = p["Name"];
      if(name.empty()) continue; // Nameless plugin?
    Arc::XMLNode pdps = (*cfg)["PDP"];
    for(int n = 0;;++n) {
      Arc::XMLNode p = pdps[n];
      if(!p) break;
      std::string name = p.Attribute("name");
      if(name.empty()) continue; // Nameless?
      LocalMap* local_id = MakeLocalMap(p);
      if(!local_id) continue; // No mapping?
      Arc::Config cfg_(p);
      PDPPluginArgument arg(&cfg_);
      ArcSec::PDP* pdp = pdp_factory->GetInstance<PDP>(PDPPluginKind,name,&arg);
      if(!pdp) {
        delete local_id;
        logger.msg(Arc::ERROR, "PDP: %s can not be loaded", name);
      map_pair_t m;

Here is the call graph for this function:

ArcSec::IdentityMap::~IdentityMap ( void  ) [virtual]

Definition at line 204 of file IdentityMap.cpp.

  for(std::list<map_pair_t>::iterator p = maps_.begin();p!=maps_.end();++p) {
    if(p->pdp) delete p->pdp;
    if(p->uid) delete p->uid;

Member Function Documentation

bool ArcSec::IdentityMap::Handle ( Arc::Message msg) const [virtual]

Implements ArcSec::SecHandler.

Definition at line 211 of file IdentityMap.cpp.

  for(std::list<map_pair_t>::const_iterator p = maps_.begin();p!=maps_.end();++p) {
    if(p->pdp->isPermitted(msg)) {
      std::string id = p->uid->ID(msg);
      logger.msg(Arc::INFO,"Grid identity is mapped to local identity '%s'",id);
      return true;  
  return true;

Here is the call graph for this function:

Member Data Documentation

Arc::Logger ArcSec::SecHandler::logger [static, protected, inherited]

Reimplemented in ArcSec::DelegationSH.

Definition at line 31 of file SecHandler.h.

std::list<map_pair_t> ArcSec::IdentityMap::maps_ [private]

Definition at line 30 of file IdentityMap.h.

The documentation for this class was generated from the following files: