|
xrootd
|
#include <XrdHttpProtocol.hh>


Classes | |
| struct | extHInfo |
| struct | StaticPreloadInfo |
| struct | XrdHttpExtHandlerInfo |
Public Member Functions | |
| void | DoIt () |
| Override from the base class. More... | |
| XrdProtocol * | Match (XrdLink *lp) |
| Tells if the oustanding bytes on the socket match this protocol implementation. More... | |
| int | Process (XrdLink *lp) |
| Process data incoming from the socket. More... | |
| void | Recycle (XrdLink *lp, int consec, const char *reason) |
| Recycle this instance. More... | |
| int | Stats (char *buff, int blen, int do_sync=0) |
| Get activity stats. More... | |
| int | doStat (char *fname) |
| Perform a Stat request. More... | |
| int | doChksum (const XrdOucString &fname) |
| Perform a checksum request. More... | |
| XrdHttpProtocol (const XrdHttpProtocol &)=default | |
| Ctor, dtors and copy ctor. More... | |
| XrdHttpProtocol | operator= (const XrdHttpProtocol &rhs) |
| XrdHttpProtocol (bool imhttps) | |
| ~XrdHttpProtocol () | |
| bool | isHTTPS () |
| called via https More... | |
Public Member Functions inherited from XrdProtocol | |
| XrdProtocol (const char *jname) | |
| virtual | ~XrdProtocol () |
Public Member Functions inherited from XrdJob | |
| XrdJob (const char *desc="") | |
| virtual | ~XrdJob () |
Static Public Member Functions | |
| static int | Configure (char *parms, XrdProtocol_Config *pi) |
| Read and apply the configuration. More... | |
Public Attributes | |
| XrdObject< XrdHttpProtocol > | ProtLink |
| XrdSecEntity | SecEntity |
| Authentication area. More... | |
Public Attributes inherited from XrdJob | |
| XrdJob * | NextJob |
| const char * | Comment |
Static Public Attributes | |
| static XrdObjectQ< XrdHttpProtocol > | ProtStack |
Protected Attributes | |
| XrdLink * | Link |
| The link we are bound to. More... | |
| char * | Addr_str |
| XrdXrootd::Bridge * | Bridge |
| The Bridge that we use to exercise the xrootd internals. More... | |
| XrdHttpReq | CurrentReq |
Static Protected Attributes | |
| static XrdScheduler * | Sched |
| static XrdBuffManager * | BPool |
| static XrdSysError | eDest |
| static XrdSecService * | CIA |
| static XrdOucGMap * | servGMap |
| The instance of the DN mapper. Created only when a valid path is given. More... | |
| static int | hailWait |
| Timeout for reading the handshake. More... | |
| static int | readWait |
| Timeout for reading data. More... | |
| static int | Port |
| Our port. More... | |
| static char * | Port_str |
| Our port, as a string. More... | |
| static char * | sslcert |
| OpenSSL stuff. More... | |
| static char * | sslkey |
| static char * | sslcadir |
| static char * | sslcafile |
| static char * | sslcipherfilter |
| static char * | gridmap |
| Gridmap file location. The same used by XrdSecGsi. More... | |
| static bool | isRequiredGridmap |
| static char * | secretkey |
| The key used to calculate the url hashes. More... | |
| static int | sslverifydepth |
| Depth of verification of a certificate chain. More... | |
| static bool | isdesthttps |
| True if the redirections must be towards https targets. More... | |
| static char * | listredir |
| Url to redirect to in the case a listing is requested. More... | |
| static bool | listdeny |
| If true, any form of listing is denied. More... | |
| static bool | selfhttps2http |
| If client is HTTPS, self-redirect with HTTP+token. More... | |
| static bool | embeddedstatic |
| If true, use the embedded css and icons. More... | |
| static char * | staticredir |
| static XrdOucHash< StaticPreloadInfo > * | staticpreload |
| static kXR_int32 | myRole |
| Our role. More... | |
| static std::map< std::string, std::string > | hdr2cgimap |
| Rules that turn HTTP headers to cgi tokens in the URL, for internal comsumption. More... | |
| static int | m_bio_type |
| Type identifier for our custom BIO objects. More... | |
| static BIO_METHOD * | m_bio_method |
| C-style vptr table for our custom BIO objects. More... | |
Private Member Functions | |
| int | StartSimpleResp (int code, const char *desc, const char *header_to_add, long long bodylen, bool keepalive) |
| Start a response back to the client. More... | |
| int | SendData (const char *body, int bodylen) |
| Send some generic data to the client. More... | |
| void | Cleanup () |
| Deallocate resources, in order to reutilize an object of this class. More... | |
| void | Reset () |
| Reset values, counters, in order to reutilize an object of this class. More... | |
| int | HandleAuthentication (XrdLink *lp) |
| int | GetVOMSData (XrdLink *lp) |
| int | HandleGridMap (XrdLink *lp) |
| int | getDataOneShot (int blen, bool wait=false) |
| int | BuffAvailable () |
| How many bytes still fit into the buffer in a contiguous way. More... | |
| int | BuffUsed () |
| How many bytes in the buffer. More... | |
| int | BuffFree () |
| How many bytes free in the buffer. More... | |
| void | BuffConsume (int blen) |
| Consume some bytes from the buffer. More... | |
| int | BuffgetData (int blen, char **data, bool wait) |
| Get a pointer, valid for up to blen bytes from the buffer. Returns the validity. More... | |
| int | BuffgetLine (XrdOucString &dest) |
| Copy a full line of text from the buffer into dest. Zero if no line can be found in the buffer. More... | |
| int | SendSimpleResp (int code, const char *desc, const char *header_to_add, const char *body, long long bodylen, bool keepalive) |
| Sends a basic response. If the length is < 0 then it is calculated internally. More... | |
| int | StartChunkedResp (int code, const char *desc, const char *header_to_add, bool keepalive) |
| Starts a chunked response; body of request is sent over multiple parts using the SendChunkResp. More... | |
| int | ChunkResp (const char *body, long long bodylen) |
| Send a (potentially partial) body in a chunked response; invoking with NULL body. More... | |
| char * | GetClientIPStr () |
| Gets a string that represents the IP address of the client. Must be freed. More... | |
Static Private Member Functions | |
| static bool | InitTLS () |
| Initialization of the ssl security things. More... | |
| static bool | InitSecurity () |
| Initialization fo security addon. More... | |
| static BIO * | CreateBIO (XrdLink *lp) |
| Create a new BIO object from an XrdLink. Returns NULL on failure. More... | |
| static int | Config (const char *fn, XrdOucEnv *myEnv) |
| Functions related to the configuration. More... | |
| static const char * | Configed () |
| static int | xtrace (XrdOucStream &Config) |
| static int | xsslcert (XrdOucStream &Config) |
| static int | xsslkey (XrdOucStream &Config) |
| static int | xsecxtractor (XrdOucStream &Config) |
| static int | xexthandler (XrdOucStream &Config, std::vector< extHInfo > &hiVec) |
| static int | xsslcadir (XrdOucStream &Config) |
| static int | xsslcipherfilter (XrdOucStream &Config) |
| static int | xdesthttps (XrdOucStream &Config) |
| static int | xlistdeny (XrdOucStream &Config) |
| static int | xlistredir (XrdOucStream &Config) |
| static int | xselfhttps2http (XrdOucStream &Config) |
| static int | xembeddedstatic (XrdOucStream &Config) |
| static int | xstaticredir (XrdOucStream &Config) |
| static int | xstaticpreload (XrdOucStream &Config) |
| static int | xgmap (XrdOucStream &Config) |
| static int | xsslcafile (XrdOucStream &Config) |
| static int | xsslverifydepth (XrdOucStream &Config) |
| static int | xsecretkey (XrdOucStream &Config) |
| static int | xheader2cgi (XrdOucStream &Config) |
| static int | xhttpsmode (XrdOucStream &Config) |
| static int | xtlsreuse (XrdOucStream &Config) |
| static int | LoadSecXtractor (XrdSysError *eDest, const char *libName, const char *libParms) |
| static int | LoadExtHandler (std::vector< extHInfo > &hiVec, const char *cFN, XrdOucEnv &myEnv) |
| static int | LoadExtHandler (XrdSysError *eDest, const char *libName, const char *configFN, const char *libParms, XrdOucEnv *myEnv, const char *instName) |
| static XrdHttpExtHandler * | FindMatchingExtHandler (const XrdHttpReq &) |
| static bool | ExtHandlerLoaded (const char *handlername) |
Private Attributes | |
| int(XrdHttpProtocol::* | Resume )() |
| The resume function. More... | |
| XrdBuffer * | myBuff |
| Circular Buffer used to read the request. More... | |
| char * | myBuffStart |
| The circular pointers. More... | |
| char * | myBuffEnd |
| XrdOucString | tmpline |
| A nice var to hold the current header line. More... | |
| bool | DoingLogin |
| Tells that we are just logging in. More... | |
| long | ResumeBytes |
| Tells that we are just waiting to have N bytes in the buffer. More... | |
| SSL * | ssl |
| Private SSL context. More... | |
| BIO * | sbio |
| Private SSL bio. More... | |
| bool | ishttps |
| Tells if the client is https. More... | |
| bool | ssldone |
Static Private Attributes | |
| static bool | isRequiredXtractor |
| static XrdHttpSecXtractor * | secxtractor |
| static struct XrdHttpProtocol::XrdHttpExtHandlerInfo | exthandler [MAX_XRDHTTPEXTHANDLERS] |
| static int | exthandlercnt |
| static BIO * | sslbio_err |
| bio to print SSL errors More... | |
| static XrdCryptoFactory * | myCryptoFactory |
Friends | |
| class | XrdHttpReq |
| class | XrdHttpExtReq |
|
default |
Ctor, dtors and copy ctor.
| XrdHttpProtocol::XrdHttpProtocol | ( | bool | imhttps | ) |
|
inline |
References Cleanup().
|
private |
How many bytes still fit into the buffer in a contiguous way.
|
private |
Consume some bytes from the buffer.
|
private |
How many bytes free in the buffer.
|
private |
Get a pointer, valid for up to blen bytes from the buffer. Returns the validity.
|
private |
Copy a full line of text from the buffer into dest. Zero if no line can be found in the buffer.
|
private |
How many bytes in the buffer.
|
private |
Send a (potentially partial) body in a chunked response; invoking with NULL body.
|
private |
Deallocate resources, in order to reutilize an object of this class.
Referenced by ~XrdHttpProtocol().
|
staticprivate |
Functions related to the configuration.
|
staticprivate |
|
static |
Read and apply the configuration.
|
staticprivate |
Create a new BIO object from an XrdLink. Returns NULL on failure.
| int XrdHttpProtocol::doChksum | ( | const XrdOucString & | fname | ) |
Perform a checksum request.
|
inlinevirtual |
| int XrdHttpProtocol::doStat | ( | char * | fname | ) |
Perform a Stat request.
|
staticprivate |
|
staticprivate |
|
private |
Gets a string that represents the IP address of the client. Must be freed.
|
private |
Get up to blen bytes from the connection. Put them into mybuff. This primitive, for the way it is used, is not supposed to block
|
private |
After the SSL handshake, retrieve the VOMS info and the various stuff that is needed for autorization
|
private |
Handle authentication of the client
|
private |
|
staticprivate |
Initialization fo security addon.
|
staticprivate |
Initialization of the ssl security things.
|
inline |
called via https
References ishttps.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
virtual |
Tells if the oustanding bytes on the socket match this protocol implementation.
Implements XrdProtocol.
| XrdHttpProtocol XrdHttpProtocol::operator= | ( | const XrdHttpProtocol & | rhs | ) |
|
virtual |
Process data incoming from the socket.
Implements XrdProtocol.
|
virtual |
Recycle this instance.
Implements XrdProtocol.
|
private |
Reset values, counters, in order to reutilize an object of this class.
|
private |
Send some generic data to the client.
|
private |
Sends a basic response. If the length is < 0 then it is calculated internally.
|
private |
Starts a chunked response; body of request is sent over multiple parts using the SendChunkResp.
|
private |
Start a response back to the client.
|
virtual |
Get activity stats.
Implements XrdProtocol.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
friend |
|
friend |
|
protected |
Our IP address, as a string. Please remember that this may not be unique for a given machine, hence we need to keep it here and recompute ad every new connection.
|
staticprotected |
|
protected |
The Bridge that we use to exercise the xrootd internals.
|
staticprotected |
|
protected |
Area for coordinating request and responses to/from the bridge This also can process HTTP/DAV stuff
|
private |
Tells that we are just logging in.
|
staticprotected |
|
staticprotected |
If true, use the embedded css and icons.
|
staticprivate |
|
staticprivate |
|
staticprotected |
Gridmap file location. The same used by XrdSecGsi.
|
staticprotected |
Timeout for reading the handshake.
|
staticprotected |
Rules that turn HTTP headers to cgi tokens in the URL, for internal comsumption.
|
staticprotected |
True if the redirections must be towards https targets.
|
private |
Tells if the client is https.
Referenced by isHTTPS().
|
staticprotected |
|
staticprivate |
|
protected |
The link we are bound to.
|
staticprotected |
If true, any form of listing is denied.
|
staticprotected |
Url to redirect to in the case a listing is requested.
|
staticprotected |
C-style vptr table for our custom BIO objects.
|
staticprotected |
Type identifier for our custom BIO objects.
|
private |
Circular Buffer used to read the request.
|
private |
|
private |
The circular pointers.
|
staticprivate |
|
staticprotected |
Our role.
|
staticprotected |
Our port.
|
staticprotected |
Our port, as a string.
| XrdObject<XrdHttpProtocol> XrdHttpProtocol::ProtLink |
|
static |
|
staticprotected |
Timeout for reading data.
|
private |
The resume function.
Referenced by DoIt().
|
private |
Tells that we are just waiting to have N bytes in the buffer.
|
private |
Private SSL bio.
|
staticprotected |
| XrdSecEntity XrdHttpProtocol::SecEntity |
Authentication area.
|
staticprotected |
The key used to calculate the url hashes.
|
staticprivate |
|
staticprotected |
If client is HTTPS, self-redirect with HTTP+token.
|
staticprotected |
The instance of the DN mapper. Created only when a valid path is given.
|
private |
Private SSL context.
|
staticprivate |
bio to print SSL errors
|
staticprotected |
|
staticprotected |
|
staticprotected |
OpenSSL stuff.
|
staticprotected |
|
private |
Flag to tell if the https handshake has finished, in the case of an https connection being established
|
staticprotected |
|
staticprotected |
Depth of verification of a certificate chain.
|
staticprotected |
|
staticprotected |
|
private |
A nice var to hold the current header line.