xrootd
XrdCmsSecurity.hh
Go to the documentation of this file.
00001 #ifndef _CMS_SECURITY_H
00002 #define _CMS_SECURITY_H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                     X r d C m s S e c u r i t y . h h                      */
00006 /*                                                                            */
00007 /* (c) 2007 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 
00013 #include <sys/types.h>
00014 #include <sys/socket.h>
00015 
00016 #include "XrdSec/XrdSecInterface.hh"
00017 
00018 class XrdLink;
00019 class XrdOucTList;
00020 
00021 class XrdCmsSecurity
00022 {
00023 public:
00024 
00025 static int             Authenticate(XrdLink *Link, const char *Token, int tlen);
00026 
00027 static int             Configure(const char *Lib, const char *Cfn=0);
00028 
00029 static const char     *getToken(int &size, const char *hostname);
00030 
00031 static int             Identify(XrdLink *Link, XrdCms::CmsRRHdr &inHdr,
00032                                 char *authBuff, int abLen);
00033 
00034 static void            setSecFunc(void *secfP);
00035 
00036 static char           *setSystemID(XrdOucTList *tp, const char *iName,
00037                                    const char  *iHost,    char  iType);
00038 
00039       XrdCmsSecurity() {}
00040      ~XrdCmsSecurity() {}
00041 
00042 private:
00043 static XrdSecService *DHS;
00044 };
00045 #endif