Apache Mesos
Public Member Functions | List of all members
process::firewall::DisabledEndpointsFirewallRule Class Reference

Simple firewall rule to forbid any HTTP request to a path in the provided list of endpoints. More...

#include <firewall.hpp>

Inheritance diagram for process::firewall::DisabledEndpointsFirewallRule:
process::firewall::FirewallRule

Public Member Functions

 DisabledEndpointsFirewallRule (const hashset< std::string > &_paths)
 
 ~DisabledEndpointsFirewallRule () override
 
Option< http::Responseapply (const network::inet::Socket &, const http::Request &request) override
 Verify rule by applying it to an HTTP request and its underlying socket connection. More...
 
- Public Member Functions inherited from process::firewall::FirewallRule
 FirewallRule ()
 
virtual ~FirewallRule ()
 

Detailed Description

Simple firewall rule to forbid any HTTP request to a path in the provided list of endpoints.

Matches are required to be exact, no substrings nor wildcards are considered for a match.

Constructor & Destructor Documentation

process::firewall::DisabledEndpointsFirewallRule::DisabledEndpointsFirewallRule ( const hashset< std::string > &  _paths)
explicit
process::firewall::DisabledEndpointsFirewallRule::~DisabledEndpointsFirewallRule ( )
inlineoverride

Member Function Documentation

Option<http::Response> process::firewall::DisabledEndpointsFirewallRule::apply ( const network::inet::Socket socket,
const http::Request request 
)
inlineoverridevirtual

Verify rule by applying it to an HTTP request and its underlying socket connection.

Parameters
socketSocket used to deliver the HTTP request.
requestHTTP request made by the client to libprocess.
Returns
If the rule verification fails, i.e. the rule didn't match, a pointer to a 'http::Response' object containing the HTTP error code and possibly a message indicating the reason for failure. Otherwise an unset 'Option' object.

Implements process::firewall::FirewallRule.


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