bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
http::AllowedHosts Class Reference

Can a given URL be dereferenced given the BES's configuration? More...

#include <AllowedHosts.h>

Collaboration diagram for http::AllowedHosts:
Collaboration graph

Public Member Functions

 AllowedHosts (const AllowedHosts &)=delete
 
bool is_allowed (const http::url &candidate_url)
 
bool is_allowed (const http::url &candidate_url, std::string &whynot)
 
bool is_allowed (const std::shared_ptr< http::url > &candidate_url)
 
bool is_allowed (const std::shared_ptr< http::url > &candidate_url, std::string &whynot)
 
AllowedHostsoperator= (const AllowedHosts &)=delete
 

Static Public Member Functions

static AllowedHoststheHosts ()
 

Detailed Description

Can a given URL be dereferenced given the BES's configuration?

Embodies a configuration based remote access allowed list and provides a simple API, is_allowed() for determining which resources may be accessed. This enables a system administrator to control the remote systems a particular BES daemon can access.

Note
This class is a singleton

Definition at line 53 of file AllowedHosts.h.

Member Function Documentation

◆ is_allowed() [1/4]

bool http::AllowedHosts::is_allowed ( const http::url & candidate_url)

Definition at line 82 of file AllowedHosts.cc.

◆ is_allowed() [2/4]

bool http::AllowedHosts::is_allowed ( const http::url & candidate_url,
std::string & whynot )

Definition at line 89 of file AllowedHosts.cc.

◆ is_allowed() [3/4]

bool http::AllowedHosts::is_allowed ( const std::shared_ptr< http::url > & candidate_url)

This method provides an access condition assessment for URLs and files to be accessed by the BES. The http and https URLs are verified against a allowed hosts list assembled from configuration. All file URLs are checked to be sure that they reference a resource within the BES default catalog.

Parameters
candidate_urlThe URL to test
Returns
True if the URL may be dereferenced, given the BES's configuration, false otherwise.

Definition at line 73 of file AllowedHosts.cc.

◆ is_allowed() [4/4]

bool http::AllowedHosts::is_allowed ( const std::shared_ptr< http::url > & candidate_url,
std::string & whynot )

Definition at line 78 of file AllowedHosts.cc.

◆ theHosts()

AllowedHosts * http::AllowedHosts::theHosts ( )
static

Definition at line 58 of file AllowedHosts.cc.


The documentation for this class was generated from the following files: