123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- /*##############################################################################
- HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ############################################################################## */
- #ifndef BASESECURITY_INCL
- #define BASESECURITY_INCL
- #include <stdlib.h>
- #include "seclib.hpp"
- #include "jliball.hpp"
- #include "SecureUser.hpp"
- #include "SecurityResource.hpp"
- #include "SecurityResourceList.hpp"
- class CBaseSecurityManager : implements ISecManager, public CInterface
- {
- public:
- IMPLEMENT_IINTERFACE
- CBaseSecurityManager()
- {
- }
- CBaseSecurityManager(const char *serviceName, IPropertyTree *config)
- {
- }
- ~CBaseSecurityManager()
- {
- }
- //ISecManager
- ISecUser * createUser(const char * user_name)
- {
- return new CSecureUser(user_name, NULL);
- }
- ISecResourceList * createResourceList(const char * rlname)
- {
- return new CSecurityResourceList(rlname);
- }
- bool subscribe(ISecAuthenticEvents & events)
- {
- throwUnexpected();
- }
- bool unsubscribe(ISecAuthenticEvents & events)
- {
- throwUnexpected();
- }
- bool authorize(ISecUser & user, ISecResourceList * resources, IEspSecureContext* secureContext)
- {
- throwUnexpected();
- }
- bool authorizeEx(SecResourceType rtype, ISecUser & user, ISecResourceList * resources, IEspSecureContext* secureContext)
- {
- throwUnexpected();
- }
- SecAccessFlags authorizeEx(SecResourceType rtype, ISecUser & user, const char * resourcename, IEspSecureContext* secureContext)
- {
- throwUnexpected();
- }
- SecAccessFlags getAccessFlagsEx(SecResourceType rtype, ISecUser & user, const char * resourcename)
- {
- throwUnexpected();
- }
- SecAccessFlags authorizeFileScope(ISecUser & user, const char * filescope)
- {
- throwUnexpected();
- }
- bool authorizeFileScope(ISecUser & user, ISecResourceList * resources)
- {
- throwUnexpected();
- }
- bool authorizeViewScope(ISecUser & user, ISecResourceList * resources)
- {
- throwUnexpected();
- }
- bool addResources(ISecUser & user, ISecResourceList * resources)
- {
- throwUnexpected();
- }
- bool addResourcesEx(SecResourceType rtype, ISecUser & user, ISecResourceList * resources, SecPermissionType ptype, const char * basedn)
- {
- throwUnexpected();
- }
- bool addResourceEx(SecResourceType rtype, ISecUser & user, const char * resourcename, SecPermissionType ptype, const char * basedn)
- {
- throwUnexpected();
- }
- bool getResources(SecResourceType rtype, const char * basedn, IResourceArray & resources)
- {
- throwUnexpected();
- }
- bool updateResources(ISecUser & user, ISecResourceList * resources)
- {
- throwUnexpected();
- }
- bool updateSettings(ISecUser & user, ISecPropertyList * resources, IEspSecureContext* secureContext)
- {
- throwUnexpected();
- }
- bool addUser(ISecUser & user)
- {
- throwUnexpected();
- }
- ISecUser * findUser(const char * username)
- {
- throwUnexpected();
- }
- ISecUser * lookupUser(unsigned uid)
- {
- throwUnexpected();
- }
- ISecUserIterator * getAllUsers()
- {
- throwUnexpected();
- }
- void getAllGroups(StringArray & groups, StringArray & managedBy, StringArray & descriptions )
- {
- throwUnexpected();
- }
- bool updateUserPassword(ISecUser & user, const char * newPassword, const char* currPassword = 0)
- {
- throwUnexpected();
- }
- bool initUser(ISecUser & user)
- {
- throwUnexpected();
- }
- void setExtraParam(const char * name, const char * value)
- {
- throwUnexpected();
- }
- IAuthMap * createAuthMap(IPropertyTree * authconfig)
- {
- throwUnexpected();
- }
- IAuthMap * createFeatureMap(IPropertyTree * authconfig)
- {
- throwUnexpected();
- }
- IAuthMap * createSettingMap(IPropertyTree * authconfig)
- {
- throwUnexpected();
- }
- void deleteResource(SecResourceType rtype, const char * name, const char * basedn)
- {
- throwUnexpected();
- }
- void renameResource(SecResourceType rtype, const char * oldname, const char * newname, const char * basedn)
- {
- throwUnexpected();
- }
- void copyResource(SecResourceType rtype, const char * oldname, const char * newname, const char * basedn)
- {
- throwUnexpected();
- }
- void cacheSwitch(SecResourceType rtype, bool on)
- {
- throwUnexpected();
- }
- bool authTypeRequired(SecResourceType rtype)
- {
- throwUnexpected();
- }
- SecAccessFlags authorizeWorkunitScope(ISecUser & user, const char * filescope)
- {
- throwUnexpected();
- }
- bool authorizeWorkunitScope(ISecUser & user, ISecResourceList * resources)
- {
- throwUnexpected();
- }
- const char * getDescription()
- {
- throwUnexpected();
- }
- unsigned getPasswordExpirationWarningDays()
- {
- throwUnexpected();
- }
- bool createUserScopes()
- {
- throwUnexpected();
- }
- aindex_t getManagedFileScopes(IArrayOf<ISecResource>& scopes)
- {
- throwUnexpected();
- }
- SecAccessFlags queryDefaultPermission(ISecUser& user)
- {
- throwUnexpected();
- }
- bool clearPermissionsCache(ISecUser & user)
- {
- throwUnexpected();
- }
- bool authenticateUser(ISecUser & user, bool *superUser)
- {
- throwUnexpected();
- }
- secManagerType querySecMgrType()
- {
- throwUnexpected();
- }
- const char* querySecMgrTypeName()
- {
- throwUnexpected();
- }
- bool logoutUser(ISecUser & user)
- {
- throwUnexpected();
- }
- };
- #endif // BASESECURITY_INCL
- //#endif
|