drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::plugin::Authorization Class Referenceabstract
Inheritance diagram for drizzled::plugin::Authorization:
[legend]
Collaboration diagram for drizzled::plugin::Authorization:
[legend]

Public Member Functions

 Authorization (std::string name_arg)
virtual bool restrictSchema (const drizzled::identifier::User &user_ctx, const identifier::Schema &schema)=0
virtual bool restrictTable (const drizzled::identifier::User &user_ctx, const drizzled::identifier::Table &table)
virtual bool restrictProcess (const drizzled::identifier::User &user_ctx, const drizzled::identifier::User &session_ctx)
Public Member Functions inherited from drizzled::plugin::Plugin
 Plugin (const std::string &name, const std::string &type_name)
virtual void shutdownPlugin ()
virtual void prime ()
virtual void startup (drizzled::Session &)
void activate ()
void deactivate ()
bool isActive () const
const std::string & getName () const
void setModule (module::Module *module)
const std::string & getTypeName () const
virtual bool removeLast () const
const std::string & getModuleName () const

Static Public Member Functions

static bool isAuthorized (const drizzled::identifier::User &user_ctx, const identifier::Schema &schema_identifier, bool send_error=true)
static bool isAuthorized (const drizzled::identifier::User &user_ctx, const drizzled::identifier::Table &table_identifier, bool send_error=true)
static bool isAuthorized (const drizzled::identifier::User &user_ctx, const Session &session, bool send_error=true)
static void pruneSchemaNames (const drizzled::identifier::User &user_ctx, identifier::schema::vector &set_of_schemas)
static bool addPlugin (plugin::Authorization &auth)
static void removePlugin (plugin::Authorization &auth)

Additional Inherited Members

Public Types inherited from drizzled::plugin::Plugin
typedef std::pair< const std::string, const std::string > map_key
typedef std::unique_ptr< plugin::Plugin, deleter_fn > owned_ptr
typedef std::map< const map_key, owned_ptr > map
typedef std::vector< Plugin * > vector

Detailed Description

Definition at line 39 of file authorization.h.

Constructor & Destructor Documentation

◆ Authorization()

drizzled::plugin::Authorization::Authorization ( std::string name_arg)
inlineexplicit

Definition at line 42 of file authorization.h.

Member Function Documentation

◆ addPlugin()

bool drizzled::plugin::Authorization::addPlugin ( plugin::Authorization & auth)
static

Standard plugin system registration hooks

Definition at line 37 of file authorization.cc.

◆ isAuthorized() [1/3]

bool drizzled::plugin::Authorization::isAuthorized ( const drizzled::identifier::User & user_ctx,
const drizzled::identifier::Table & table_identifier,
bool send_error = true )
static

Server API method for checking table authorization

Definition at line 153 of file authorization.cc.

◆ isAuthorized() [2/3]

bool drizzled::plugin::Authorization::isAuthorized ( const drizzled::identifier::User & user_ctx,
const identifier::Schema & schema_identifier,
bool send_error = true )
static

Server API method for checking schema authorization

Definition at line 122 of file authorization.cc.

◆ isAuthorized() [3/3]

bool drizzled::plugin::Authorization::isAuthorized ( const drizzled::identifier::User & user_ctx,
const Session & session,
bool send_error = true )
static

Server API method for checking process authorization

Definition at line 183 of file authorization.cc.

◆ pruneSchemaNames()

void drizzled::plugin::Authorization::pruneSchemaNames ( const drizzled::identifier::User & user_ctx,
identifier::schema::vector & set_of_schemas )
static

Server API helper method for applying authorization tests to a set of schema names (for use in the context of getSchemaNames

Definition at line 220 of file authorization.cc.

◆ removePlugin()

void drizzled::plugin::Authorization::removePlugin ( plugin::Authorization & auth)
static

Definition at line 44 of file authorization.cc.

◆ restrictProcess()

bool drizzled::plugin::Authorization::restrictProcess ( const drizzled::identifier::User & user_ctx,
const drizzled::identifier::User & session_ctx )
inlinevirtual

Should we restrict the current user's access to see this process?

Parameters
Currentsecurity context
Databaseto check against
Tableto check against
Returns
true if the user cannot see the process

Reimplemented in regex_policy::Policy, and simple_user_policy::Policy.

Definition at line 117 of file authorization.h.

◆ restrictSchema()

virtual bool drizzled::plugin::Authorization::restrictSchema ( const drizzled::identifier::User & user_ctx,
const identifier::Schema & schema )
pure virtual

Should we restrict the current user's access to this schema?

Parameters
Currentsecurity context
Databaseto check against
Returns
true if the user cannot access the schema

Implemented in regex_policy::Policy, and simple_user_policy::Policy.

◆ restrictTable()

bool drizzled::plugin::Authorization::restrictTable ( const drizzled::identifier::User & user_ctx,
const drizzled::identifier::Table & table )
inlinevirtual

Should we restrict the current user's access to this table?

Parameters
Currentsecurity context
Databaseto check against
Tableto check against
Returns
true if the user cannot access the table

Reimplemented in regex_policy::Policy.

Definition at line 111 of file authorization.h.


The documentation for this class was generated from the following files: