XRootD
XrdSecEntity Class Reference

#include <XrdSecEntity.hh>

+ Collaboration diagram for XrdSecEntity:

Public Member Functions

 XrdSecEntity (const char *spName=0)
 
 ~XrdSecEntity ()
 
void Display (XrdSysError &mDest)
 
void Reset (const char *spV=0)
 

Public Attributes

XrdNetAddrInfoaddrInfo
 Entity's connection details. More...
 
char * caps
 Entity's capabilities. More...
 
char * creds
 Raw entity credentials or cert. More...
 
int credslen
 Length of the 'creds' data. More...
 
XrdSecEntityAttreaAPI
 non-const API to attributes More...
 
char * endorsements
 Protocol specific endorsements. More...
 
void * future [2]
 Reserved for future expansion. More...
 
gid_t gid
 Unix gid or 0 if none. More...
 
char * grps
 Entity's group name(s) More...
 
char * host
 Entity's host name dnr dependent. More...
 
char * moninfo
 Information for monitoring. More...
 
char * name
 Entity's name. More...
 
const char * pident
 Trace identifier (originator) More...
 
char prot [XrdSecPROTOIDSIZE]
 Auth protocol used (e.g. krb5) More...
 
char prox [XrdSecPROTOIDSIZE]
 Auth extractor used (e.g. xrdvoms) More...
 
char * role
 Entity's role(s) More...
 
XrdSecMonitorsecMon
 If !0 security monitoring enabled. More...
 
void * sessvar
 
const char * tident
 Trace identifier always preset. More...
 
unsigned int ueid
 Unique ID of entity instance. More...
 
uid_t uid
 Unix uid or 0 if none. More...
 
char * vorg
 Entity's virtual organization(s) More...
 

Detailed Description

Definition at line 64 of file XrdSecEntity.hh.

Constructor & Destructor Documentation

◆ XrdSecEntity()

XrdSecEntity::XrdSecEntity ( const char *  spName = 0)

Constructor.

Parameters
spName- The name of the security protocol.

Definition at line 40 of file XrdSecEntity.cc.

40  : eaAPI(new XrdSecEntityXtra)
41 {
42  Init(spName);
43 }
XrdSecEntityAttr * eaAPI
non-const API to attributes
Definition: XrdSecEntity.hh:92

◆ ~XrdSecEntity()

XrdSecEntity::~XrdSecEntity ( )

Definition at line 49 of file XrdSecEntity.cc.

50 {
51  delete eaAPI->entXtra;
52 }

References eaAPI.

Member Function Documentation

◆ Display()

void XrdSecEntity::Display ( XrdSysError mDest)

Dislay the contents of this object for debugging purposes.

Parameters
mDest- Reference to the message object to use.

Definition at line 58 of file XrdSecEntity.cc.

59 {
60  class AttrCB : public XrdSecEntityAttrCB
61  {public:
62  XrdSecEntityAttrCB::Action Attr(const char *key, const char *val)
63  {mDest.Say(Tid, " Attr ",key," = '", val, "'");
65  }
66  AttrCB(XrdSysError &erp, const char *tid) : mDest(erp), Tid(tid) {}
67  ~AttrCB() {}
68 
69  XrdSysError &mDest;
70  const char *Tid;
71  } displayAttr(mDest, tident);
72 
73  char theprot[XrdSecPROTOIDSIZE+1];
74 
75 // Avoid vulgarities of old gcc compilers that didn't implemented full C++11
76 //
77  typedef long long int LLint;
78  typedef long long unsigned int ULint;
79 
80 // Make sure the protocol is poperly set
81 //
82  memcpy(theprot, prot, XrdSecPROTOIDSIZE);
83  theprot[XrdSecPROTOIDSIZE] = 0;
84 
85 // Display this object
86 //
87  mDest.Say(tident, " Protocol '", theprot, "'");
88  mDest.Say(tident, " Name '", (name ? name : ""), "'");
89  mDest.Say(tident, " Host '", (host ? host : ""), "'");
90  mDest.Say(tident, " Vorg '", (vorg ? vorg : ""), "'");
91  mDest.Say(tident, " Role '", (role ? role : ""), "'");
92  mDest.Say(tident, " Grps '", (grps ? grps : ""), "'");
93  mDest.Say(tident, " Caps '", (caps ? caps : ""), "'");
94  mDest.Say(tident, " Pidn '", (pident ? pident : ""), "'");
95 
96  mDest.Say(tident, " Crlen ", std::to_string((LLint)credslen).c_str());
97  mDest.Say(tident, " ueid ", std::to_string((ULint)ueid).c_str());
98  mDest.Say(tident, " uid ", std::to_string((ULint)uid).c_str());
99  mDest.Say(tident, " gid ", std::to_string((ULint)gid).c_str());
100 
101 // Display it's attributes, if any
102 //
103  eaAPI->List(displayAttr);
104 }
#define XrdSecPROTOIDSIZE
Definition: XrdSecEntity.hh:47
@ Next
Proceed to the next key-value pair.
void List(XrdSecEntityAttrCB &attrCB)
char * vorg
Entity's virtual organization(s)
Definition: XrdSecEntity.hh:71
const char * pident
Trace identifier (originator)
Definition: XrdSecEntity.hh:82
int credslen
Length of the 'creds' data.
Definition: XrdSecEntity.hh:78
const char * tident
Trace identifier always preset.
Definition: XrdSecEntity.hh:81
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
Definition: XrdSecEntity.hh:67
char * caps
Entity's capabilities.
Definition: XrdSecEntity.hh:74
gid_t gid
Unix gid or 0 if none.
Definition: XrdSecEntity.hh:87
char * grps
Entity's group name(s)
Definition: XrdSecEntity.hh:73
uid_t uid
Unix uid or 0 if none.
Definition: XrdSecEntity.hh:86
char * name
Entity's name.
Definition: XrdSecEntity.hh:69
unsigned int ueid
Unique ID of entity instance.
Definition: XrdSecEntity.hh:79
char * role
Entity's role(s)
Definition: XrdSecEntity.hh:72
char * host
Entity's host name dnr dependent.
Definition: XrdSecEntity.hh:70
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
Definition: XrdSysError.cc:141

References caps, credslen, eaAPI, gid, grps, host, XrdSecEntityAttr::List(), name, XrdSecEntityAttrCB::Next, pident, prot, role, XrdSysError::Say(), tident, ueid, uid, vorg, and XrdSecPROTOIDSIZE.

Referenced by XrdHttpProtocol::Process().

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

◆ Reset()

void XrdSecEntity::Reset ( const char *  spV = 0)

Reset object to it's pristine self.

Parameters
spV- The name of the security protocol.

Definition at line 141 of file XrdSecEntity.cc.

142 {
143  Init(spV);
144  eaAPI->entXtra->Reset();
145 }

References eaAPI, and XrdSecEntityXtra::Reset().

+ Here is the call graph for this function:

Member Data Documentation

◆ addrInfo

◆ caps

char* XrdSecEntity::caps

Entity's capabilities.

Definition at line 74 of file XrdSecEntity.hh.

Referenced by XrdSecProtocolsss::Authenticate(), XrdSecProtocolgsi::Delete(), and Display().

◆ creds

◆ credslen

◆ eaAPI

◆ endorsements

◆ future

void* XrdSecEntity::future[2]

Reserved for future expansion.

Definition at line 90 of file XrdSecEntity.hh.

◆ gid

gid_t XrdSecEntity::gid

Unix gid or 0 if none.

Definition at line 87 of file XrdSecEntity.hh.

Referenced by XrdSecProtocolsss::Authenticate(), Display(), and XrdFfsMisc_xrd_secsss_register().

◆ grps

◆ host

◆ moninfo

◆ name

◆ pident

const char* XrdSecEntity::pident

Trace identifier (originator)

Definition at line 82 of file XrdSecEntity.hh.

Referenced by XrdSecProtocolsss::Authenticate(), and Display().

◆ prot

◆ prox

char XrdSecEntity::prox[XrdSecPROTOIDSIZE]

Auth extractor used (e.g. xrdvoms)

Definition at line 68 of file XrdSecEntity.hh.

Referenced by XrdVomsFun::VOMSFun().

◆ role

◆ secMon

XrdSecMonitor* XrdSecEntity::secMon

If !0 security monitoring enabled.

Definition at line 89 of file XrdSecEntity.hh.

Referenced by XrdAccSciTokens::Access(), XrdSciTokensMon::Mon_Report(), and XrdXrootdProtocol::MonAuth().

◆ sessvar

void* XrdSecEntity::sessvar

Plugin settable storage pointer, now deprecated. Use settable attribute objects instead.

Definition at line 83 of file XrdSecEntity.hh.

◆ tident

◆ ueid

unsigned int XrdSecEntity::ueid

Unique ID of entity instance.

Definition at line 79 of file XrdSecEntity.hh.

Referenced by XrdPssUrlInfo::XrdPssUrlInfo(), XrdPssSys::Connect(), XrdPssSys::Disc(), and Display().

◆ uid

uid_t XrdSecEntity::uid

Unix uid or 0 if none.

Definition at line 86 of file XrdSecEntity.hh.

Referenced by XrdSecProtocolsss::Authenticate(), Display(), and XrdFfsMisc_xrd_secsss_register().

◆ vorg


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