XRootD
XrdSecServer.hh
Go to the documentation of this file.
1
#ifndef __XRDSECSERVER_H__
2
#define __XRDSECSERVER_H__
3
/******************************************************************************/
4
/* */
5
/* X r d S e c S e r v e r . h h */
6
/* */
7
/* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved */
9
/* Produced by Andrew Hanushevsky for Stanford University under contract */
10
/* DE-AC02-76-SFO0515 with the Department of Energy */
11
/* */
12
/* This file is part of the XRootD software suite. */
13
/* */
14
/* XRootD is free software: you can redistribute it and/or modify it under */
15
/* the terms of the GNU Lesser General Public License as published by the */
16
/* Free Software Foundation, either version 3 of the License, or (at your */
17
/* option) any later version. */
18
/* */
19
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22
/* License for more details. */
23
/* */
24
/* You should have received a copy of the GNU Lesser General Public License */
25
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27
/* */
28
/* The copyright holder's institutional names and contributor's names may not */
29
/* be used to endorse or promote products derived from this software without */
30
/* specific prior written permission of the institution or contributor. */
31
/******************************************************************************/
32
33
#include "
XrdSys/XrdSysError.hh
"
34
#include "
XrdSys/XrdSysLogger.hh
"
35
#include "
XrdOuc/XrdOucStream.hh
"
36
#include "
XrdSec/XrdSecInterface.hh
"
37
#include "
XrdSec/XrdSecPManager.hh
"
38
39
class
XrdSecPinInfo
;
40
class
XrdSecProtBind
;
41
class
XrdSecSecEntityPin;
42
class
XrdOucTrace
;
43
class
XrdNetAddrInfo
;
44
45
class
XrdSecServer
:
XrdSecService
46
{
47
public
:
48
49
const
char
*
getParms
(
int
&size,
XrdNetAddrInfo
*endPoint=0);
50
51
// = 0 -> No protocol can be returned (einfo has the reason)
52
// ! 0 -> Address of protocol object is bing returned.
53
//
54
XrdSecProtocol
*
getProtocol
(
const
char
*host,
// In
55
XrdNetAddrInfo
&endPoint,
// In
56
const
XrdSecCredentials
*cred,
// In
57
XrdOucErrInfo
&einfo);
// Out
58
59
bool
PostProcess
(
XrdSecEntity
&entity,
60
XrdOucErrInfo
&einfo);
61
62
int
Configure
(
const
char
*cfn);
63
64
const
char
*
protTLS
() {
return
PManager.
protTLS
();}
65
66
XrdSecServer
(
XrdSysLogger
*lp);
67
~XrdSecServer
() {}
// Server is never deleted
68
69
private
:
70
71
static
XrdSecPManager
PManager;
72
73
union
{
XrdSecPinInfo
*pinInfo;
XrdSecEntityPin
*secEntityPin;};
74
75
XrdSysError
eDest;
// Error message object
76
const
char
*configFN;
// -> Configuration file
77
XrdOucTrace
*SecTrace;
// -> Tracing object
78
XrdSecProtBind
*bpFirst;
// -> First bound protocol
79
XrdSecProtBind
*bpLast;
// -> Last bound protocol
80
XrdSecProtBind
*bpDefault;
// -> Default binding
81
char
*pidList;
// -> List of colon separated defined protocols
82
char
*SToken;
// -> Security token sent to client
83
char
*STBuff;
// -> Buffer used to construct SToken
84
int
STBlen;
// -> Length of the buffer
85
bool
Enforce;
// True if binding must be enforced
86
bool
implauth;
// True if host protocol is implicitly activated
87
88
int
add2token(
XrdSysError
&erp,
char
*,
char
**,
int
&,
XrdSecPMask_t
&);
89
int
ConfigFile(
const
char
*cfn);
90
int
ConfigXeq(
char
*var,
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
91
int
ProtBind_Complete(
XrdSysError
&Eroute);
92
int
xenlib(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
93
int
xlevel(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
94
int
xpbind(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
95
int
xpparm(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
96
int
xprot(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
97
int
xtrace(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
98
};
99
#endif
XrdOucStream.hh
XrdSecInterface.hh
XrdSecPManager.hh
XrdSecPMask_t
int XrdSecPMask_t
Definition:
XrdSecPManager.hh:40
XrdSysError.hh
XrdSysLogger.hh
XrdNetAddrInfo
Definition:
XrdNetAddrInfo.hh:54
XrdOucErrInfo
Definition:
XrdOucErrInfo.hh:101
XrdOucStream
Definition:
XrdOucStream.hh:47
XrdOucTrace
Definition:
XrdOucTrace.hh:36
XrdSecEntityPin
Definition:
XrdSecEntityPin.hh:46
XrdSecEntity
Definition:
XrdSecEntity.hh:65
XrdSecPManager
Definition:
XrdSecPManager.hh:48
XrdSecPManager::protTLS
const char * protTLS()
Definition:
XrdSecPManager.hh:80
XrdSecPinInfo
Definition:
XrdSecServer.cc:78
XrdSecProtBind
Definition:
XrdSecServer.cc:97
XrdSecProtocol
Definition:
XrdSecInterface.hh:131
XrdSecServer
Definition:
XrdSecServer.hh:46
XrdSecServer::getProtocol
XrdSecProtocol * getProtocol(const char *host, XrdNetAddrInfo &endPoint, const XrdSecCredentials *cred, XrdOucErrInfo &einfo)
Definition:
XrdSecServer.cc:356
XrdSecServer::getParms
const char * getParms(int &size, XrdNetAddrInfo *endPoint=0)
Definition:
XrdSecServer.cc:317
XrdSecServer::XrdSecServer
XrdSecServer(XrdSysLogger *lp)
Definition:
XrdSecServer.cc:288
XrdSecServer::Configure
int Configure(const char *cfn)
Definition:
XrdSecServer.cc:441
XrdSecServer::protTLS
const char * protTLS()
Definition:
XrdSecServer.hh:64
XrdSecServer::PostProcess
bool PostProcess(XrdSecEntity &entity, XrdOucErrInfo &einfo)
Definition:
XrdSecServer.cc:407
XrdSecServer::~XrdSecServer
~XrdSecServer()
Definition:
XrdSecServer.hh:67
XrdSecService
Definition:
XrdSecInterface.hh:554
XrdSysError
Definition:
XrdSysError.hh:90
XrdSysLogger
Definition:
XrdSysLogger.hh:53
XrdCms::Config
XrdCmsConfig Config
Definition:
XrdCmsConfig.cc:108
XrdSecBuffer
Generic structure to pass security information back and forth.
Definition:
XrdSecInterface.hh:51
XrdSec
XrdSecServer.hh
Generated by
1.9.1