dmlite
0.6
|
Namespace for the dmlite C++ API. More...
Namespaces | |
checksums | |
Classes | |
class | Acl |
class | AclEntry |
ACL Entry. More... | |
class | Authn |
class | AuthnFactory |
AuthnFactory. More... | |
class | BaseFactory |
Base class for factories. More... | |
class | BaseInterface |
Base class for interfaces. More... | |
class | BuiltInAuthn |
class | BuiltInAuthnFactory |
class | BuiltInCatalog |
class | BuiltInCatalogFactory |
Plug-ins must implement a concrete factory to be instantiated. More... | |
struct | BuiltInDir |
class | Catalog |
Interface for Catalog (Namespaces). More... | |
class | CatalogFactory |
Plug-ins must implement a concrete factory to be instantiated. More... | |
class | Chunk |
Represents a chunk of a file. More... | |
class | DavixCtxFactory |
class | DavixCtxPool |
class | DavixGrabber |
class | DavixStuff |
struct | Directory |
Typedef for directories. More... | |
class | DmException |
Base exception class. More... | |
class | DmStatus |
class | dmTask |
class | dmTaskExec |
struct | DomeCredentials |
class | DomeTalker |
class | DummyCatalog |
class | DummyPoolManager |
class | ExtendedStat |
File/directory metadata. More... | |
class | Extensible |
Helpful typedef for KeyValue containers. More... | |
class | GroupInfo |
struct | IDirectory |
Typedef for directories. More... | |
class | INode |
class | INodeFactory |
INodeFactory. More... | |
class | InodeTrans |
Convenience class that releases a resource on destruction. More... | |
class | IODriver |
IO Driver. More... | |
class | IODriverFactory |
Plug-ins must implement a concrete factory to be instantiated. More... | |
class | IOHandler |
IO interface. More... | |
class | Location |
Represent the complete location of a file. More... | |
class | MySqlConnectionFactory |
class | MySqlHolder |
Holder of mysql connections, base class singleton holding the mysql conn pool. More... | |
class | MysqlWrap |
class | PluginIdCard |
Joint between plugins and plugin-manager. More... | |
class | PluginManager |
CatalogInterface can only be instantiated through this class. More... | |
class | Pool |
Internal interface for handling pool metadata. More... | |
class | PoolContainer |
Implements a pool of whichever resource. More... | |
class | PoolDriver |
Interface for a pool driver. More... | |
class | PoolDriverFactory |
PoolDriver factory. More... | |
class | PoolElementFactory |
class | PoolGrabber |
Convenience class that releases a resource on destruction. More... | |
class | PoolHandler |
Handler for a pool. Works similary to a file handler. More... | |
class | PoolManager |
Interface for pool types. More... | |
class | PoolManagerFactory |
Plug-ins must implement a concrete factory to be instantiated. More... | |
class | Replica |
File replica metadata. More... | |
class | SecurityContext |
Security context. To be created by the Authn. More... | |
class | SecurityCredentials |
Security credentials. To be filled by the front-end. More... | |
class | StackInstance |
class | Statement |
Prepared statement wrapper. More... | |
class | SymLink |
Symbolic link. More... | |
class | Url |
class | UserInfo |
struct | xferprogmarker |
Progress markers for file copies. FTS jargon calls these "FTS performance markers" beware, we assume that this structure is identical to the one defined in the C API. More... | |
Typedefs | |
typedef struct dmlite::xferprogmarker | xferprogmarker |
Progress markers for file copies. FTS jargon calls these "FTS performance markers" beware, we assume that this structure is identical to the one defined in the C API. More... | |
Enumerations | |
enum | TokenResult { kTokenOK = 0, kTokenMalformed, kTokenInvalid, kTokenExpired, kTokenInvalidMode, kTokenInternalError } |
Possible outputs for validateToken. More... | |
enum | DomeHttpCode { DOME_HTTP_OK = 200, DOME_HTTP_BAD_REQUEST = 400, DOME_HTTP_DENIED = 403, DOME_HTTP_NOT_FOUND = 404, DOME_HTTP_CONFLICT = 409, DOME_HTTP_UNPROCESSABLE = 422, DOME_HTTP_INTERNAL_SERVER_ERROR = 500, DOME_HTTP_INSUFFICIENT_STORAGE = 507 } |
Functions | |
void | destroy_thread (void *) |
void | init_thread (void) |
bool | hasGroup (const std::vector< GroupInfo > &groups, gid_t gid) |
int | checkPermissions (const SecurityContext *context, const Acl &acl, const struct ::stat &stat, mode_t mode) |
std::string | voFromDn (const std::string &mapfile, const std::string &dn) |
std::string | voFromRole (const std::string &role) |
std::string | getCertificateSubject (const std::string &path) |
Get the subject from the certificate. More... | |
std::string | generateToken (const std::string &id, const std::string &pfn, const std::string &passwd, time_t lifetime, bool write=false) |
TokenResult | validateToken (const std::string &token, const std::string &id, const std::string &pfn, const std::string &passwd, bool write=false) |
int | http_status (const DmException &e) |
int | http_status (const DmStatus &e) |
Variables | |
const unsigned | API_VERSION = 20121218 |
API Version. More... | |
Logger::bitmask | stackinstancelogmask |
Logger::component | stackinstancelogname |
pthread_once_t | initialize_mysql_thread |
pthread_key_t | destructor_key |
Logger::bitmask | davixpoollogmask |
Logger::component | davixpoollogname |
Logger::bitmask | mysqllogmask |
Logger::component | mysqllogname |
Namespace for the dmlite C++ API.
typedef struct dmlite::xferprogmarker dmlite::xferprogmarker |
Progress markers for file copies. FTS jargon calls these "FTS performance markers" beware, we assume that this structure is identical to the one defined in the C API.
enum dmlite::DomeHttpCode |
enum dmlite::TokenResult |
int dmlite::checkPermissions | ( | const SecurityContext * | context, |
const Acl & | acl, | ||
const struct ::stat & | stat, | ||
mode_t | mode | ||
) |
Check if a specific user has the demanded rights.
context | The security context. |
acl | The Access Control list. |
stat | A struct stat which mode will be checked. |
mode | The mode to be checked. |
void dmlite::destroy_thread | ( | void * | ) |
std::string dmlite::generateToken | ( | const std::string & | id, |
const std::string & | pfn, | ||
const std::string & | passwd, | ||
time_t | lifetime, | ||
bool | write = false |
||
) |
Generate a token.
id | A unique ID of the user. May be the DN, the IP... |
pfn | The PFN we want a token for. |
passwd | The password to be used. |
lifetime | Token lifetime. |
write | If true, this will be a token for write access. |
std::string dmlite::getCertificateSubject | ( | const std::string & | path | ) |
Get the subject from the certificate.
bool dmlite::hasGroup | ( | const std::vector< GroupInfo > & | groups, |
gid_t | gid | ||
) |
Check if the group vector contains the given gid.
groups | The GroupInfo vector. |
gid | The gid to look for. |
int dmlite::http_status | ( | const DmException & | e | ) |
int dmlite::http_status | ( | const DmStatus & | e | ) |
void dmlite::init_thread | ( | void | ) |
TokenResult dmlite::validateToken | ( | const std::string & | token, |
const std::string & | id, | ||
const std::string & | pfn, | ||
const std::string & | passwd, | ||
bool | write = false |
||
) |
Validate a token. It must have been previously generated by generateToken.
token | The token to validate. |
id | The SAME unique ID used to generate the token. |
pfn | The that is being accessed. |
passwd | The password that must be used to generate the token. |
write | If true, write access will be validated. |
std::string dmlite::voFromDn | ( | const std::string & | mapfile, |
const std::string & | dn | ||
) |
Get the VO from a full DN.
mapfile | The file that contains the user => group mapping. |
dn | The DN to parse. |
std::string dmlite::voFromRole | ( | const std::string & | role | ) |
Get the VO from a role.
role | The role. |
const unsigned dmlite::API_VERSION = 20121218 |
API Version.
Logger::bitmask dmlite::davixpoollogmask |
Logger::component dmlite::davixpoollogname |
pthread_key_t dmlite::destructor_key |
pthread_once_t dmlite::initialize_mysql_thread |
Logger::bitmask dmlite::mysqllogmask |
Logger::component dmlite::mysqllogname |
Logger::bitmask dmlite::stackinstancelogmask |
Logger::component dmlite::stackinstancelogname |