xrootd
Loading...
Searching...
No Matches
XrdSecEntity.hh
Go to the documentation of this file.
1#ifndef __SEC_ENTITY_H__
2#define __SEC_ENTITY_H__
3/******************************************************************************/
4/* */
5/* X r d S e c E n t i t y . h h */
6/* */
7/* (c) 2019 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Andrew Hanushevsky for Stanford University under contract */
9/* DE-AC02-76-SFO0515 with the Department of Energy */
10/* */
11/* This file is part of the XRootD software suite. */
12/* */
13/* XRootD is free software: you can redistribute it and/or modify it under */
14/* the terms of the GNU Lesser General Public License as published by the */
15/* Free Software Foundation, either version 3 of the License, or (at your */
16/* option) any later version. */
17/* */
18/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21/* License for more details. */
22/* */
23/* You should have received a copy of the GNU Lesser General Public License */
24/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26/* */
27/* The copyright holder's institutional names and contributor's names may not */
28/* be used to endorse or promote products derived from this software without */
29/* specific prior written permission of the institution or contributor. */
30/******************************************************************************/
31
32//------------------------------------------------------------------------------
43//------------------------------------------------------------------------------
44
45#include <sys/types.h>
46
47#define XrdSecPROTOIDSIZE 8
48
49class XrdNetAddrInfo;
51class XrdSecMonitor;
52class XrdSysError;
53
54/******************************************************************************/
55/* X r d S e c E n t i t y */
56/******************************************************************************/
57
58// The XrdSecEntity describes the client associated with a connection. One
59// such object is allocated for each clent connection and it persists until
60// the connection is closed. Note that when an entity has more than one
61// role or vorg, the fields <vorg, role, grps> form a columnar tuple. This
62// tuple must be repeated whenever any one of the values differs.
63//
65{
66public:
69 char *name;
70 char *host;
71 char *vorg;
72 char *role;
73 char *grps;
74 char *caps;
76 char *moninfo;
77 char *creds;
79unsigned int ueid;
81const char *tident;
82const char *pident;
83 void *sessvar;
86 uid_t uid;
87 gid_t gid;
88
90 void *future[2];
91
93
94//------------------------------------------------------------------------------
98//------------------------------------------------------------------------------
99
100 void Display(XrdSysError &mDest);
101
102//------------------------------------------------------------------------------
106//------------------------------------------------------------------------------
107
108 void Reset(const char *spV=0);
109
110//------------------------------------------------------------------------------
114//------------------------------------------------------------------------------
115
116 XrdSecEntity(const char *spName=0);
117
119
120private:
121void Init(const char *spV);
122};
123
124#define XrdSecClientName XrdSecEntity
125#define XrdSecServerName XrdSecEntity
126
127#endif
#define XrdSecPROTOIDSIZE
Definition XrdSecEntity.hh:47
Definition XrdNetAddrInfo.hh:54
Definition XrdSecEntityAttr.hh:55
Definition XrdSecEntity.hh:65
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
char prox[XrdSecPROTOIDSIZE]
Auth extractor used (e.g. xrdvoms)
Definition XrdSecEntity.hh:68
XrdNetAddrInfo * addrInfo
Entity's connection details.
Definition XrdSecEntity.hh:80
XrdSecEntityAttr * eaAPI
non-const API to attributes
Definition XrdSecEntity.hh:92
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
char * creds
Raw entity credentials or cert.
Definition XrdSecEntity.hh:77
XrdSecMonitor * secMon
If !0 security monitoring enabled.
Definition XrdSecEntity.hh:89
gid_t gid
Unix gid or 0 if none.
Definition XrdSecEntity.hh:87
void * sessvar
Definition XrdSecEntity.hh:83
char * grps
Entity's group name(s)
Definition XrdSecEntity.hh:73
void Reset(const char *spV=0)
XrdSecEntity(const char *spName=0)
uid_t uid
Unix uid or 0 if none.
Definition XrdSecEntity.hh:86
void * future[2]
Reserved for future expansion.
Definition XrdSecEntity.hh:90
void Init(const char *spV)
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 * endorsements
Protocol specific endorsements.
Definition XrdSecEntity.hh:75
void Display(XrdSysError &mDest)
char * moninfo
Information for monitoring.
Definition XrdSecEntity.hh:76
char * host
Entity's host name dnr dependent.
Definition XrdSecEntity.hh:70
Definition XrdSecMonitor.hh:34
Definition XrdSysError.hh:90