43 api_files_ =
".../share/kea/api";
72 rbacConfig.setRequireTls(require_tls->boolValue());
73 }
else if ((
roleAssign->getName() ==
"subject") ||
79 const string& api_files = cfg->get(
"api-files")->stringValue();
87 for (
auto const& command : commands->listValue()) {
99 for (
auto const& acl : acls->listValue()) {
111 for (
auto const& elem : roles->listValue()) {
117 const string& name = role->name_;
120 <<
"' is already defined");
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
A generic exception that is thrown when an unexpected error condition occurs.
static void checkKeywords(const SimpleKeywords &keywords, isc::data::ConstElementPtr scope)
Checks acceptable keywords with their expected type.
static void checkRequired(const SimpleRequiredKeywords &required, isc::data::ConstElementPtr scope)
Checks that all required keywords are present.
static void initTable()
Initialize the access control list table.
static void parse(data::ConstElementPtr def)
Parse an access control list definition.
static void parse(data::ConstElementPtr cfg, bool others=false)
Parse a command config.
static void fillApiTable(const std::string &dirname)
Fill the API command table.
RBAC Configuration class.
void init()
Initialization.
static const data::SimpleRequiredKeywords RBAC_REQUIRED_PARAMETERS
Configuration required parameters.
static void parse(data::ConstElementPtr cfg)
Parse the configuration.
static const data::SimpleKeywords RBAC_PARAMETERS
Configuration parameters.
None access control list.
static void initResponseFilterTable()
Initialize the response filter table.
Per role configuration class.
static RoleConfigPtr parse(data::ConstElementPtr cfg, std::string name="")
Parse a role config.
static RolePtr parse(data::ConstElementPtr cfg)
Parse a role assignment value.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
std::vector< std::string > SimpleRequiredKeywords
This specifies all required keywords.
boost::shared_ptr< const Element > ConstElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
const int DBGLVL_TRACE_BASIC
Trace basic operations.
boost::shared_ptr< RoleConfig > RoleConfigPtr
Type of shared pointers to role configurations.
RolePtr roleAssign
The role assignment.
isc::log::Logger rbac_logger("rbac-hooks")
boost::shared_ptr< Acl > AclPtr
Type of shared pointers to Acl.
std::list< ResponseFilterPtr > ResponseFilterList
The type of list of shared pointers to response filters.
RoleConfigPtr defaultRoleConfig
The default (role is "") role configuration.
RoleConfigPtr unknownRoleConfig
The unknown (role is not in the table) role configuration.
Config rbacConfig
The configuration.
RoleConfigTable roleConfigTable
The role configurations table.
Defines the logger used by the top-level component of kea-lfc.
const isc::log::MessageID RBAC_CONFIGURED_ROLES
const isc::log::MessageID RBAC_CONFIGURED_ACLS
const isc::log::MessageID RBAC_CONFIGURED_COMMANDS