Support TLS CN authentication and per-image permissions in vitastor-cli serve

This commit is contained in:
Vitaliy Filippov
2026-07-05 14:58:09 +03:00
parent 7a97783ead
commit 526c597cd0
12 changed files with 214 additions and 36 deletions
+12
View File
@@ -9,6 +9,7 @@
#include "object_id.h"
#include "ringloop.h"
#include <functional>
#include <set>
struct rm_inode_t;
struct snap_merger_t;
@@ -26,6 +27,13 @@ struct cli_result_t
json11::Json data;
};
struct cli_user_t
{
std::string name;
std::string type;
std::set<std::string> groups;
};
class cli_tool_t
{
public:
@@ -37,6 +45,8 @@ public:
bool is_command_line = false;
bool color = false;
std::unique_ptr<cli_user_t> user; // for http mode
ring_loop_t *ringloop = NULL;
epoll_manager_t *epmgr = NULL;
cluster_client_t *cli = NULL;
@@ -53,6 +63,8 @@ public:
void change_parent(inode_t cur, inode_t new_parent, cli_result_t *result);
inode_config_t* get_inode_cfg(const std::string & name);
bool check_image_perm(const inode_config_t & cfg, bool write);
friend struct rm_inode_t;
friend struct snap_merger_t;
friend struct snap_flattener_t;