35 #ifndef _WOLFRAME_PROCESSOR_EXEC_CONTEXT_HPP_INCLUDED
36 #define _WOLFRAME_PROCESSOR_EXEC_CONTEXT_HPP_INCLUDED
111 bool checkAuthorization(
const std::string& funcname,
const std::string& resource, std::string& errmsg,
bool allowIfNotExists=
false);
122 static const char* ar[] = {
"CONNECT",
"PASSWD"};
AAAA::Authenticator * authenticator(const net::RemoteEndpoint &client) const
Get an authenticator.
Definition: execContext.hpp:100
Interface for all authorization mechanisms.
Definition: authorization.hpp:50
std::vector< std::string > m_dbstack
stack for implementing current database as scope
Definition: execContext.hpp:153
void setUser(AAAA::User *u)
Set the user instance.
Definition: execContext.hpp:64
void pop_database()
Restore the previous current transaction database.
Definition: execContext.hpp:139
db::Transaction * transaction(const std::string &name)
Create a new transaction object.
bool hasCapability(const std::string &c) const
Ask for a capability for this execution context.
Definition: execContext.hpp:93
Transaction interface.
Definition: transaction.hpp:52
virtual PasswordChanger * passwordChanger(const User &user, const net::RemoteEndpoint &client) const =0
Create an return a password changer object.
Smart pointer definition with the intention to hold sensitive data.
unsigned int m_default_timeout
default timeout
Definition: execContext.hpp:150
BasicAuthorizationFunction
Hardcoded basic authorization function enumeration.
Definition: execContext.hpp:114
const net::LocalEndpoint * localEndpoint() const
Get the local endpoint for authorization checks.
Definition: execContext.hpp:81
const AAAA::Authorizer * authorizer() const
Get the authorization instance interface.
Definition: execContext.hpp:67
bool checkAuthorization(const std::string &funcname, const std::string &resource, std::string &errmsg, bool allowIfNotExists=false)
Checks if a function tagged with AUTHORIZE( funcname, resource) is allowed to be executed.
Abstract class as processor provider interface.
Definition: procProviderInterface.hpp:81
void setAuthorizer(const AAAA::Authorizer *a)
Set the authorization instance interface.
Definition: execContext.hpp:69
virtual Authenticator * authenticator(const net::RemoteEndpoint &client) const =0
Create an return an authenticator object.
ExecContext()
Default Constructor.
Definition: execContext.hpp:51
types::SecureReference< AAAA::User > m_user
user instance
Definition: execContext.hpp:147
Password changer interface This the only interface to be used by the system. All other interfaces are...
Definition: passwordChanger.hpp:52
Execution context passed to functions for referencing resources and to define authorization dependend...
Definition: execContext.hpp:47
boost::shared_ptr< LocalEndpoint > LocalEndpointR
Definition: connectionEndpoint.hpp:163
const AAAA::User * user() const
Get the the user instance reference.
Definition: execContext.hpp:61
void setDefaultTimeout(unsigned int timeout_sec_)
Set the default timeout for read operations in seconds (0=forever)
Definition: execContext.hpp:74
net::RemoteEndpointR m_remoteEndpoint
remote end point of the connection
Definition: execContext.hpp:151
Data structure containing all login data of a user.
Definition: user.hpp:47
AAAA::PasswordChanger * passwordChanger(const net::RemoteEndpoint &client) const
Get a password changer.
Definition: execContext.hpp:105
Interface to processor provider for language bindings and database.
void operator=(const ExecContext &)
net::LocalEndpointR m_localEndpoint
local end point of the connection
Definition: execContext.hpp:152
ExecContext(const ProcessorProviderInterface *p, const AAAA::AAAAproviderInterface *a)
Constructor.
Definition: execContext.hpp:54
Definition: execContext.hpp:117
void setConnectionData(const net::RemoteEndpointR &remoteEndpoint_, const net::LocalEndpointR &localEndpoint_)
Set the socket identifier for authorization checks.
Definition: execContext.hpp:84
template for map with case insensitive key strings
const ProcessorProviderInterface * provider() const
Get the processor provider interface.
Definition: execContext.hpp:58
const P * get() const
Access content.
Definition: secureReference.hpp:59
bool checkAuthorization(BasicAuthorizationFunction f)
Checks authorization for a basic function.
Definition: execContext.hpp:127
const net::RemoteEndpoint * remoteEndpoint() const
Get the remote endpoint for authorization checks.
Definition: execContext.hpp:79
boost::shared_ptr< RemoteEndpoint > RemoteEndpointR
Definition: connectionEndpoint.hpp:208
void push_database(const std::string &dbname)
Declare the database 'dbname' as the current transaction database.
Definition: execContext.hpp:137
Remote connection endpoint.
Definition: connectionEndpoint.hpp:190
void reset(P *ptr_=0)
Recreate or dispose reference.
Definition: secureReference.hpp:65
static const char * basicAuthorizationFunctionName(BasicAuthorizationFunction n)
Get the name of a basic function.
Definition: execContext.hpp:120
const char * socketIdentifier() const
Get the socket identifier for authorization checks.
Definition: execContext.hpp:77
Definition: execContext.hpp:116
Provider interface to create AAAA related objects.
Definition: AAAAproviderInterface.hpp:51
const AAAA::AAAAproviderInterface * m_aaaaProvider
instance to query for an authenticator
Definition: execContext.hpp:149
Authenticator interface This the only interface to be used by the system. All other interfaces are in...
Definition: authenticator.hpp:56
const ProcessorProviderInterface * m_provider
processor provider interface
Definition: execContext.hpp:146
const AAAA::Authorizer * m_authorizer
instance to query for execution permission based on login data
Definition: execContext.hpp:148
unsigned int defaultTimeout() const
Get the default timeout for read operations in seconds.
Definition: execContext.hpp:72
Local connection endpoints.
Definition: connectionEndpoint.hpp:144