![]() |
Kea 3.3.4
|
#include <config.h>#include <cc/command_interpreter.h>#include <exceptions/exceptions.h>#include <hooks/hooks.h>#include <http/post_request_json.h>#include <process/daemon.h>#include <rbac/rbac.h>#include <rbac/rbac_config.h>#include <rbac_log.h>Go to the source code of this file.
Functions | |
| int | http_auth (CalloutHandle &handle) |
| This callout is called at the "http_auth" callout. | |
| int | http_response (CalloutHandle &handle) |
| This callout is called at the "http_response" hook. | |
| int | load (LibraryHandle &handle) |
| This function is called when the library is loaded. | |
| int | multi_threading_compatible () |
| This function is called to retrieve the multi-threading compatibility. | |
| int | unload () |
| This function is called when the library is unloaded. | |
| int http_auth | ( | CalloutHandle & | handle | ) |
This callout is called at the "http_auth" callout.
| handle | CalloutHandle. |
Definition at line 97 of file rbac_callouts.cc.
References isc::config::CONTROL_COMMAND, isc::rbac::RoleConfig::createReject(), isc::log::DBGLVL_TRACE_BASIC, isc::http::FORBIDDEN, isc::hooks::CalloutHandle::getArgument(), isc::rbac::RoleConfig::getConfig(), isc::http::INTERNAL_SERVER_ERROR, isc_throw, LOG_DEBUG, LOG_ERROR, LOG_INFO, Element::map, CalloutHandle::NEXT_STEP_SKIP, RBAC_HTTP_AUTH_ERROR, RBAC_HTTP_AUTH_FAILED, RBAC_HTTP_AUTH_REJECT, RBAC_HTTP_AUTH_RESPONSE, isc::rbac::rbac_logger, RBAC_TRACE_HTTP_AUTH_ACCEPT, RBAC_TRACE_HTTP_AUTH_BAD_BODY_TYPE, RBAC_TRACE_HTTP_AUTH_BAD_COMMAND_TYPE, RBAC_TRACE_HTTP_AUTH_COMMAND, RBAC_TRACE_HTTP_AUTH_DISABLED, RBAC_TRACE_HTTP_AUTH_EMPTY_BODY, RBAC_TRACE_HTTP_AUTH_NO_COMMAND, RBAC_TRACE_HTTP_AUTH_NO_JSON, RBAC_TRACE_HTTP_AUTH_NO_REQUEST, RBAC_TRACE_HTTP_AUTH_NO_TLS_REJECT, RBAC_TRACE_HTTP_AUTH_RESPONSE, RBAC_TRACE_HTTP_AUTH_ROLE, isc::rbac::rbacConfig, isc::rbac::Role::requireTls(), isc::rbac::roleAssign, isc::hooks::CalloutHandle::setArgument(), isc::hooks::CalloutHandle::setContext(), isc::hooks::CalloutHandle::setStatus(), Element::string, and isc::http::UNAUTHORIZED.
| int http_response | ( | CalloutHandle & | handle | ) |
This callout is called at the "http_response" hook.
| handle | CalloutHandle. |
Definition at line 241 of file rbac_callouts.cc.
References isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getOptionalContext(), Element::list, LOG_DEBUG, LOG_INFO, RBAC_HTTP_RESPONSE_FAILED, isc::rbac::rbac_logger, RBAC_TRACE_HTTP_RESPONSE_BAD_BODY_TYPE, RBAC_TRACE_HTTP_RESPONSE_CONTEXT, RBAC_TRACE_HTTP_RESPONSE_DISABLED, RBAC_TRACE_HTTP_RESPONSE_EMPTY_BODY, RBAC_TRACE_HTTP_RESPONSE_EMPTY_BODY_LIST, RBAC_TRACE_HTTP_RESPONSE_MODIFIED, RBAC_TRACE_HTTP_RESPONSE_NO_ARGUMENTS, and isc::rbac::roleAssign.
Referenced by isc::ha::HAService::asyncDisableDHCPService(), isc::ha::HAService::asyncEnableDHCPService(), isc::ha::HAService::asyncSendHAReset(), isc::ha::HAService::asyncSendHeartbeat(), isc::ha::HAService::asyncSendLeaseUpdate(), isc::ha::HAService::asyncSendLeaseUpdatesFromBacklog(), isc::ha::HAService::asyncSyncCompleteNotify(), isc::ha::HAService::asyncSyncLeasesInternal(), isc::ha::HAService::processMaintenanceCancel(), and isc::ha::HAService::processMaintenanceStart().
| int load | ( | LibraryHandle & | handle | ) |
This function is called when the library is loaded.
| handle | library handle. |
Definition at line 39 of file rbac_callouts.cc.
References isc::hooks::LibraryHandle::getParameters(), isc::process::Daemon::getProcName(), isc_throw, LOG_ERROR, LOG_INFO, isc::rbac::Config::parse(), RBAC_LOAD_FAILED, RBAC_LOAD_OK, isc::rbac::rbac_logger, and isc::rbac::rbacConfig.
| int multi_threading_compatible | ( | ) |
This function is called to retrieve the multi-threading compatibility.
Definition at line 88 of file rbac_callouts.cc.
| int unload | ( | ) |
This function is called when the library is unloaded.
Definition at line 67 of file rbac_callouts.cc.
References isc::rbac::aclTable, isc::rbac::apiAccesses, isc::rbac::apiHooks, isc::rbac::apiTable, isc::rbac::defaultRoleConfig, LOG_INFO, isc::rbac::rbac_logger, RBAC_UNLOAD_OK, isc::rbac::responseFilterTable, isc::rbac::roleAssign, isc::rbac::roleConfigTable, and isc::rbac::unknownRoleConfig.