| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/** |
| 2 |
|
|
* This file is part of the CernVM File System. |
| 3 |
|
|
*/ |
| 4 |
|
|
|
| 5 |
|
|
#ifndef CVMFS_AUTHZ_AUTHZ_CURL_H_ |
| 6 |
|
|
#define CVMFS_AUTHZ_AUTHZ_CURL_H_ |
| 7 |
|
|
|
| 8 |
|
|
#include <string> |
| 9 |
|
|
|
| 10 |
|
|
#include "authz.h" |
| 11 |
|
|
#include "network/download.h" |
| 12 |
|
|
|
| 13 |
|
|
class AuthzSessionManager; |
| 14 |
|
|
|
| 15 |
|
|
class AuthzAttachment : public download::CredentialsAttachment { |
| 16 |
|
|
public: |
| 17 |
|
|
explicit AuthzAttachment(AuthzSessionManager *sm); |
| 18 |
|
3112 |
virtual ~AuthzAttachment() { } |
| 19 |
|
|
|
| 20 |
|
|
virtual bool ConfigureCurlHandle(CURL *curl_handle, |
| 21 |
|
|
pid_t pid, |
| 22 |
|
|
void **info_data); |
| 23 |
|
|
virtual void ReleaseCurlHandle(CURL *curl_handle, void *info_data); |
| 24 |
|
|
|
| 25 |
|
✗ |
void set_membership(const std::string &m) { membership_ = m; } |
| 26 |
|
|
|
| 27 |
|
|
private: |
| 28 |
|
|
static void LogOpenSSLErrors(const char *top_message); |
| 29 |
|
|
static CURLcode CallbackSslCtx(CURL *curl, void *sslctx, void *parm); |
| 30 |
|
|
bool ConfigureSciTokenCurl(CURL *curl_handle, |
| 31 |
|
|
const AuthzToken &token, |
| 32 |
|
|
void **info_data); |
| 33 |
|
|
|
| 34 |
|
|
static bool ssl_strings_loaded_; |
| 35 |
|
|
|
| 36 |
|
|
/** |
| 37 |
|
|
* Used to gather user's credentials. |
| 38 |
|
|
*/ |
| 39 |
|
|
AuthzSessionManager *authz_session_manager_; |
| 40 |
|
|
|
| 41 |
|
|
/** |
| 42 |
|
|
* The required user group needs to be set on mount and remount by the client. |
| 43 |
|
|
*/ |
| 44 |
|
|
std::string membership_; |
| 45 |
|
|
}; |
| 46 |
|
|
|
| 47 |
|
|
#endif // CVMFS_AUTHZ_AUTHZ_CURL_H_ |
| 48 |
|
|
|