otsdaq  v2_04_00
CorePropertySupervisorBase.cc
1 #include "otsdaq-core/CoreSupervisors/CorePropertySupervisorBase.h"
2 
3 using namespace ots;
4 
6  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES =
8 
9 //========================================================================================================================
10 CorePropertySupervisorBase::CorePropertySupervisorBase(xdaq::Application* application)
11  : theConfigurationManager_(0) // new ConfigurationManager)
12  , supervisorClass_(application->getApplicationDescriptor()->getClassName())
13  , supervisorClassNoNamespace_(supervisorClass_.substr(
14  supervisorClass_.find_last_of(":") + 1,
15  supervisorClass_.length() - supervisorClass_.find_last_of(":")))
16  , supervisorContextUID_(
17  "UNINITIALIZED_supervisorContextUID") // MUST BE INITIALIZED
18  // INSIDE THE CONTRUCTOR
19  // TO THROW EXCEPTIONS
20  // on bad conditions
21  , supervisorApplicationUID_(
22  "UNINITIALIZED_supervisorApplicationUID") // MUST BE INITIALIZED INSIDE THE
23  // CONTRUCTOR TO THROW EXCEPTIONS on
24  // bad conditions
25  , supervisorConfigurationPath_(
26  "UNINITIALIZED_supervisorConfigurationPath") // MUST BE INITIALIZED INSIDE THE
27  // CONTRUCTOR TO THROW EXCEPTIONS
28  // on bad conditions
29  , propertiesAreSetup_(false)
30 {
31  INIT_MF("CorePropertySupervisorBase");
32 
33  __SUP_COUTV__(application->getApplicationContext()->getContextDescriptor()->getURL());
34  __SUP_COUTV__(application->getApplicationDescriptor()->getLocalId());
35  __SUP_COUTV__(supervisorClass_);
36  __SUP_COUTV__(supervisorClassNoNamespace_);
37 
38  // get all supervisor info, and wiz mode, macroMaker mode, or not
39  allSupervisorInfo_.init(application->getApplicationContext());
40 
41  if(allSupervisorInfo_.isMacroMakerMode())
42  {
43  theConfigurationManager_ = new ConfigurationManager(false /*initForWriteAccess*/,
44  true /*initializeFromFhicl*/);
45  __SUP_COUT__
46  << "Macro Maker mode detected. So skipping configuration location work for "
47  "supervisor of class '"
48  << supervisorClass_ << "'" << __E__;
49 
50  supervisorContextUID_ = "MacroMakerFEContext";
51  supervisorApplicationUID_ = "MacroMakerFESupervisor";
52  supervisorConfigurationPath_ =
53  CorePropertySupervisorBase::supervisorContextUID_ +
54  "/LinkToApplicationTable/" +
55  CorePropertySupervisorBase::supervisorApplicationUID_ +
56  "/LinkToSupervisorTable";
57 
58  __SUP_COUTV__(CorePropertySupervisorBase::supervisorContextUID_);
59  __SUP_COUTV__(CorePropertySupervisorBase::supervisorApplicationUID_);
60  __SUP_COUTV__(CorePropertySupervisorBase::supervisorConfigurationPath_);
61 
62  return;
63  }
64  else if(allSupervisorInfo_.isWizardMode())
65  {
66  __SUP_COUT__ << "Wiz mode detected. So skipping configuration location work for "
67  "supervisor of class '"
68  << supervisorClass_ << "'" << __E__;
69  supervisorContextUID_ = "NO CONTEXT ID IN WIZ MODE";
70  supervisorApplicationUID_ =
71  std::to_string(application->getApplicationDescriptor()->getLocalId());
72  supervisorConfigurationPath_ = "NO APP PATH IN WIZ MODE";
73 
74  __SUP_COUTV__(CorePropertySupervisorBase::supervisorContextUID_);
75  __SUP_COUTV__(CorePropertySupervisorBase::supervisorApplicationUID_);
76  __SUP_COUTV__(CorePropertySupervisorBase::supervisorConfigurationPath_);
77 
78  return;
79  }
80 
81  __SUP_COUT__ << "Getting configuration specific info for supervisor '"
82  << (allSupervisorInfo_.getSupervisorInfo(application).getName())
83  << "' of class " << supervisorClass_ << "." << __E__;
84 
85  // get configuration specific info for the application supervisor
86 
87  try
88  {
89  theConfigurationManager_ = new ConfigurationManager();
90  CorePropertySupervisorBase::supervisorContextUID_ =
91  theConfigurationManager_->__GET_CONFIG__(XDAQContextTable)
92  ->getContextUID(application->getApplicationContext()
93  ->getContextDescriptor()
94  ->getURL());
95  }
96  catch(...)
97  {
98  __SUP_COUT_ERR__
99  << "XDAQ Supervisor could not access it's configuration through "
100  "the Configuration Manager."
101  << ". The getApplicationContext()->getContextDescriptor()->getURL() = "
102  << application->getApplicationContext()->getContextDescriptor()->getURL()
103  << __E__;
104  throw;
105  }
106 
107  try
108  {
109  CorePropertySupervisorBase::supervisorApplicationUID_ =
110  theConfigurationManager_->__GET_CONFIG__(XDAQContextTable)
111  ->getApplicationUID(
112  application->getApplicationContext()
113  ->getContextDescriptor()
114  ->getURL(),
115  application->getApplicationDescriptor()->getLocalId());
116  }
117  catch(...)
118  {
119  __SUP_COUT_ERR__ << "XDAQ Supervisor could not access it's configuration through "
120  "the Configuration Manager."
121  << " The supervisorContextUID_ = " << supervisorContextUID_
122  << ". The supervisorApplicationUID = "
123  << supervisorApplicationUID_ << __E__;
124  throw;
125  }
126 
127  CorePropertySupervisorBase::supervisorConfigurationPath_ =
128  "/" + CorePropertySupervisorBase::supervisorContextUID_ +
129  "/LinkToApplicationTable/" +
130  CorePropertySupervisorBase::supervisorApplicationUID_ + "/LinkToSupervisorTable";
131 
132  __SUP_COUTV__(CorePropertySupervisorBase::supervisorContextUID_);
133  __SUP_COUTV__(CorePropertySupervisorBase::supervisorApplicationUID_);
134  __SUP_COUTV__(CorePropertySupervisorBase::supervisorConfigurationPath_);
135 
136  CorePropertySupervisorBase::indicateOtsAlive(this);
137 
138  theConfigurationManager_->setOwnerContext(
139  CorePropertySupervisorBase::supervisorContextUID_);
140  theConfigurationManager_->setOwnerApp(
141  CorePropertySupervisorBase::supervisorApplicationUID_);
142 
143 } // end constructor
144 
145 //========================================================================================================================
146 CorePropertySupervisorBase::~CorePropertySupervisorBase(void)
147 {
148  if(theConfigurationManager_)
149  delete theConfigurationManager_;
150 } // end destructor
151 
152 //========================================================================================================================
153 void CorePropertySupervisorBase::indicateOtsAlive(
154  const CorePropertySupervisorBase* properties)
155 {
156  char portStr[100] = "0";
157  std::string hostname = "wiz";
158 
159  // Note: the environment variable __ENV__("HOSTNAME") fails in multinode ots systems
160  // started through ssh
161 
162  if(properties)
163  {
164  unsigned int port = properties->getContextTreeNode()
165  .getNode(properties->supervisorContextUID_)
166  .getNode("Port")
167  .getValue<unsigned int>();
168  sprintf(portStr, "%u", port);
169 
170  hostname = properties->getContextTreeNode()
171  .getNode(properties->supervisorContextUID_)
172  .getNode("Address")
173  .getValue<std::string>();
174 
175  size_t i = hostname.find("//");
176  if(i != std::string::npos)
177  hostname = hostname.substr(i + 2);
178 
179  __COUTV__(hostname);
180  }
181 
182  // indicate ots is alive (for StartOTS.sh to verify launch was successful)
183  std::string filename = std::string(__ENV__("OTSDAQ_LOG_DIR")) + "/otsdaq_is_alive-" +
184  hostname + "-" + portStr + ".dat";
185  FILE* fp = fopen(filename.c_str(), "w");
186  if(!fp)
187  {
188  __SS__ << "Failed to open the ots-is-alive file: " << filename << __E__;
189  __SS_THROW__;
190  }
191  fprintf(fp, "%s %s %ld\n", hostname.c_str(), portStr, time(0));
192  fclose(fp);
193 
194  __COUT__ << "Marked alive: " << filename << __E__;
195 }
196 
197 //========================================================================================================================
198 // When overriding, setup default property values here
199 // called by CorePropertySupervisorBase constructor before loading user defined property
200 // values
201 void CorePropertySupervisorBase::setSupervisorPropertyDefaults(void)
202 {
203  // This can be done in the constructor because when you start xdaq it loads the
204  // configuration that can't be changed while running!
205 
206  //__SUP_COUT__ << "Setting up Core Supervisor Base property defaults for supervisor"
207  //<<
208  // "..." << __E__;
209 
210  // set core Supervisor base class defaults
211  CorePropertySupervisorBase::setSupervisorProperty(
212  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.UserPermissionsThreshold,
213  "*=1");
214  CorePropertySupervisorBase::setSupervisorProperty(
215  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.UserGroupsAllowed, "");
216  CorePropertySupervisorBase::setSupervisorProperty(
217  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.UserGroupsDisallowed, "");
218 
219  CorePropertySupervisorBase::setSupervisorProperty(
220  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.CheckUserLockRequestTypes, "");
221  CorePropertySupervisorBase::setSupervisorProperty(
222  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.RequireUserLockRequestTypes,
223  "");
224  CorePropertySupervisorBase::setSupervisorProperty(
225  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.AutomatedRequestTypes, "");
226  CorePropertySupervisorBase::setSupervisorProperty(
227  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.AllowNoLoginRequestTypes, "");
228 
229  CorePropertySupervisorBase::setSupervisorProperty(
230  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.NoXmlWhiteSpaceRequestTypes,
231  "");
232  CorePropertySupervisorBase::setSupervisorProperty(
233  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.NonXMLRequestTypes, "");
234 
235  // __SUP_COUT__ << "Done setting up Core Supervisor Base property defaults for
236  // supervisor" <<
237  // "..." << __E__;
238 }
239 
240 //========================================================================================================================
241 // extractPermissionsMapFromString
242 // Static function that extract map function to standardize approach
243 // in case needed by supervisors for special permissions handling.
244 // For example, used to serve Desktop Icons.
245 //
246 // permissionsString format is as follows:
247 // <groupName>:<permissionsThreshold> pairs separated by ',' '&' or '|'
248 // for example, to give access admins and pixel team but not calorimeter team:
249 // allUsers:255 | pixelTeam:1 | calorimeterTeam:0
250 //
251 // Use with CorePropertySupervisorBase::doPermissionsGrantAccess to determine
252 // if access is allowed.
253 void CorePropertySupervisorBase::extractPermissionsMapFromString(
254  const std::string& permissionsString,
255  std::map<std::string, WebUsers::permissionLevel_t>& permissionsMap)
256 {
257  permissionsMap.clear();
258  StringMacros::getMapFromString(permissionsString, permissionsMap);
259 }
260 
261 //========================================================================================================================
262 // doPermissionsGrantAccess
263 // Static function that checks permissionLevelsMap against permissionThresholdsMap and
264 // returns true if access requirements are met.
265 //
266 // This is useful in standardizing approach for supervisors in case of
267 // of special permissions handling.
268 // For example, used to serve Desktop Icons.
269 //
270 // permissionLevelsString format is as follows:
271 // <groupName>:<permissionsLevel> pairs separated by ',' '&' or '|'
272 // for example, to be a standard user and an admin on the pixel team and no access to
273 // calorimeter team: allUsers:1 | pixelTeam:255 | calorimeterTeam:0
274 //
275 // permissionThresoldsString format is as follows:
276 // <groupName>:<permissionsThreshold> pairs separated by ',' '&' or '|'
277 // for example, to give access admins and pixel team but not calorimeter team:
278 // allUsers:255 | pixelTeam:1 | calorimeterTeam:0
279 bool CorePropertySupervisorBase::doPermissionsGrantAccess(
280  std::map<std::string, WebUsers::permissionLevel_t>& permissionLevelsMap,
281  std::map<std::string, WebUsers::permissionLevel_t>& permissionThresholdsMap)
282 {
283  // return true if a permission level group name is found with a permission level
284  // greater than or equal to the permission level at a matching group name entry in
285  // the thresholds map.
286 
287  //__COUTV__(StringMacros::mapToString(permissionLevelsMap));
288  //__COUTV__(StringMacros::mapToString(permissionThresholdsMap));
289 
290  for(const auto& permissionLevelGroupPair : permissionLevelsMap)
291  {
292  //__COUTV__(permissionLevelGroupPair.first);
293  //__COUTV__(permissionLevelGroupPair.second);
294 
295  for(const auto& permissionThresholdGroupPair : permissionThresholdsMap)
296  {
297  //__COUTV__(permissionThresholdGroupPair.first);
298  //__COUTV__(permissionThresholdGroupPair.second);
299  if(permissionLevelGroupPair.first == permissionThresholdGroupPair.first &&
300  permissionThresholdGroupPair.second && // not explicitly disallowed
301  permissionLevelGroupPair.second >= permissionThresholdGroupPair.second)
302  return true; // access granted!
303  }
304  }
305  //__COUT__ << "Denied." << __E__;
306 
307  // if here, no access group match found
308  // so denied
309  return false;
310 } // end doPermissionsGrantAccess
311 
312 //========================================================================================================================
313 void CorePropertySupervisorBase::checkSupervisorPropertySetup()
314 {
315  if(propertiesAreSetup_)
316  return;
317 
318  // Immediately mark properties as setup, (prevent infinite loops due to
319  // other launches from within this function, e.g. from getSupervisorProperty)
320  // only redo if Context configuration group changes
321  propertiesAreSetup_ = true;
322 
323  CorePropertySupervisorBase::setSupervisorPropertyDefaults(); // calls base class
324  // version defaults
325 
326  //__SUP_COUT__ << "Setting up supervisor specific property DEFAULTS for supervisor..."
327  //<< __E__;
328  setSupervisorPropertyDefaults(); // calls override version defaults
329  // __SUP_COUT__ << "Done setting up supervisor
330  // specific property DEFAULTS for supervisor" <<
331  // "." << __E__;
332 
333  if(allSupervisorInfo_.isWizardMode())
334  __SUP_COUT__ << "Wiz mode detected. Skipping setup of supervisor properties for "
335  "supervisor of class '"
336  << supervisorClass_ << "'" << __E__;
337  else if(allSupervisorInfo_.isMacroMakerMode())
338  __SUP_COUT__
339  << "Maker Maker mode detected. Skipping setup of supervisor properties for "
340  "supervisor of class '"
341  << supervisorClass_ << "'" << __E__;
342  else
343  CorePropertySupervisorBase::loadUserSupervisorProperties(); // loads user
344  // settings from
345  // configuration
346 
347  //__SUP_COUT__ << "Setting up supervisor specific FORCED properties for supervisor..."
348  //<< __E__;
349  forceSupervisorPropertyValues(); // calls override forced values
350  // __SUP_COUT__ << "Done setting up supervisor
351  // specific FORCED properties for supervisor" <<
352  // "." << __E__;
353 
354  CorePropertySupervisorBase::extractPermissionsMapFromString(
355  getSupervisorProperty(
356  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.UserPermissionsThreshold),
357  propertyStruct_.UserPermissionsThreshold);
358 
359  propertyStruct_.UserGroupsAllowed.clear();
360  StringMacros::getMapFromString(
361  getSupervisorProperty(
362  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.UserGroupsAllowed),
363  propertyStruct_.UserGroupsAllowed);
364 
365  propertyStruct_.UserGroupsDisallowed.clear();
366  StringMacros::getMapFromString(
367  getSupervisorProperty(
368  CorePropertySupervisorBase::SUPERVISOR_PROPERTIES.UserGroupsDisallowed),
369  propertyStruct_.UserGroupsDisallowed);
370 
371  auto nameIt = SUPERVISOR_PROPERTIES.allSetNames_.begin();
372  auto setIt = propertyStruct_.allSets_.begin();
373  while(nameIt != SUPERVISOR_PROPERTIES.allSetNames_.end() &&
374  setIt != propertyStruct_.allSets_.end())
375  {
376  (*setIt)->clear();
377  StringMacros::getSetFromString(getSupervisorProperty(*(*nameIt)), *(*setIt));
378 
379  ++nameIt;
380  ++setIt;
381  }
382 
383  __SUP_COUT__ << "Final supervisor property settings:" << __E__;
384  for(auto& property : propertyMap_)
385  __SUP_COUT__ << "\t" << property.first << " = " << property.second << __E__;
386 }
387 
388 //========================================================================================================================
389 // getSupervisorTreeNode ~
390 // try to get this Supervisors configuration tree node
391 ConfigurationTree CorePropertySupervisorBase::getSupervisorTreeNode(void) try
392 {
393  if(supervisorContextUID_ == "" || supervisorApplicationUID_ == "")
394  {
395  __SUP_SS__ << "Empty supervisorContextUID_ or supervisorApplicationUID_."
396  << __E__;
397  __SUP_SS_THROW__;
398  }
399  return theConfigurationManager_->getSupervisorNode(supervisorContextUID_,
400  supervisorApplicationUID_);
401 }
402 catch(...)
403 {
404  __SUP_COUT_ERR__
405  << "XDAQ Supervisor could not access it's configuration node through "
406  "theConfigurationManager_ "
407  << "(Did you remember to initialize using CorePropertySupervisorBase::init()?)."
408  << " The supervisorContextUID_ = " << supervisorContextUID_
409  << ". The supervisorApplicationUID = " << supervisorApplicationUID_ << __E__;
410  throw;
411 }
412 
413 //========================================================================================================================
414 // loadUserSupervisorProperties ~
415 // try to get user supervisor properties
416 void CorePropertySupervisorBase::loadUserSupervisorProperties(void)
417 {
418  // __SUP_COUT__ << "Loading user properties for supervisor '" <<
419  // supervisorContextUID_ << "/" << supervisorApplicationUID_ <<
420  // "'..." << __E__;
421 
422  // re-acquire the configuration supervisor node, in case the config has changed
423  auto supervisorNode = CorePropertySupervisorBase::getSupervisorTreeNode();
424 
425  try
426  {
427  auto /*map<name,node>*/ children =
428  supervisorNode.getNode("LinkToPropertyTable").getChildren();
429 
430  for(auto& child : children)
431  {
432  if(child.second.getNode("Status").getValue<bool>() == false)
433  continue; // skip OFF properties
434 
435  auto propertyName = child.second.getNode("PropertyName").getValue();
436  setSupervisorProperty(
437  propertyName,
438  child.second.getNode("PropertyValue").getValue<std::string>());
439  }
440  }
441  catch(...)
442  {
443  __SUP_COUT__ << "No user supervisor property settings found in the configuration "
444  "tree, going with the defaults."
445  << __E__;
446  }
447 
448  // __SUP_COUT__ << "Done loading user properties for supervisor '" <<
449  // supervisorContextUID_ << "/" << supervisorApplicationUID_ <<
450  // "'" << __E__;
451 }
452 
453 //========================================================================================================================
454 void CorePropertySupervisorBase::setSupervisorProperty(const std::string& propertyName,
455  const std::string& propertyValue)
456 {
457  propertyMap_[propertyName] = propertyValue;
458  // __SUP_COUT__ << "Set propertyMap_[" << propertyName <<
459  // "] = " << propertyMap_[propertyName] << __E__;
460 }
461 
462 //========================================================================================================================
463 void CorePropertySupervisorBase::addSupervisorProperty(const std::string& propertyName,
464  const std::string& propertyValue)
465 {
466  propertyMap_[propertyName] =
467  propertyValue + " | " + getSupervisorProperty(propertyName);
468  // __SUP_COUT__ << "Set propertyMap_[" << propertyName <<
469  // "] = " << propertyMap_[propertyName] << __E__;
470 }
471 
472 //========================================================================================================================
473 // getSupervisorProperty
474 // string version of template function
475 std::string CorePropertySupervisorBase::getSupervisorProperty(
476  const std::string& propertyName)
477 {
478  // check if need to setup properties
479  checkSupervisorPropertySetup();
480 
481  auto it = propertyMap_.find(propertyName);
482  if(it == propertyMap_.end())
483  {
484  __SUP_SS__ << "Could not find property named " << propertyName << __E__;
485  __SS_THROW__; //__SUP_SS_THROW__;
486  }
487  return StringMacros::validateValueForDefaultStringDataType(it->second);
488 }
489 
490 //========================================================================================================================
491 // getSupervisorPropertyUserPermissionsThreshold
492 // returns the threshold based on the requestType
493 WebUsers::permissionLevel_t
494 CorePropertySupervisorBase::getSupervisorPropertyUserPermissionsThreshold(
495  const std::string& requestType)
496 {
497  // check if need to setup properties
498  checkSupervisorPropertySetup();
499 
500  return StringMacros::getWildCardMatchFromMap(
501  requestType, propertyStruct_.UserPermissionsThreshold);
502 
503  // auto it = propertyStruct_.UserPermissionsThreshold.find(requestType);
504  // if(it == propertyStruct_.UserPermissionsThreshold.end())
505  // {
506  // __SUP_SS__ << "Could not find requestType named " << requestType << " in
507  // UserPermissionsThreshold map." << __E__;
508  // __SS_THROW__; //__SUP_SS_THROW__;
509  // }
510  // return it->second;
511 }
512 
513 //========================================================================================================================
514 // getRequestUserInfo ~
515 // extract user info for request based on property configuration
516 void CorePropertySupervisorBase::getRequestUserInfo(WebUsers::RequestUserInfo& userInfo)
517 {
518  checkSupervisorPropertySetup();
519 
520  //__SUP_COUT__ << "userInfo.requestType_ " << userInfo.requestType_ << " files: " <<
521  // cgiIn.getFiles().size() << __E__;
522 
523  userInfo.automatedCommand_ = StringMacros::inWildCardSet(
524  userInfo.requestType_,
525  propertyStruct_.AutomatedRequestTypes); // automatic commands should not refresh
526  // cookie code.. only user initiated
527  // commands should!
528  userInfo.NonXMLRequestType_ = StringMacros::inWildCardSet(
529  userInfo.requestType_, propertyStruct_.NonXMLRequestTypes); // non-xml request
530  // types just return
531  // the request return
532  // string to client
533  userInfo.NoXmlWhiteSpace_ = StringMacros::inWildCardSet(
534  userInfo.requestType_, propertyStruct_.NoXmlWhiteSpaceRequestTypes);
535 
536  //**** start LOGIN GATEWAY CODE ***//
537  // check cookieCode, sequence, userWithLock, and permissions access all in one shot!
538  {
539  userInfo.checkLock_ = StringMacros::inWildCardSet(
540  userInfo.requestType_, propertyStruct_.CheckUserLockRequestTypes);
541  userInfo.requireLock_ = StringMacros::inWildCardSet(
542  userInfo.requestType_, propertyStruct_.RequireUserLockRequestTypes);
543  userInfo.allowNoUser_ = StringMacros::inWildCardSet(
544  userInfo.requestType_, propertyStruct_.AllowNoLoginRequestTypes);
545 
546  userInfo.permissionsThreshold_ = -1; // default to max
547  try
548  {
549  userInfo.permissionsThreshold_ =
550  CorePropertySupervisorBase::getSupervisorPropertyUserPermissionsThreshold(
551  userInfo.requestType_);
552  }
553  catch(std::runtime_error& e)
554  {
555  if(!userInfo.automatedCommand_)
556  __SUP_COUT__ << "No explicit permissions threshold for request '"
557  << userInfo.requestType_
558  << "'... Defaulting to max threshold = "
559  << (unsigned int)userInfo.permissionsThreshold_ << __E__;
560  }
561 
562  // __COUTV__(userInfo.requestType_);
563  // __COUTV__(userInfo.checkLock_);
564  // __COUTV__(userInfo.requireLock_);
565  // __COUTV__(userInfo.allowNoUser_);
566  // __COUTV__((unsigned int)userInfo.permissionsThreshold_);
567 
568  try
569  {
570  StringMacros::getSetFromString(
571  StringMacros::getWildCardMatchFromMap(userInfo.requestType_,
572  propertyStruct_.UserGroupsAllowed),
573  userInfo.groupsAllowed_);
574  }
575  catch(std::runtime_error& e)
576  {
577  userInfo.groupsAllowed_.clear();
578 
579  // if(!userInfo.automatedCommand_)
580  // __SUP_COUT__ << "No explicit groups allowed for request '" <<
581  // userInfo.requestType_ << "'... Defaulting to empty groups
582  // allowed. " << __E__;
583  }
584  try
585  {
586  StringMacros::getSetFromString(
587  StringMacros::getWildCardMatchFromMap(
588  userInfo.requestType_, propertyStruct_.UserGroupsDisallowed),
589  userInfo.groupsDisallowed_);
590  }
591  catch(std::runtime_error& e)
592  {
593  userInfo.groupsDisallowed_.clear();
594 
595  // if(!userInfo.automatedCommand_)
596  // __SUP_COUT__ << "No explicit groups disallowed for request '"
597  //<<
598  // userInfo.requestType_ << "'... Defaulting to empty groups
599  // disallowed. " << __E__;
600  }
601  } //**** end LOGIN GATEWAY CODE ***//
602 
603  // completed user info, for the request type, is returned to caller
604 }
void init(xdaq::ApplicationContext *applicationContext)