irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
![]() ![]() |
#include <client_api_whitelist.hpp>
Public Member Functions | |
client_api_whitelist (const client_api_whitelist &)=delete | |
auto | operator= (const client_api_whitelist &) -> client_api_whitelist &=delete |
auto | enforce (const rsComm_t &comm) const noexcept -> bool |
auto | add (int api_number) -> void |
auto | contains (int api_number) const noexcept -> bool |
Static Public Member Functions | |
static auto | instance () -> client_api_whitelist & |
Private Member Functions | |
client_api_whitelist () | |
Private Attributes | |
std::vector< int > | api_numbers_ |
This class provides a convenient interface for managing and querying the client-side API whitelist.
Instances of this class are not copyable or moveable.
Definition at line 18 of file client_api_whitelist.hpp.
|
delete |
|
private |
Definition at line 35 of file client_api_whitelist.cpp.
References AUTH_CHECK_AN, AUTH_PLUG_REQ_AN, AUTH_PLUG_RESP_AN, AUTH_REQUEST_AN, AUTH_RESPONSE_AN, BULK_DATA_OBJ_PUT_AN, BULK_DATA_OBJ_REG_AN, CHK_OBJ_PERM_AND_STAT_AN, CLIENT_HINTS_AN, CLOSE_COLLECTION_AN, COLL_CREATE_AN, COLL_REPL_AN, DATA_OBJ_CHKSUM_AN, DATA_OBJ_CLOSE_AN, DATA_OBJ_COPY_AN, DATA_OBJ_CREATE_AN, DATA_OBJ_CREATE_AND_STAT_AN, DATA_OBJ_FSYNC_AN, DATA_OBJ_GET_AN, DATA_OBJ_LOCK_AN, DATA_OBJ_LSEEK_AN, DATA_OBJ_OPEN_AN, DATA_OBJ_OPEN_AND_STAT_AN, DATA_OBJ_PHYMV_AN, DATA_OBJ_PUT_AN, DATA_OBJ_READ_AN, DATA_OBJ_RENAME_AN, DATA_OBJ_REPL_AN, DATA_OBJ_RSYNC_AN, DATA_OBJ_TRIM_AN, DATA_OBJ_TRUNCATE_AN, DATA_OBJ_UNLINK_AN, DATA_OBJ_UNLOCK_AN, DATA_OBJ_WRITE_AN, EXEC_MY_RULE_AN, EXEC_RULE_EXPRESSION_AN, GEN_QUERY_AN, GENERAL_ADMIN_AN, GENERAL_UPDATE_AN, GET_HIER_FOR_RESC_AN, GET_HIER_FROM_LEAF_ID_AN, GET_LIMITED_PASSWORD_AN, GET_MISC_SVR_INFO_AN, GET_REMOTE_ZONE_RESC_AN, GET_RESC_QUOTA_AN, GET_TEMP_PASSWORD_AN, GET_TEMP_PASSWORD_FOR_OTHER_AN, MOD_ACCESS_CONTROL_AN, MOD_AVU_METADATA_AN, MOD_COLL_AN, OBJ_STAT_AN, OPEN_COLLECTION_AN, OPR_COMPLETE_AN, PAM_AUTH_REQUEST_AN, PHY_BUNDLE_COLL_AN, PHY_PATH_REG_AN, PROC_STAT_AN, QUERY_SPEC_COLL_AN, READ_COLLECTION_AN, REG_COLL_AN, REG_DATA_OBJ_AN, REG_REPLICA_AN, RM_COLL_AN, RULE_EXEC_DEL_AN, RULE_EXEC_MOD_AN, RULE_EXEC_SUBMIT_AN, SERVER_REPORT_AN, SET_RR_CTX_AN, SIMPLE_QUERY_AN, SPECIFIC_QUERY_AN, SSL_END_AN, SSL_START_AN, STRUCT_FILE_BUNDLE_AN, STRUCT_FILE_EXT_AND_REG_AN, STRUCT_FILE_EXTRACT_AN, STRUCT_FILE_SYNC_AN, SUB_STRUCT_FILE_CLOSE_AN, SUB_STRUCT_FILE_CLOSEDIR_AN, SUB_STRUCT_FILE_CREATE_AN, SUB_STRUCT_FILE_FSTAT_AN, SUB_STRUCT_FILE_GET_AN, SUB_STRUCT_FILE_LSEEK_AN, SUB_STRUCT_FILE_MKDIR_AN, SUB_STRUCT_FILE_OPEN_AN, SUB_STRUCT_FILE_OPENDIR_AN, SUB_STRUCT_FILE_PUT_AN, SUB_STRUCT_FILE_READ_AN, SUB_STRUCT_FILE_READDIR_AN, SUB_STRUCT_FILE_RENAME_AN, SUB_STRUCT_FILE_RMDIR_AN, SUB_STRUCT_FILE_STAT_AN, SUB_STRUCT_FILE_TRUNCATE_AN, SUB_STRUCT_FILE_UNLINK_AN, SUB_STRUCT_FILE_WRITE_AN, SYNC_MOUNTED_COLL_AN, TICKET_ADMIN_AN, UNBUN_AND_REG_PHY_BUNFILE_AN, UNREG_DATA_OBJ_AN, USER_ADMIN_AN, and ZONE_REPORT_AN.
auto irods::client_api_whitelist::add | ( | int | api_number | ) | -> void |
Adds an API number to the whitelist.
This function is not thread-safe.
[in] | api_number | The API number to add to the whitelist. |
Definition at line 220 of file client_api_whitelist.cpp.
References terminate_irods_processes::e, LOG_DEBUG, LOG_ERROR, rodsLog(), and SYS_INTERNAL_ERR.
|
noexcept |
Checks if the whitelist contains a particular API number.
[in] | api_number | The API number to look for. |
true | If the whitelist contains api_number. |
false | Otherwise. |
Definition at line 214 of file client_api_whitelist.cpp.
References irods::experimental::filesystem::client::end().
|
noexcept |
Returns whether the whitelist should be enforced based on the server configuration and the connection representation.
[in] | comm | The server communication object. |
true | If the server configuration has client_api_whitelist_policy set to enforce and comm represents a client-to-agent connection (i.e. the source of the connection is NOT an iRODS consumer or provider). |
false | Otherwise. |
Definition at line 194 of file client_api_whitelist.cpp.
References irods::CFG_CLIENT_API_WHITELIST_POLICY_KW, irods::is_privileged_client(), LOG_DEBUG, and rodsLog().
|
static |
Provides access to a shared instance of this class.
The object returned is a singleton and is shared by all threads.
Definition at line 29 of file client_api_whitelist.cpp.
Referenced by chkApiPermission(), and plugin_factory().
|
delete |
|
private |
Definition at line 62 of file client_api_whitelist.hpp.