Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

SecurityPlugin Class Reference

#include <SecurityPlugin.h>

Inheritance diagram for SecurityPlugin:

Plugin BDBSecurityPlugin ODBCSecurityPlugin STUBSecurityPlugin List of all members.

Public Methods

 SecurityPlugin (const Config &cfg)
virtual ~SecurityPlugin ()=0
virtual void getLoginChallenge (string username, string &challenge)=0
virtual bool hasReadPermission (NumID userid, NumID docid)=0
virtual bool hasWritePermission (NumID userid, NumID docid)=0
virtual bool hasDeletePermission (NumID userid, NumID docid)=0
virtual CoreError changeUserPermission (NumID userid, Permission permission, NumID adminid)=0
virtual CoreError changeFilePermission (NumID docid, Permission permission, NumID userid)=0
virtual CoreError filterSearchResults (QueryResult &queryResult)=0
virtual CoreError login (string username, string challenge, string response, UserProfile &user)=0
virtual CoreError addUser (const UserProfile &userProfile, string challenge, string password, NumID &userid)=0
virtual CoreError delUser (NumID userid)=0
virtual CoreError getUserProfile (NumID userid, UserProfile &userProfile)=0
virtual CoreError changeUserProfile (NumID userid, const UserProfile &userProfile)=0
virtual CoreError setPassword (NumID userid, string challenge, string oldPassword, string newPassword)=0
virtual CoreError clearPassword (NumID userid)=0
virtual CoreError listUsers (vector< NumID > &users)=0
virtual CoreError fileCreated (NumID userid, NumID docid, Permission permission)=0

Detailed Description

Checks userpermissions


Constructor & Destructor Documentation

SecurityPlugin::SecurityPlugin const Config   cfg
 

Constructor

SecurityPlugin::~SecurityPlugin   [pure virtual]
 

Destructor


Member Function Documentation

virtual CoreError SecurityPlugin::addUser const UserProfile   userProfile,
string    challenge,
string    password,
NumID &    userid
[pure virtual]
 

Adds a new user to the system.

Parameters:
userProfile  the profile for the new user
challenge  the challenge that was presented to the user
password  the password for the new user
userid  the reference that receives the ID of the newly created user
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::changeFilePermission NumID    docid,
Permission    permission,
NumID    userid
[pure virtual]
 

Changes the permissions associated with a file. This function may return an error ('no_access_lists') if the security model does not associate permissions directly with files, for example on systems that only associate permissions with users.

Parameters:
docid  the ID of the document whose permissions * are to be changed.
permission  the new set of permissions for the user.
userid  the ID * of the user that requests * this operation.
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::changeUserPermission NumID    userid,
Permission    permission,
NumID    adminid
[pure virtual]
 

Changes the permissions associated with a user. This function may return an error ('no_capabilities') if the security model does not associate permissions directly with users, for example on systems that only associate permissions with files.

Parameters:
userid  the ID of the user whose permissions are to be changed.
permission  the new set of permissions for the user.
adminid  the ID * of the user that requests this operation.
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::changeUserProfile NumID    userid,
const UserProfile   userProfile
[pure virtual]
 

Changes a user's profile.

Parameters:
userid  the ID of the user of which to change the user profile
userProfile  the new user profile
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::clearPassword NumID    userid [pure virtual]
 

Clear user password.

Parameters:
userid  the ID of the user of which to clear the password
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::delUser NumID    userid [pure virtual]
 

Deletes a user from the system.

Parameters:
userid  the ID of the user to be deleted from the system
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::fileCreated NumID    userid,
NumID    docid,
Permission    permission
[pure virtual]
 

Notifies the security module that a new file has been created.

Parameters:
userid  The user that created the file. @docid the file's id. @permission an object representing the permissions associated with the file.
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::filterSearchResults QueryResult   queryResult [pure virtual]
 

Removes file identifiers from user queries according to the SecurityPlugin's internal policy to prevent sensitive information from reaching unauthorised users.

Parameters:
queryResult  The query results.
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual void SecurityPlugin::getLoginChallenge string    username,
string &    challenge
[pure virtual]
 

Obtains a login challenge for a user (e.g. 'Please type your password').

Parameters:
username  the user's user name.
challenge  the string object that will receive the challenge.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::getUserProfile NumID    userid,
UserProfile   userProfile
[pure virtual]
 

Retrieves a user's profile.

Parameters:
userid  the ID of the user for the user profile
userProfile  the reference that receives the user profile
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual bool SecurityPlugin::hasDeletePermission NumID    userid,
NumID    docid
[pure virtual]
 

Checks user's permission to delete a file.

Parameters:
userid  The user that requests the delete.
docid  The identifier of the file.
Returns:
true if the user has the permission.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual bool SecurityPlugin::hasReadPermission NumID    userid,
NumID    docid
[pure virtual]
 

Checks user's permission to read a file.

Parameters:
userid  The user that requests the read.
docid  The identifier of the file.
Returns:
true if the user has the permission.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual bool SecurityPlugin::hasWritePermission NumID    userid,
NumID    docid
[pure virtual]
 

Checks user's permission to write a file.

Parameters:
userid  The user that requests the write.
docid  The identifier of the file.
Returns:
true if the user has the permission.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::listUsers vector< NumID > &    users [pure virtual]
 

Retrieves a list of all users (list of IDs).

Parameters:
users  the reference that receives the user IDs
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::login string    username,
string    challenge,
string    response,
UserProfile   user
[pure virtual]
 

Retrieves a user-ID.

Parameters:
username  the user's login data.
challenge  the challenge that was presented to the user.
response  the user's response to the challenge. #
user  the reference that receives the user profile
Returns:
CORE_NO_ERROR if the challenge/response and username provide a valid combination. See Error.h for other return values.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.

virtual CoreError SecurityPlugin::setPassword NumID    userid,
string    challenge,
string    oldPassword,
string    newPassword
[pure virtual]
 

Change user's password. The old and new passwords can be encrypted using the challenge-response protocol.

Parameters:
userid  the ID of the user of which to change the password
challenge  the challenge that was presented to the user
oldPassword  the old password of the user
newPassword  the new password for the user
Returns:
status code.

Implemented in BDBSecurityPlugin, ODBCSecurityPlugin, and STUBSecurityPlugin.


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18