lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::AdminController Class Reference

#include <AdminController.h>

Inheritance diagram for lintel::AdminController:
lintel::Controller lintel::GroupProvider

Public Member Functions

 AdminController (const std::shared_ptr< IAuthService > &authService)
 
- Public Member Functions inherited from lintel::Controller
 Controller (std::shared_ptr< IAuthService > authService)
 
 ~Controller () override=default
 
void setTrustedProxies (std::vector< std::string > trustedProxies)
 
void registerMethods (std::shared_ptr< httplib::Server > &server)
 
- Public Member Functions inherited from lintel::GroupProvider
 GroupProvider ()=default
 
void add (const Group &group)
 
virtual ~GroupProvider ()=default
 
const std::vector< Group > & provide ()
 

Additional Inherited Members

- Protected Types inherited from lintel::Controller
enum  HttpType { Get , Put , Post , Delete }
 
using HandlerArgs = void(const httplib::Request &, httplib::Response &)
 
using HandlerWithContentReaderArgs = void(const httplib::Request &, httplib::Response &, const httplib::ContentReader &)
 
using Handler = std::function< HandlerArgs >
 
using HandlerWithContentReader = std::function< HandlerWithContentReaderArgs >
 
- Protected Member Functions inherited from lintel::Controller
std::string clientIpOf (const httplib::Request &request)
 
template<class Type , HttpType httpType>
Type addMethod (const std::string &pattern, Type handler)
 
- Static Protected Member Functions inherited from lintel::Controller
static PagingParams pagingParamsOf (const httplib::Request &request)
 
- Protected Attributes inherited from lintel::Controller
std::shared_ptr< IAuthService > m_authService
 
ClientIpResolver m_ipResolver
 
std::map< HttpType, std::vector< Method > > m_methods
 

Detailed Description

HTTP controller for administrative operations that are not owned by a single feature, currently the reload of the running server's TLS certificate.

The endpoint is restricted to the admin group: it changes the certificate the process presents, which is a privilege escalation risk if any user could trigger it (for example to serve a certificate the operator did not intend).

Constructor & Destructor Documentation

◆ AdminController()

lintel::AdminController::AdminController ( const std::shared_ptr< IAuthService > &  authService)
explicit
Parameters
authServiceauthentication service for access control

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