OW_NAMESPACE::AuthorizerManager Class Reference

#include <OW_AuthorizerManager.hpp>

Inheritance diagram for OW_NAMESPACE::AuthorizerManager:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AuthorizerManager ()
 AuthorizerManager (const Authorizer2IFCRef &authorizerRef)
 ~AuthorizerManager ()
virtual String getName () const
 Every service may have a name.
void setAuthorizer (const Authorizer2IFCRef &authorizerRef)
void turnOff (OperationContext &context)
void turnOn (OperationContext &context)
bool isOn (OperationContext &context)
bool allowReadInstance (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.
bool allowWriteInstance (const ServiceEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &op, Authorizer2IFC::EDynamicFlag dynamic, Authorizer2IFC::EWriteFlag flag, OperationContext &context)
 Determine if a write of the given instance is allowed.
bool allowReadSchema (const ServiceEnvironmentIFCRef &env, const String &ns, OperationContext &context)
 Determine if a read of the schema is allow for the given namespace.
bool allowWriteSchema (const ServiceEnvironmentIFCRef &env, const String &ns, Authorizer2IFC::EWriteFlag flag, OperationContext &context)
 Determine if a write of a schema element is allowed.
bool allowAccessToNameSpace (const ServiceEnvironmentIFCRef &env, const String &ns, Authorizer2IFC::EAccessType accessType, OperationContext &context)
 Determine if the user is allowed access to a namespace.
bool allowCreateNameSpace (const ServiceEnvironmentIFCRef &env, const String &ns, OperationContext &context)
 Determine if user is allowed to create the given namespace.
bool allowDeleteNameSpace (const ServiceEnvironmentIFCRef &env, const String &ns, OperationContext &context)
 Determine if the user is allowed to delete the given namespace.
bool allowEnumNameSpace (const ServiceEnvironmentIFCRef &env, OperationContext &context)
 Determine if the user is allowed to enumerate namespaces.
bool allowMethodInvocation (const ServiceEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &path, const String &methodName, OperationContext &context)
 Determine if a method may be invoked.
virtual void init (const ServiceEnvironmentIFCRef &env)
 Called by the CIMOMEnvironment after the CIMServer has be loaded and initialized.
virtual void shutdown ()
 The service must shutdown completely before returning from this function.

Private Attributes

Authorizer2IFCRef m_authorizer
bool m_initialized

Detailed Description

Definition at line 46 of file OW_AuthorizerManager.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::AuthorizerManager::AuthorizerManager  ) 
 

Definition at line 157 of file OW_AuthorizerManager.cpp.

OW_NAMESPACE::AuthorizerManager::AuthorizerManager const Authorizer2IFCRef authorizerRef  ) 
 

Definition at line 164 of file OW_AuthorizerManager.cpp.

OW_NAMESPACE::AuthorizerManager::~AuthorizerManager  ) 
 

Definition at line 169 of file OW_AuthorizerManager.cpp.


Member Function Documentation

bool OW_NAMESPACE::AuthorizerManager::allowAccessToNameSpace const ServiceEnvironmentIFCRef env,
const String ns,
Authorizer2IFC::EAccessType  accessType,
OperationContext context
 

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.
Returns:
true if access is allowed. Otherwise false.

Definition at line 300 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowCreateNameSpace const ServiceEnvironmentIFCRef env,
const String ns,
OperationContext context
 

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.

Definition at line 324 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowDeleteNameSpace const ServiceEnvironmentIFCRef env,
const String ns,
OperationContext context
 

Determine if the user is allowed 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.

Definition at line 346 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowEnumNameSpace const ServiceEnvironmentIFCRef env,
OperationContext context
 

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.

Definition at line 369 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, and m_initialized.

bool OW_NAMESPACE::AuthorizerManager::allowMethodInvocation const ServiceEnvironmentIFCRef env,
const String ns,
const CIMObjectPath path,
const String methodName,
OperationContext context
 

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.

Definition at line 391 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowReadInstance 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.

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.

Definition at line 199 of file OW_AuthorizerManager.cpp.

References authorizedPropertyList, className, clientPropertyList, context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowReadSchema const ServiceEnvironmentIFCRef env,
const String ns,
OperationContext context
 

Determine if a read of the schema is allow for 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.

Definition at line 253 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowWriteInstance const ServiceEnvironmentIFCRef env,
const String ns,
const CIMObjectPath op,
Authorizer2IFC::EDynamicFlag  dynamic,
Authorizer2IFC::EWriteFlag  flag,
OperationContext context
 

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.
op The object path of the instance that will be written.
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.

Definition at line 226 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

bool OW_NAMESPACE::AuthorizerManager::allowWriteSchema const ServiceEnvironmentIFCRef env,
const String ns,
Authorizer2IFC::EWriteFlag  flag,
OperationContext context
 

Determine if a write of a schema element is allowed.

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

Definition at line 276 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::createAuthEnvRef(), env, isOn(), m_authorizer, m_initialized, and ns.

String OW_NAMESPACE::AuthorizerManager::getName  )  const [virtual]
 

Every service may have a name.

The name is used to calculate dependencies, other services can return the name from getDependencies(), to instruct the cimom about which order to start and shutdown all the services. The default is to have no name, in that case, no other service can depend on it.

Reimplemented from OW_NAMESPACE::ServiceIFC.

Definition at line 175 of file OW_AuthorizerManager.cpp.

References OW_NAMESPACE::ServiceIFCNames::AuthorizerManager.

void OW_NAMESPACE::AuthorizerManager::init const ServiceEnvironmentIFCRef env  )  [virtual]
 

Called by the CIMOMEnvironment after the CIMServer has be loaded and initialized.

Implements OW_NAMESPACE::ServiceIFC.

Definition at line 182 of file OW_AuthorizerManager.cpp.

References OW_NAMESPACE::createAuthEnvRef(), env, m_authorizer, and m_initialized.

bool OW_NAMESPACE::AuthorizerManager::isOn OperationContext context  ) 
 

Definition at line 151 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::DISABLED_KEY, and OW_NAMESPACE::OperationContext::getStringDataWithDefault().

Referenced by allowAccessToNameSpace(), allowCreateNameSpace(), allowDeleteNameSpace(), allowEnumNameSpace(), allowMethodInvocation(), allowReadInstance(), allowReadSchema(), allowWriteInstance(), and allowWriteSchema().

void OW_NAMESPACE::AuthorizerManager::setAuthorizer const Authorizer2IFCRef authorizerRef  )  [inline]
 

Definition at line 57 of file OW_AuthorizerManager.hpp.

void OW_NAMESPACE::AuthorizerManager::shutdown  )  [virtual]
 

The service must shutdown completely before returning from this function.

All copies of the service environment or objects obtained from it should be set to 0 to avoid circular reference counts.

Implements OW_NAMESPACE::ServiceIFC.

Definition at line 417 of file OW_AuthorizerManager.cpp.

References m_authorizer, and OW_NAMESPACE::SharedLibraryReference< T >::setNull().

void OW_NAMESPACE::AuthorizerManager::turnOff OperationContext context  ) 
 

Definition at line 129 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::DISABLED_KEY, and OW_NAMESPACE::OperationContext::setStringData().

void OW_NAMESPACE::AuthorizerManager::turnOn OperationContext context  ) 
 

Definition at line 137 of file OW_AuthorizerManager.cpp.

References context, OW_NAMESPACE::DISABLED_KEY, and OW_NAMESPACE::OperationContext::removeData().


Member Data Documentation

Authorizer2IFCRef OW_NAMESPACE::AuthorizerManager::m_authorizer [private]
 

Definition at line 214 of file OW_AuthorizerManager.hpp.

Referenced by allowAccessToNameSpace(), allowCreateNameSpace(), allowDeleteNameSpace(), allowEnumNameSpace(), allowMethodInvocation(), allowReadInstance(), allowReadSchema(), allowWriteInstance(), allowWriteSchema(), init(), and shutdown().

bool OW_NAMESPACE::AuthorizerManager::m_initialized [private]
 

Definition at line 215 of file OW_AuthorizerManager.hpp.

Referenced by allowAccessToNameSpace(), allowCreateNameSpace(), allowDeleteNameSpace(), allowEnumNameSpace(), allowMethodInvocation(), allowReadInstance(), allowReadSchema(), allowWriteInstance(), allowWriteSchema(), and init().


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