5 #ifndef CVMFS_AUTHZ_AUTHZ_FETCH_H_
6 #define CVMFS_AUTHZ_AUTHZ_FETCH_H_
15 #include "gtest/gtest_prod.h"
24 QueryInfo(pid_t p, uid_t u, gid_t g,
const std::string &m)
115 const std::string &progname,
116 const std::string &search_path,
142 std::string
FindHelper(
const std::string &membership);
146 bool Send(
const std::string &msg);
147 bool Recv(std::string *msg);
151 std::string *authz_schema,
152 std::string *pure_membership);
153 bool ParseMsg(
const std::string &json_msg,
215 #endif // CVMFS_AUTHZ_AUTHZ_FETCH_H_
AuthzExternalMsgIds msgid
AuthzExternalFetcher(const std::string &fqrn, const std::string &progname, const std::string &search_path, OptionsManager *options_manager)
QueryInfo(pid_t p, uid_t u, gid_t g, const std::string &m)
virtual AuthzStatus Fetch(const QueryInfo &query_info, AuthzToken *authz_token, unsigned *ttl)=0
static const unsigned kChildTimeout
Helper: "I verified, cvmfs, here's the result".
void StripAuthzSchema(const std::string &membership, std::string *authz_schema, std::string *pure_membership)
bool ParseMsgId(JSON *json_authz, AuthzExternalMsg *binary_msg)
static const uint32_t kProtocolVersion
Helper: "Yes, cvmfs, I'm here".
OptionsManager * options_manager_
bool ParsePermit(JSON *json_authz, AuthzExternalMsg *binary_msg)
bool Recv(std::string *msg)
virtual ~AuthzStaticFetcher()
virtual AuthzStatus Fetch(const QueryInfo &query_info, AuthzToken *authz_token, unsigned *ttl)
std::string FindHelper(const std::string &membership)
Cvmfs: "Please verify, helper".
struct AuthzExternalMsg::@0 permit
bool ParseRevision(JSON *json_authz, AuthzExternalMsg *binary_msg)
virtual ~AuthzExternalFetcher()
virtual AuthzStatus Fetch(const QueryInfo &query_info, AuthzToken *authz_token, unsigned *ttl)
bool ParseMsg(const std::string &json_msg, const AuthzExternalMsgIds expected_msgid, AuthzExternalMsg *binary_msg)
bool Send(const std::string &msg)
Cvmfs: "Hello, helper, are you there?".
Cvmfs: "Please shutdown, helper".
AuthzStaticFetcher(AuthzStatus s, unsigned ttl)
FRIEND_TEST(T_AuthzFetch, ExecHelper)
static const unsigned kDefaultTtl
First invalid message id.