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

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.

41{
42 Init(spName);
43}
XrdSecEntityAttr * eaAPI
non-const API to attributes

◆ ~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
@ Next
Proceed to the next key-value pair.
virtual Action Attr(const char *key, const char *val)=0
void List(XrdSecEntityAttrCB &attrCB)
char * vorg
Entity's virtual organization(s)
const char * pident
Trace identifier (originator)
int credslen
Length of the 'creds' data.
const char * tident
Trace identifier always preset.
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
char * caps
Entity's capabilities.
gid_t gid
Unix gid or 0 if none.
char * grps
Entity's group name(s)
uid_t uid
Unix uid or 0 if none.
char * name
Entity's name.
unsigned int ueid
Unique ID of entity instance.
char * role
Entity's role(s)
char * host
Entity's host name dnr dependent.
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)

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: