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

XrdNetAddrInfo * | addrInfo
| Entity's connection details.
char * | caps
| Entity's capabilities.
char * | creds
| Raw entity credentials or cert.
int | credslen
| Length of the 'creds' data.
XrdSecEntityAttr * | eaAPI
| 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).
XrdSecMonitor * | secMon
| 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.

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

References eaAPI.

## ~XrdSecEntity()

XrdSecEntity::~XrdSecEntity | ( |  | ) |

Definition at line 49 of file XrdSecEntity.cc.

{
delete eaAPI->entXtra;
}

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.

{
class AttrCB : public XrdSecEntityAttrCB
{public:
XrdSecEntityAttrCB::Action Attr(const char *key, const char *val)
{mDest.Say(Tid, " Attr ",key," = '", val, "'");
return XrdSecEntityAttrCB::Next;
}
AttrCB(XrdSysError &erp, const char *tid) : mDest(erp), Tid(tid) {}
~AttrCB() {}
XrdSysError &mDest;
const char *Tid;
} displayAttr(mDest, tident);
char theprot[XrdSecPROTOIDSIZE+1];
// Avoid vulgarities of old gcc compilers that didn't implemented full C++11
//
typedef long long int LLint;
typedef long long unsigned int ULint;
// Make sure the protocol is poperly set
//
memcpy(theprot, prot, XrdSecPROTOIDSIZE);
theprot[XrdSecPROTOIDSIZE] = 0;
// Display this object
//
mDest.Say(tident, " Protocol '", theprot, "'");
mDest.Say(tident, " Name '", (name ? name : ""), "'");
mDest.Say(tident, " Host '", (host ? host : ""), "'");
mDest.Say(tident, " Vorg '", (vorg ? vorg : ""), "'");
mDest.Say(tident, " Role '", (role ? role : ""), "'");
mDest.Say(tident, " Grps '", (grps ? grps : ""), "'");
mDest.Say(tident, " Caps '", (caps ? caps : ""), "'");
mDest.Say(tident, " Pidn '", (pident ? pident : ""), "'");
mDest.Say(tident, " Crlen ", std::to_string((LLint)credslen).c_str());
mDest.Say(tident, " ueid ", std::to_string((ULint)ueid).c_str());
mDest.Say(tident, " uid ", std::to_string((ULint)uid).c_str());
mDest.Say(tident, " gid ", std::to_string((ULint)gid).c_str());
// Display it's attributes, if any
//
eaAPI->List(displayAttr);
}
XrdSecPROTOIDSIZE
#define XrdSecPROTOIDSIZE
Definition XrdSecEntity.hh:47
XrdSecEntityAttrCB::Action
Action
Definition XrdSecEntityAttr.hh:165
XrdSecEntityAttrCB::Next
@ Next
Proceed to the next key-value pair.
Definition XrdSecEntityAttr.hh:167
XrdSecEntityAttrCB::Attr
virtual Action Attr(const char *key, const char *val)=0
XrdSecEntity::vorg
char * vorg
Entity's virtual organization(s).
Definition XrdSecEntity.hh:71
XrdSecEntity::pident
const char * pident
Trace identifier (originator).
Definition XrdSecEntity.hh:82
XrdSecEntity::credslen
int credslen
Length of the 'creds' data.
Definition XrdSecEntity.hh:78
XrdSecEntity::tident
const char * tident
Trace identifier always preset.
Definition XrdSecEntity.hh:81
XrdSecEntity::prot
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5).
Definition XrdSecEntity.hh:67
XrdSecEntity::caps
char * caps
Entity's capabilities.
Definition XrdSecEntity.hh:74
XrdSecEntity::gid
gid_t gid
Unix gid or 0 if none.
Definition XrdSecEntity.hh:87
XrdSecEntity::grps
char * grps
Entity's group name(s).
Definition XrdSecEntity.hh:73
XrdSecEntity::uid
uid_t uid
Unix uid or 0 if none.
Definition XrdSecEntity.hh:86
XrdSecEntity::name
char * name
Entity's name.
Definition XrdSecEntity.hh:69
XrdSecEntity::ueid
unsigned int ueid
Unique ID of entity instance.
Definition XrdSecEntity.hh:79
XrdSecEntity::role
char * role
Entity's role(s).
Definition XrdSecEntity.hh:72
XrdSecEntity::host
char * host
Entity's host name dnr dependent.
Definition XrdSecEntity.hh:70
XrdSysError::Say
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, name, XrdSecEntityAttrCB::Next, pident, prot, role, XrdSysError::Say(), tident, ueid, uid, vorg, and XrdSecPROTOIDSIZE.

Here is the call 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.

{
Init(spV);
eaAPI->entXtra->Reset();
}

References eaAPI.

## Member Data Documentation

## addrInfo

XrdNetAddrInfo* XrdSecEntity::addrInfo

Entity's connection details.

Definition at line 80 of file XrdSecEntity.hh.

Referenced by XrdAccSciTokens::Access(), XrdCmsSecurity::Authenticate(), XrdDigAuth::Authorize(), XrdOfsTPC::Authorize(), XrdNetPMarkCfg::Begin(), XrdHttpTpc::PMarkManager::beginPMarks(), XrdSsiFileResource::Init(), XrdCmsRedirLocal::Locate(), XrdHttpProtocol::Match(), XrdXrootdProtocol::Match(), XrdSecProtector::New4Server(), and XrdAccAccess::Resolve().

## caps

char* XrdSecEntity::caps

Entity's capabilities.

Definition at line 74 of file XrdSecEntity.hh.

Referenced by Display().

## creds

char* XrdSecEntity::creds

Raw entity credentials or cert.

Definition at line 77 of file XrdSecEntity.hh.

Referenced by Macaroons::Authz::Access(), XrdAccSciTokens::Access(), XrdHttpReq::appendOpaque(), XrdVomsHttp::GetSecData(), XrdSsiFileResource::Init(), XrdOfsTPC::Validate(), XrdVomsFun::VOMSFun(), and XrdSecgsiAuthzKey().

## credslen

int XrdSecEntity::credslen

Length of the 'creds' data.

Definition at line 78 of file XrdSecEntity.hh.

Referenced by Macaroons::Authz::Access(), XrdAccSciTokens::Access(), XrdHttpReq::appendOpaque(), Display(), XrdSsiFileResource::Init(), XrdOfsTPC::Validate(), XrdVomsFun::VOMSFun(), and XrdSecgsiAuthzKey().

## eaAPI

XrdSecEntityAttr* XrdSecEntity::eaAPI

non-const API to attributes

Definition at line 92 of file XrdSecEntity.hh.

Referenced by XrdSecEntity(), ~XrdSecEntity(), Macaroons::Authz::Access(), XrdAccAccess::Access(), XrdAccSciTokens::Access(), XrdVomsMapfile::Apply(), XrdAccAccess::Audit(), Display(), XrdAccEntity::GetEntity(), XrdThrottleManager::GetUserInfo(), XrdAccEntity::PutEntity(), XrdOfs::rename(), and Reset().

## endorsements

char* XrdSecEntity::endorsements

Protocol specific endorsements.

Definition at line 75 of file XrdSecEntity.hh.

Referenced by XrdHttpReq::appendOpaque(), XrdSsiFileResource::Init(), and XrdVomsFun::VOMSFun().

## 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 Display(), and XrdFfsMisc_xrd_secsss_register().

## grps

char* XrdSecEntity::grps

Entity's group name(s).

Definition at line 73 of file XrdSecEntity.hh.

Referenced by XrdAccSciTokens::Access(), XrdHttpReq::appendOpaque(), XrdVomsMapfile::Apply(), XrdDigAuth::Authorize(), Display(), XrdSsiFileResource::Init(), XrdOfsTPCAllow::Match(), XrdSciTokensMon::Mon_Report(), XrdVomsFun::VOMSFun(), XrdFfsMisc_xrd_secsss_register(), and XrdSecgsiAuthzFun().

## host

char* XrdSecEntity::host

Entity's host name dnr dependent.

Definition at line 70 of file XrdSecEntity.hh.

Referenced by XrdHttpReq::appendOpaque(), XrdAccAccess::Audit(), calcHashes(), Display(), XrdOfsTPC::genOrg(), XrdSsiFileResource::Init(), main(), XrdXrootdProtocol::Match(), and XrdAccAccess::Resolve().

## moninfo

char* XrdSecEntity::moninfo

Information for monitoring.

Definition at line 76 of file XrdSecEntity.hh.

Referenced by XrdHttpReq::appendOpaque(), and calcHashes().

## name

char* XrdSecEntity::name

Entity's name.

Definition at line 69 of file XrdSecEntity.hh.

Referenced by XrdAccAccess::Access(), XrdHttpReq::appendOpaque(), XrdVomsMapfile::Apply(), XrdAccAccess::Audit(), XrdCmsSecurity::Authenticate(), XrdDigAuth::Authorize(), calcHashes(), Display(), XrdThrottleManager::GetUserInfo(), XrdSsiFileResource::Init(), main(), XrdOfsTPCAllow::Match(), XrdAccSciTokens::Validate(), XrdFfsMisc_xrd_secsss_register(), and XrdSecgsiAuthzFun().

## pident

const char* XrdSecEntity::pident

Trace identifier (originator).

Definition at line 82 of file XrdSecEntity.hh.

Referenced by Display().

## prot

char XrdSecEntity::prot[XrdSecPROTOIDSIZE]

Auth protocol used (e.g. krb5).

Definition at line 67 of file XrdSecEntity.hh.

Referenced by Macaroons::Authz::Access(), XrdAccSciTokens::Access(), XrdAccAccess::Audit(), XrdDigAuth::Authorize(), Display(), XrdVomsHttp::GetSecData(), XrdSsiFileResource::Init(), main(), XrdXrootdProtocol::Match(), XrdSecProtector::New4Server(), XrdOfsTPC::Screen(), and XrdOfsTPC::Validate().

## prox

char XrdSecEntity::prox[XrdSecPROTOIDSIZE]

Auth extractor used (e.g. xrdvoms).

Definition at line 68 of file XrdSecEntity.hh.

Referenced by XrdVomsFun::VOMSFun().

## role

char* XrdSecEntity::role

Entity's role(s).

Definition at line 72 of file XrdSecEntity.hh.

Referenced by XrdAccSciTokens::Access(), XrdHttpReq::appendOpaque(), XrdVomsMapfile::Apply(), XrdDigAuth::Authorize(), Display(), XrdSsiFileResource::Init(), XrdSciTokensMon::Mon_Report(), and XrdVomsFun::VOMSFun().

## secMon

XrdSecMonitor* XrdSecEntity::secMon

If !0 security monitoring enabled.

Definition at line 89 of file XrdSecEntity.hh.

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

## sessvar

void* XrdSecEntity::sessvar

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

Definition at line 83 of file XrdSecEntity.hh.

## tident

const char* XrdSecEntity::tident

Trace identifier always preset.

Definition at line 81 of file XrdSecEntity.hh.

Referenced by XrdPssUrlInfo::XrdPssUrlInfo(), XrdAccAccess::Audit(), XrdOfsTPC::Authorize(), XrdNetPMarkCfg::Begin(), XrdOfsPrepGPIReal::PrepGPI::begin(), XrdOfsPrepGPIReal::PrepGPI::cancel(), XrdPssSys::Connect(), XrdPssSys::Disc(), Display(), XrdOfsTPC::genOrg(), XrdAccEntity::GetEntity(), XrdSsiFileResource::Init(), XrdSecProtector::New4Server(), XrdOfsPrepGPIReal::PrepGPI::query(), and XrdOfsTPC::Validate().

## 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 Display(), and XrdFfsMisc_xrd_secsss_register().

## vorg

char* XrdSecEntity::vorg

Entity's virtual organization(s).

Definition at line 71 of file XrdSecEntity.hh.

Referenced by XrdAccSciTokens::Access(), XrdHttpReq::appendOpaque(), XrdVomsMapfile::Apply(), XrdDigAuth::Authorize(), calcHashes(), Display(), XrdThrottleManager::GetUserInfo(), XrdSsiFileResource::Init(), XrdOfsTPCAllow::Match(), XrdSciTokensMon::Mon_Report(), XrdVomsFun::VOMSFun(), and XrdSecgsiAuthzFun().

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

- XrdSecEntity.hh
- XrdSecEntity.cc