00001 #ifndef __SecsssID__ 00002 #define __SecsssID__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d S e c s s s I D . h h */ 00006 /* */ 00007 /* (c) 2020 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC02-76-SFO0515 with the Department of Energy */ 00011 /* */ 00012 /* This file is part of the XRootD software suite. */ 00013 /* */ 00014 /* XRootD is free software: you can redistribute it and/or modify it under */ 00015 /* the terms of the GNU Lesser General Public License as published by the */ 00016 /* Free Software Foundation, either version 3 of the License, or (at your */ 00017 /* option) any later version. */ 00018 /* */ 00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 00021 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 00022 /* License for more details. */ 00023 /* */ 00024 /* You should have received a copy of the GNU Lesser General Public License */ 00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 00026 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 00027 /* */ 00028 /* The copyright holder's institutional names and contributor's names may not */ 00029 /* be used to endorse or promote products derived from this software without */ 00030 /* specific prior written permission of the institution or contributor. */ 00031 /******************************************************************************/ 00032 00033 //----------------------------------------------------------------------------- 00049 class XrdSecEntity; 00050 class XrdSecsssCon; 00051 class XrdSecsssEnt; 00052 00053 class XrdSecsssID 00054 { 00055 public: 00056 friend class XrdSecProtocolsss; 00057 00058 //----------------------------------------------------------------------------- 00077 //----------------------------------------------------------------------------- 00078 00079 enum authType 00080 {idDynamic = 0, 00081 00082 idMapped = 3, 00083 00084 idMappedM = 4, 00085 00086 idStatic = 1, 00087 00088 00089 idStaticM = 2 00090 00091 }; 00092 00093 XrdSecsssID(authType aType=idStatic, const XrdSecEntity *Ident=0, 00094 XrdSecsssCon *Tracker=0, bool *isOK=0); 00095 00096 //----------------------------------------------------------------------------- 00112 //----------------------------------------------------------------------------- 00113 00114 bool Register(const char *lgnid, const XrdSecEntity *Ident, 00115 bool doReplace=false, bool defer=false); 00116 00117 private: 00118 00119 ~XrdSecsssID(); 00120 00121 //----------------------------------------------------------------------------- 00132 //----------------------------------------------------------------------------- 00133 00134 int Find(const char *lid, char *&dP, const char *myIP, int dataOpts=0); 00135 00136 //----------------------------------------------------------------------------- 00143 //----------------------------------------------------------------------------- 00144 static 00145 XrdSecsssID *getObj(authType &aType, XrdSecsssEnt *&idP); 00146 00147 static 00148 XrdSecsssEnt *genID(bool Secure); 00149 00150 XrdSecsssEnt *defaultID; 00151 authType myAuth; 00152 bool isStatic; 00153 bool trackOK; 00154 }; 00155 #endif