xrootd
Loading...
Searching...
No Matches
XrdVomsFun.hh
Go to the documentation of this file.
1#ifndef ___XRD_VOMSFUN_H___
2#define ___XRD_VOMSFUN_H___
3/******************************************************************************/
4/* */
5/* X r d V o m s F u n . h h */
6/* */
7/* (C) 2013 G. Ganis, CERN */
8/* */
9/* All rights reserved. The copyright holder's institutional names may not */
10/* be used to endorse or promote products derived from this software without */
11/* specific prior written permission. */
12/* */
13/* This file is part of the VOMS extraction XRootD plug-in software suite, */
14/* here after called VOMS-XRootD (see https://github.com/gganis/voms). */
15/* */
16/* VOMS-XRootD is free software: you can redistribute it and/or modify it */
17/* under the terms of the GNU Lesser General Public License as published by */
18/* the Free Software Foundation, either version 3 of the License, or (at */
19/* your option) any later version. */
20/* */
21/* VOMS-XRootD is distributed in the hope that it will be useful, but */
22/* WITHOUT ANY WARRANTY, not even the implied warranty of MERCHANTABILITY or */
23/* FITNESS FOR A PARTICULAR PURPOSE. */
24/* See the GNU Lesser General Public License for more details. */
25/* */
26/* You should have received a copy of the GNU Lesser General Public License */
27/* along with VOMS-XRootD in a file called COPYING.LGPL (LGPL license) and */
28/* file COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
29/* */
30/******************************************************************************/
31
32#include "openssl/x509.h"
33#include "openssl/pem.h"
34
35#include "XrdOuc/XrdOucHash.hh"
37
38class XrdSecEntity;
39class XrdSysError;
40class XrdSysLogger;
41class XrdVomsMapfile;
42
44{
45public:
46
47// Supported cert formats
48//
54
56
58
59int VOMSInit(const char *cfg);
60
62
63 ~XrdVomsFun() {} // Once constructed never deleted (except for Http).
64
65private:
66
67void FmtExtract(XrdOucString &out, XrdOucString in, const char *tag);
68void NameOneLine(X509_NAME *nm, XrdOucString &s);
70
71// These settings are configurable
72//
73
74CertFormat gCertFmt; // certfmt: see constructor
75short gGrpWhich; // grpopt's which = 0|1|2 [2]
76short gDebug; // Verbosity control 0 | 1 | 2
77XrdOucHash<int> gGrps; // hash table with grps=grp1[,grp2,...]
78XrdOucHash<int> gVOs; // hash table with vos=vo1[,vo2,...]
79XrdOucString gRequire; // String with configuration options use to:
80XrdOucString gGrpFmt; // format contents of XrdSecEntity::grps
81XrdOucString gRoleFmt; // format contents of XrdSecEntity::role
82XrdOucString gVoFmt; // format contents of XrdSecEntity::vorg
83
86
88};
89#endif
Definition XrdOucHash.hh:128
Definition XrdOucString.hh:254
Definition XrdSecEntity.hh:65
Definition XrdSysError.hh:90
Definition XrdSysLogger.hh:53
Definition XrdVomsFun.hh:44
XrdVomsMapfile * m_mapfile
Definition XrdVomsFun.hh:87
short gDebug
Definition XrdVomsFun.hh:76
XrdSysError & gDest
Definition XrdVomsFun.hh:84
XrdVomsFun(XrdSysError &erp)
void SetCertFmt(CertFormat n)
Definition XrdVomsFun.hh:55
XrdOucString gRoleFmt
Definition XrdVomsFun.hh:81
CertFormat gCertFmt
Definition XrdVomsFun.hh:74
int VOMSInit(const char *cfg)
XrdSysLogger * gLogger
Definition XrdVomsFun.hh:85
XrdOucHash< int > gVOs
Definition XrdVomsFun.hh:78
int VOMSFun(XrdSecEntity &ent)
void FmtReplace(XrdSecEntity &ent)
XrdOucHash< int > gGrps
Definition XrdVomsFun.hh:77
void FmtExtract(XrdOucString &out, XrdOucString in, const char *tag)
XrdOucString gGrpFmt
Definition XrdVomsFun.hh:80
XrdOucString gVoFmt
Definition XrdVomsFun.hh:82
XrdOucString gRequire
Definition XrdVomsFun.hh:79
short gGrpWhich
Definition XrdVomsFun.hh:75
CertFormat
Definition XrdVomsFun.hh:50
@ gCertX509
Definition XrdVomsFun.hh:52
@ gCertPEM
Definition XrdVomsFun.hh:51
@ gCertRaw
Definition XrdVomsFun.hh:50
void NameOneLine(X509_NAME *nm, XrdOucString &s)
~XrdVomsFun()
Definition XrdVomsFun.hh:63
Definition XrdVomsMapfile.hh:37