XRootD
XrdSciTokensMon Class Reference

#include <XrdSciTokensMon.hh>

+ Inheritance diagram for XrdSciTokensMon:
+ Collaboration diagram for XrdSciTokensMon:

Public Member Functions

 XrdSciTokensMon ()
 
 ~XrdSciTokensMon ()
 
bool Mon_isIO (const Access_Operation oper)
 
void Mon_Report (const XrdSecEntity &Entity, const std::string &subject, const std::string &username)
 

Detailed Description

Definition at line 13 of file XrdSciTokensMon.hh.

Constructor & Destructor Documentation

◆ XrdSciTokensMon()

XrdSciTokensMon::XrdSciTokensMon ( )
inline

Definition at line 25 of file XrdSciTokensMon.hh.

25 {}

◆ ~XrdSciTokensMon()

XrdSciTokensMon::~XrdSciTokensMon ( )
inline

Definition at line 26 of file XrdSciTokensMon.hh.

26 {}

Member Function Documentation

◆ Mon_isIO()

bool XrdSciTokensMon::Mon_isIO ( const Access_Operation  oper)
inline

Definition at line 17 of file XrdSciTokensMon.hh.

18  {return oper == AOP_Read || oper == AOP_Update
19  || oper == AOP_Create || oper == AOP_Excl_Create;
20  }
@ AOP_Update
open() r/w or append
@ AOP_Create
open() with create
@ AOP_Read
open() r/o, prepare()
@ AOP_Excl_Create
open() with O_EXCL|O_CREAT

References AOP_Create, AOP_Excl_Create, AOP_Read, and AOP_Update.

Referenced by XrdAccSciTokens::Access().

+ Here is the caller graph for this function:

◆ Mon_Report()

void XrdSciTokensMon::Mon_Report ( const XrdSecEntity Entity,
const std::string &  subject,
const std::string &  username 
)

Definition at line 15 of file XrdSciTokensMon.cc.

18 {
19 // Create record
20 //
21  if (Entity.secMon)
22  {char buff[2048];
23  snprintf(buff, sizeof(buff),
24  "s=%s&n=%s&o=%s&r=%s&g=%.1024s",
25  subject.c_str(),username.c_str(),
26  (Entity.vorg ? Entity.vorg : ""),
27  (Entity.role ? Entity.role : ""),
28  (Entity.grps ? Entity.grps : ""));
29  Entity.secMon->Report(XrdSecMonitor::TokenInfo, buff);
30  }
31 }
char * vorg
Entity's virtual organization(s)
Definition: XrdSecEntity.hh:71
XrdSecMonitor * secMon
If !0 security monitoring enabled.
Definition: XrdSecEntity.hh:89
char * grps
Entity's group name(s)
Definition: XrdSecEntity.hh:73
char * role
Entity's role(s)
Definition: XrdSecEntity.hh:72
virtual bool Report(WhatInfo infoT, const char *info)=0

References XrdSecEntity::grps, XrdSecMonitor::Report(), XrdSecEntity::role, XrdSecEntity::secMon, XrdSecMonitor::TokenInfo, and XrdSecEntity::vorg.

Referenced by XrdAccSciTokens::Access().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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