|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
27 #include <zmqpp/zmqpp.hpp>
36 class AuthFileInstance;
85 const std::list<std::string> &auth_sources_names,
86 const std::string &auth_target_name,
void reload_auth_config()
Schedule an asynchronous reload of the module configuration file.
const std::string & auth_file_name() const
Return the name of the file associated with the authenticator.
FileAuthSourceMapperPtr mapper_
Authentication config file parser.
std::string target_name_
Name of the target we auth against.
zmqpp::socket bus_push_
Socket to write to the bus.
std::string file_path_
Path to the auth data file.
std::shared_ptr< FileAuthSourceMapper > FileAuthSourceMapperPtr
std::shared_ptr< User > UserPtr
std::shared_ptr< IAccessProfile > IAccessProfilePtr
std::string auth_file_content() const
Return the content of the configuration file use for user/group and permission mapping.
This is the header file for a generated source file, GitSHA1.cpp.
AuthResult(bool s, ::Leosac::Auth::IAccessProfilePtr p, ::Leosac::Auth::UserPtr u)
bool handle_kernel_message(const zmqpp::message &msg)
Handle the message if its from Leosac's kernel, or does nothing.
std::shared_ptr< AuthFileInstance > AuthFileInstancePtr
AuthFileInstance & operator=(const AuthFileInstance &)=delete
std::mutex mutex_
A mutex used only internally.
AuthFileInstance(zmqpp::context &ctx, const std::string &auth_ctx_name, const std::list< std::string > &auth_sources_names, const std::string &auth_target_name, const std::string &input_file, CoreUtilsPtr core_utils)
Create a new Authenticator that watch a device and emit authentication message.
zmqpp::socket & bus_sub()
Returns the socket subscribed to the message bus.
void handle_bus_msg()
Something happened on the bus that we have interest into.
AuthResult handle_auth(zmqpp::message *msg) noexcept
Prepare auth source object, map them to profile and check if access is granted.
::Leosac::Auth::UserPtr user
A user object representing the user who made the authentication attempt.
std::string name_
Name of this auth context instance.
::Leosac::Auth::IAccessProfilePtr profile
Profile used to grant or deny access.
An instance of an authentication handler that use files to check whether or not access is granted or ...
std::shared_ptr< CoreUtils > CoreUtilsPtr
zmqpp::socket bus_sub_
Socket to read from the bus.
bool success
Wether access shall be granted, or not.