00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_SIMPLE_AUTHORIZER2_HPP_INCLUDE_GUARD_
00036 #define OW_SIMPLE_AUTHORIZER2_HPP_INCLUDE_GUARD_
00037 #include "OW_config.h"
00038 #include "OW_Authorizer2IFC.hpp"
00039
00040 namespace OW_NAMESPACE
00041 {
00042
00043
00044 class SimpleAuthorizer2 : public Authorizer2IFC
00045 {
00046 public:
00050 SimpleAuthorizer2();
00054 virtual ~SimpleAuthorizer2();
00055
00079 virtual bool doAllowReadInstance(
00080 const ServiceEnvironmentIFCRef& env,
00081 const String& ns,
00082 const String& className,
00083 const StringArray* clientPropertyList,
00084 StringArray& authorizedPropertyList,
00085 OperationContext& context);
00086
00087 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00088
00100 virtual bool doAllowWriteInstance(
00101 const ServiceEnvironmentIFCRef& env,
00102 const String& ns,
00103 const CIMObjectPath& instanceName,
00104 EDynamicFlag dynamic,
00105 EWriteFlag flag,
00106 OperationContext& context);
00107 #endif
00108
00115 virtual bool doAllowReadSchema(
00116 const ServiceEnvironmentIFCRef& env,
00117 const String& ns,
00118 OperationContext& context);
00119
00120 #if !defined(OW_DISABLE_SCHEMA_MANIPULATION) || !defined(OW_DISABLE_QUALIFIER_DECLARATION)
00121
00129 virtual bool doAllowWriteSchema(
00130 const ServiceEnvironmentIFCRef& env,
00131 const String& ns,
00132 EWriteFlag flag,
00133 OperationContext& context);
00134
00135 #endif
00136
00144 virtual bool doAllowAccessToNameSpace(
00145 const ServiceEnvironmentIFCRef& env,
00146 const String& ns,
00147 Authorizer2IFC::EAccessType actype,
00148 OperationContext& context);
00149
00150 #if !defined(OW_DISABLE_INSTANCE_MANIPULATION) && !defined(OW_DISABLE_NAMESPACE_MANIPULATION)
00151
00157 virtual bool doAllowCreateNameSpace(
00158 const ServiceEnvironmentIFCRef& env,
00159 const String& ns,
00160 OperationContext& context);
00161
00168 virtual bool doAllowDeleteNameSpace(
00169 const ServiceEnvironmentIFCRef& env,
00170 const String& ns,
00171 OperationContext& context);
00172 #endif
00173
00179 virtual bool doAllowEnumNameSpace(
00180 const ServiceEnvironmentIFCRef& env,
00181 OperationContext& context);
00182
00192 virtual bool doAllowMethodInvocation(
00193 const ServiceEnvironmentIFCRef& env,
00194 const String& ns,
00195 const CIMObjectPath& path,
00196 const String& MethodName,
00197 OperationContext& context);
00198
00199 private:
00200
00201 bool checkAccess(const String& opType, const String& ns,
00202 const ServiceEnvironmentIFCRef& env,
00203 OperationContext& context);
00204 };
00205
00206 }
00207
00208 #endif