dmlite Namespace Reference

Namespace for the libdm C++ API. More...

Classes

struct  SecurityCredentials
 Security credentials. To be filled by the front-end. More...
struct  UserInfo
struct  GroupInfo
struct  SecurityContext
 Security context. To be created by the Authn. More...
class  Authn
class  AuthnFactory
 AuthnFactory. More...
class  BaseInterface
 Base class for interfaces. More...
class  BaseFactory
 Base class for factories. More...
struct  Directory
 Typedef for directories. More...
class  Catalog
 Interface for Catalog (Namespaces). More...
class  CatalogFactory
 Plug-ins must implement a concrete factory to be instantiated. More...
class  PluginManager
 CatalogInterface can only be instantiated through this class. More...
class  StackInstance
struct  PluginIdCard
 Joint between plugins and plugin-manager. More...
class  DummyCatalog
class  DummyPoolManager
class  DmException
 Base exception class. More...
struct  IDirectory
 Typedef for directories. More...
struct  ExtendedStat
 File/directory metadata. More...
struct  SymLink
 Symbolic link. More...
struct  Replica
 File replica metadata. More...
class  INode
class  INodeFactory
 INodeFactory. More...
class  IOHandler
 IO interface. More...
class  IODriver
 IO Driver. More...
class  IOFactory
 Plug-ins must implement a concrete factory to be instantiated. More...
struct  Chunk
 Represents a chunk of a file. More...
class  PoolHandler
 Handler for a pool. Works similary to a file handler. More...
class  PoolDriver
 Interface for a pool driver. More...
class  PoolDriverFactory
 PoolDriver factory. More...
struct  Pool
 Internal interface for handling pool metadata. More...
class  PoolManager
 Interface for pool types. More...
class  PoolManagerFactory
 Plug-ins must implement a concrete factory to be instantiated. More...
struct  Extensible
 Helpful typedef for KeyValue containers. More...
class  PoolElementFactory
class  PoolContainer
 Implements a pool of whichever resource. More...
struct  AclEntry
 ACL Entry. More...
struct  Acl
struct  Url
class  BuiltInAuthn
class  BuiltInAuthnFactory
struct  BuiltInDir
class  BuiltInCatalog
class  BuiltInCatalogFactory
 Plug-ins must implement a concrete factory to be instantiated. More...

Typedefs

typedef std::vector< ChunkLocation
 Represent the complete location of a file.

Enumerations

enum  TokenResult {
  kTokenOK = 0, kTokenMalformed, kTokenInvalid, kTokenExpired,
  kTokenInvalidMode, kTokenInternalError
}
 

Possible outputs for validateToken.

More...

Functions

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 getHostDN (void)
 Get the host DN from the host certificate.
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)

Variables

const unsigned API_VERSION = 20120817
 API Version.

Detailed Description

Namespace for the libdm C++ API.


Typedef Documentation

typedef std::vector<Chunk> dmlite::Location

Represent the complete location of a file.


Enumeration Type Documentation

Possible outputs for validateToken.

Enumerator:
kTokenOK 
kTokenMalformed 
kTokenInvalid 
kTokenExpired 
kTokenInvalidMode 
kTokenInternalError 

Function Documentation

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.

Note:
This works using uid and gid, so it will only work with plug-ins that provide this metadata (as unsigned!!).
Parameters:
context The security context.
acl The Access Control list.
stat A struct stat which mode will be checked.
mode The mode to be checked.
Returns:
0 if the mode is allowed, 1 if not.
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.

Parameters:
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::getHostDN ( void   ) 

Get the host DN from the host certificate.

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.

Parameters:
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.

Parameters:
mapfile The file that contains the user => group mapping.
dn The DN to parse.
Returns:
The mapped VO.
std::string dmlite::voFromRole ( const std::string &  role  ) 

Get the VO from a role.

Parameters:
role The role.
Returns:
The VO.

Variable Documentation

const unsigned dmlite::API_VERSION = 20120817

API Version.


Generated on 2 Feb 2013 for dmlite by  doxygen 1.6.1