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
00036 #ifndef OW_AUTHORIZER2IFC_HPP_INCLUDE_GUARD_
00037 #define OW_AUTHORIZER2IFC_HPP_INCLUDE_GUARD_
00038
00039 #include "OW_config.h"
00040 #include "OW_ServiceEnvironmentIFC.hpp"
00041 #include "OW_SharedLibraryReference.hpp"
00042 #include "OW_IntrusiveReference.hpp"
00043 #include "OW_IntrusiveCountableBase.hpp"
00044 #include "OW_IfcsFwd.hpp"
00045
00046 namespace OW_NAMESPACE
00047 {
00048
00049 class OW_COMMON_API Authorizer2IFC : public IntrusiveCountableBase
00050 {
00051 public:
00052
00053 enum EWriteFlag { E_CREATE, E_MODIFY, E_DELETE };
00054
00055 enum EAccessType { E_READ, E_WRITE, E_READWRITE };
00056
00057 enum EDynamicFlag { E_NOT_DYNAMIC, E_DYNAMIC };
00058
00059 virtual ~Authorizer2IFC();
00060
00085 virtual bool doAllowReadInstance(
00086 const ServiceEnvironmentIFCRef& env,
00087 const String& ns,
00088 const String& className,
00089 const StringArray* clientPropertyList,
00090 StringArray& authorizedPropertyList,
00091 OperationContext& context) = 0;
00092
00093 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00094
00107 virtual bool doAllowWriteInstance(
00108 const ServiceEnvironmentIFCRef& env,
00109 const String& ns,
00110 const CIMObjectPath& instanceName,
00111 EDynamicFlag dynamic,
00112 EWriteFlag flag,
00113 OperationContext& context) = 0;
00114 #endif
00115
00123 virtual bool doAllowReadSchema(
00124 const ServiceEnvironmentIFCRef& env,
00125 const String& ns,
00126 OperationContext& context) = 0;
00127
00128 #if !defined(OW_DISABLE_SCHEMA_MANIPULATION) || !defined(OW_DISABLE_QUALIFIER_DECLARATION)
00129
00137 virtual bool doAllowWriteSchema(
00138 const ServiceEnvironmentIFCRef& env,
00139 const String& ns,
00140 EWriteFlag flag,
00141 OperationContext& context) = 0;
00142 #endif
00143
00152 virtual bool doAllowAccessToNameSpace(
00153 const ServiceEnvironmentIFCRef& env,
00154 const String& ns,
00155 EAccessType accessType,
00156 OperationContext& context) = 0;
00157
00158 #if !defined(OW_DISABLE_INSTANCE_MANIPULATION) && !defined(OW_DISABLE_NAMESPACE_MANIPULATION)
00159
00166 virtual bool doAllowCreateNameSpace(
00167 const ServiceEnvironmentIFCRef& env,
00168 const String& ns,
00169 OperationContext& context) = 0;
00170
00178 virtual bool doAllowDeleteNameSpace(
00179 const ServiceEnvironmentIFCRef& env,
00180 const String& ns,
00181 OperationContext& context) = 0;
00182 #endif
00183
00190 virtual bool doAllowEnumNameSpace(
00191 const ServiceEnvironmentIFCRef& env,
00192 OperationContext& context) = 0;
00193
00204 virtual bool doAllowMethodInvocation(
00205 const ServiceEnvironmentIFCRef& env,
00206 const String& ns,
00207 const CIMObjectPath& path,
00208 const String& methodName,
00209 OperationContext& context) = 0;
00210
00211 virtual void init(ServiceEnvironmentIFCRef&);
00212 };
00213
00214 }
00215
00216 #if !defined(OW_STATIC_SERVICES)
00217 #define OW_AUTHORIZER2_FACTORY(derived, authorizerName) \
00218 extern "C" OW_EXPORT OW_NAMESPACE::Authorizer2IFC* \
00219 createAuthorizer2() \
00220 { \
00221 return new derived; \
00222 } \
00223 extern "C" OW_EXPORT const char* \
00224 getOWVersion() \
00225 { \
00226 return OW_VERSION; \
00227 }
00228 #else
00229 #define OW_AUTHORIZER2_FACTORY(derived, authorizerName) \
00230 extern "C" OW_NAMESPACE::Authorizer2IFC* \
00231 createAuthorizer2_##authorizerName() \
00232 { \
00233 return new derived; \
00234 }
00235 #endif
00236
00237
00238 #endif
00239