xrootd
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 
49 class XrdNetAddrInfo;
50 class XrdSecEntityAttr;
51 class XrdSysError;
52 
53 /******************************************************************************/
54 /* X r d S e c E n t i t y */
55 /******************************************************************************/
56 
57 // The XrdSecEntity describes the client associated with a connection. One
58 // such object is allocated for each clent connection and it persists until
59 // the connection is closed. Note that when an entity has more than one
60 // role or vorg, the fields <vorg, role, grps> form a columnar tuple. This
61 // tuple must be repeated whenever any one of the values differs.
62 //
64 {
65 public:
68  char *name;
69  char *host;
70  char *vorg;
71  char *role;
72  char *grps;
73  char *caps;
74  char *endorsements;
75  char *moninfo;
76  char *creds;
77  int credslen;
78 unsigned int ueid;
80 const char *tident;
81 const char *pident;
82  void *sessvar;
83  uid_t uid;
86  gid_t gid;
87 
88  void *future[3];
89 
91 
92 //------------------------------------------------------------------------------
96 //------------------------------------------------------------------------------
97 
98  void Display(XrdSysError &mDest);
99 
100 //------------------------------------------------------------------------------
104 //------------------------------------------------------------------------------
105 
106  void Reset(const char *spV=0);
107 
108 //------------------------------------------------------------------------------
112 //------------------------------------------------------------------------------
113 
114  XrdSecEntity(const char *spName=0);
115 
116  ~XrdSecEntity();
117 
118 private:
119 void Init(const char *spV);
120 };
121 
122 #define XrdSecClientName XrdSecEntity
123 #define XrdSecServerName XrdSecEntity
124 
125 #endif
char * grps
Entity&#39;s group name(s)
Definition: XrdSecEntity.hh:72
Definition: XrdSecEntityAttr.hh:54
char * host
Entity&#39;s host name dnr dependent.
Definition: XrdSecEntity.hh:69
char * name
Entity&#39;s name.
Definition: XrdSecEntity.hh:68
void * sessvar
Definition: XrdSecEntity.hh:82
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
Definition: XrdSecEntity.hh:66
const char * tident
Trace identifier always preset.
Definition: XrdSecEntity.hh:80
int credslen
Length of the &#39;creds&#39; data.
Definition: XrdSecEntity.hh:77
const char * pident
Trace identifier (originator)
Definition: XrdSecEntity.hh:81
char * role
Entity&#39;s role(s)
Definition: XrdSecEntity.hh:71
Definition: XrdSysError.hh:89
#define XrdSecPROTOIDSIZE
Definition: XrdSecEntity.hh:47
void Display(XrdSysError &mDest)
uid_t uid
Unix uid or 0 if none.
Definition: XrdSecEntity.hh:85
char prox[XrdSecPROTOIDSIZE]
Auth extractor used (e.g. xrdvoms)
Definition: XrdSecEntity.hh:67
char * caps
Entity&#39;s capabilities.
Definition: XrdSecEntity.hh:73
char * moninfo
Information for monitoring.
Definition: XrdSecEntity.hh:75
Definition: XrdNetAddrInfo.hh:53
void Init(const char *spV)
void * future[3]
Reserved for future expansion.
Definition: XrdSecEntity.hh:88
XrdNetAddrInfo * addrInfo
Entity&#39;s connection details.
Definition: XrdSecEntity.hh:79
char * vorg
Entity&#39;s virtual organization(s)
Definition: XrdSecEntity.hh:70
XrdSecEntityAttr * eaAPI
non-const API to attributes
Definition: XrdSecEntity.hh:90
char * creds
Raw entity credentials or cert.
Definition: XrdSecEntity.hh:76
XrdSecEntity(const char *spName=0)
unsigned int ueid
Unique ID of entity instance.
Definition: XrdSecEntity.hh:78
void Reset(const char *spV=0)
Definition: XrdSecEntity.hh:63
gid_t gid
Unix gid or 0 if none.
Definition: XrdSecEntity.hh:86
char * endorsements
Protocol specific endorsements.
Definition: XrdSecEntity.hh:74