OW_NAMESPACE::SimpleAuthorizer2 Class Reference

#include <OW_SimpleAuthorizer2.hpp>

Inheritance diagram for OW_NAMESPACE::SimpleAuthorizer2:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::SimpleAuthorizer2:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SimpleAuthorizer2 ()
 Create a new SimpleAuthorization object.
virtual ~SimpleAuthorizer2 ()
 Destroy this SimpleAuthorization object.
virtual bool doAllowReadInstance (const ServiceEnvironmentIFCRef &env, const String &ns, const String &className, const StringArray *clientPropertyList, StringArray &authorizedPropertyList, OperationContext &context)
 Determine if a read of the given instance is allowed.
virtual bool doAllowWriteInstance (const ServiceEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &instanceName, EDynamicFlag dynamic, EWriteFlag flag, OperationContext &context)
 Determine if a write of the given instance is allowed.
virtual bool doAllowReadSchema (const ServiceEnvironmentIFCRef &env, const String &ns, OperationContext &context)
 Determine if a read of the schema is allowed in the given namespace.
virtual bool doAllowWriteSchema (const ServiceEnvironmentIFCRef &env, const String &ns, EWriteFlag flag, OperationContext &context)
 Determine if a write of the schema in the given namespace is allowed.
virtual bool doAllowAccessToNameSpace (const ServiceEnvironmentIFCRef &env, const String &ns, Authorizer2IFC::EAccessType actype, OperationContext &context)
 Determine if the user is allowed access to a namespace.
virtual bool doAllowCreateNameSpace (const ServiceEnvironmentIFCRef &env, const String &ns, OperationContext &context)
 Determine if user is allowed to create the given namespace.
virtual bool doAllowDeleteNameSpace (const ServiceEnvironmentIFCRef &env, const String &ns, OperationContext &context)
 Determine if the user is allow to delete the given namespace.
virtual bool doAllowEnumNameSpace (const ServiceEnvironmentIFCRef &env, OperationContext &context)
 Determine if the user is allowed to enumerate namespaces.
virtual bool doAllowMethodInvocation (const ServiceEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &path, const String &MethodName, OperationContext &context)
 Determine if a method may be invoked.

Private Member Functions

bool checkAccess (const String &opType, const String &ns, const ServiceEnvironmentIFCRef &env, OperationContext &context)

Detailed Description

Definition at line 44 of file OW_SimpleAuthorizer2.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::SimpleAuthorizer2::SimpleAuthorizer2  ) 
 

Create a new SimpleAuthorization object.

Definition at line 68 of file OW_SimpleAuthorizer2.cpp.

OW_NAMESPACE::SimpleAuthorizer2::~SimpleAuthorizer2  )  [virtual]
 

Destroy this SimpleAuthorization object.

Definition at line 73 of file OW_SimpleAuthorizer2.cpp.


Member Function Documentation

bool OW_NAMESPACE::SimpleAuthorizer2::checkAccess const String opType,
const String ns,
const ServiceEnvironmentIFCRef env,
OperationContext context
[private]
 

Definition at line 79 of file OW_SimpleAuthorizer2.cpp.

References OW_NAMESPACE::ACCESS_READ, OW_NAMESPACE::ACCESS_READWRITE, OW_NAMESPACE::ACCESS_WRITE, context, OW_NAMESPACE::UserInfo::getInternal(), OW_NAMESPACE::OperationContext::getUserInfo(), and OW_ASSERT.

Referenced by doAllowAccessToNameSpace(), doAllowMethodInvocation(), doAllowReadInstance(), and doAllowReadSchema().

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowAccessToNameSpace const ServiceEnvironmentIFCRef env,
const String ns,
Authorizer2IFC::EAccessType  actype,
OperationContext context
[virtual]
 

Determine if the user is allowed access to a namespace.

Parameters:
env A reference to a provider environment.
ns The namespace that will be accessed.
actype - See Authorizer2IFC
Returns:
true if access is allowed. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 304 of file OW_SimpleAuthorizer2.cpp.

References OW_NAMESPACE::ACCESS_READ, OW_NAMESPACE::ACCESS_READWRITE, OW_NAMESPACE::ACCESS_WRITE, checkAccess(), context, OW_NAMESPACE::Authorizer2IFC::E_READ, OW_NAMESPACE::Authorizer2IFC::E_WRITE, env, and ns.

Referenced by doAllowCreateNameSpace(), and doAllowDeleteNameSpace().

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowCreateNameSpace const ServiceEnvironmentIFCRef env,
const String ns,
OperationContext context
[virtual]
 

Determine if user is allowed to create the given namespace.

Parameters:
env A reference to a provider environment.
ns The namespace that will be created.
Returns:
true if the creation is authorized. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 329 of file OW_SimpleAuthorizer2.cpp.

References context, doAllowAccessToNameSpace(), OW_NAMESPACE::Authorizer2IFC::E_WRITE, and env.

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowDeleteNameSpace const ServiceEnvironmentIFCRef env,
const String ns,
OperationContext context
[virtual]
 

Determine if the user is allow to delete the given namespace.

Parameters:
env A reference to a provider environment.
ns The namespace that will be deleted.
Returns:
true if the deletion is authorized. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 339 of file OW_SimpleAuthorizer2.cpp.

References context, doAllowAccessToNameSpace(), OW_NAMESPACE::Authorizer2IFC::E_WRITE, and env.

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowEnumNameSpace const ServiceEnvironmentIFCRef env,
OperationContext context
[virtual]
 

Determine if the user is allowed to enumerate namespaces.

Parameters:
env A reference to a provider environment
Returns:
true if the enumerate is allowed. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 350 of file OW_SimpleAuthorizer2.cpp.

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowMethodInvocation const ServiceEnvironmentIFCRef env,
const String ns,
const CIMObjectPath path,
const String MethodName,
OperationContext context
[virtual]
 

Determine if a method may be invoked.

Parameters:
env A reference to a provider environment.
ns The namespace containing the instance or class.
path The name of the instance or class containing the method.
MethodName The name of the method.
Returns:
true if access is allowed. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 358 of file OW_SimpleAuthorizer2.cpp.

References OW_NAMESPACE::ACCESS_READWRITE, checkAccess(), context, env, and ns.

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowReadInstance const ServiceEnvironmentIFCRef env,
const String ns,
const String className,
const StringArray clientPropertyList,
StringArray authorizedPropertyList,
OperationContext context
[virtual]
 

Determine if a read of the given instance is allowed.

The given objectPath could be a class path or an instance path.

Parameters:
env A reference to a provider environment
ns The namespace the instance will be read from
className The class name of the instances that will be read.
clientPropertyList This is the property list given by the client when requesting the instance(s). The client expects it to have the following meaning: If not NULL then it specifies the only properties that can be returned in the instance. If not NULL but the array is empty, then no properties should be returned. If NULL then all properties will be returned.
authorizedPropertyList This is the property list the authorizer will placed the authorized property names in. The return value of this method determines how this property list is interpreted. If this method returns NULL, then this propertyList will be iignored on returned. If a pointer to this string array is returned, then authorizedPropertyList contains the property names the client is allowed to retrieve. In this case, if the property list is empty, then the client will not get any properties.
Returns:
true if access is allowed. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 257 of file OW_SimpleAuthorizer2.cpp.

References OW_NAMESPACE::ACCESS_READ, checkAccess(), context, env, and ns.

bool OW_NAMESPACE::SimpleAuthorizer2::doAllowReadSchema const ServiceEnvironmentIFCRef env,
const String ns,
OperationContext context
[virtual]
 

Determine if a read of the schema is allowed in the given namespace.

Parameters:
env A reference to a provider environment
ns The namespace the schema will be read from.
Returns:
true if access is allowed. Otherwise false.

Implements OW_NAMESPACE::Authorizer2IFC.

Definition at line 283 of file OW_SimpleAuthorizer2.cpp.

References OW_NAMESPACE::ACCESS_READ, checkAccess(), context, env, and ns.

virtual bool OW_NAMESPACE::SimpleAuthorizer2::doAllowWriteInstance const ServiceEnvironmentIFCRef env,
const String ns,
const CIMObjectPath instanceName,
EDynamicFlag  dynamic,
EWriteFlag  flag,
OperationContext context
[virtual]
 

Determine if a write of the given instance is allowed.

Parameters:
env A reference to a provider environment.
ns The namespace the instance will be written to.
instanceName The name of the instance that will be created/modified/deleted.
dynamic If E_DYNAMIC, then this instance is being written. through a provider. Otherwise it is being written to the static repository.
flag Indicates create/modify/delete operation.
Returns:
true if access is allowed. Otherwise false.

virtual bool OW_NAMESPACE::SimpleAuthorizer2::doAllowWriteSchema const ServiceEnvironmentIFCRef env,
const String ns,
EWriteFlag  flag,
OperationContext context
[virtual]
 

Determine if a write of the schema in the given namespace is allowed.

Parameters:
env A reference to a provider environment
ns The namespace the schema write will take place in.
flag Indicates create/modify/delete operation
Returns:
true if access is allowed. Otherwise false.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:12:20 2006 for openwbem by  doxygen 1.4.6