Class ODefaultSecuritySystem
java.lang.Object
com.orientechnologies.orient.core.security.ODefaultSecuritySystem
- All Implemented Interfaces:
OSecuritySystem
Provides an implementation of OServerSecurity.
- Author:
- S. Colin Leister
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(OrientDBInternal context, OSecurityConfig serverCfg) voidaddTemporaryUser(String iName, String iPassword, String iPermissions) booleanauthenticate(ODatabaseSession session, OAuthenticationInfo authenticationInfo) authenticate(ODatabaseSession session, String username, String password) authenticateAndAuthorize(String iUserName, String iPassword, String iResourceToCheck) authenticateServerUser(String username, String password) voidclose()voidcreateSystemRoles(ODatabaseSession session) booleanexistsUser(String user) OServerSecurity Interface *getAuthenticationHeader(String databaseName) getAuthenticationHeaders(String databaseName) getAuthenticator(String authMethod) Returns the authenticator based on name, if one exists.getComponentConfig(String name) Returns the first authenticator in the list, which is the primary authenticator.getServerUser(String username) getSystemUser(String username, String dbName) Returns the "System User" associated with 'username' from the system database.Some authenticators support maintaining a list of users and associated resources (and sometimes passwords).booleanisAuthorized(String username, String resource) booleanbooleanbooleanisServerUserAuthorized(String username, String resource) booleanvoidprotected voidvoidlog(OAuditingOperation operation, String dbName, OSecurityUser user, String message) Logs to the auditing service, if installed.newSecurity(String database) voidvoidvoidregisterSecurityClass(Class<?> cls) voidreload(OSecurityUser user, ODocument configDoc) voidreload(OSecurityUser user, String cfgPath) voidvoidvoidreloadComponent(OSecurityUser user, String name, ODocument jsonConfig) voidreplacePasswordValidator(OPasswordValidator validator) voidsetAuthenticatorList(List<OSecurityAuthenticator> authenticators) voidshutdown()voidunregisterSecurityClass(Class<?> cls) voidvalidatePassword(String username, String password)
-
Constructor Details
-
ODefaultSecuritySystem
public ODefaultSecuritySystem()
-
-
Method Details
-
activate
-
createSystemRoles
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceOSecuritySystem
-
isDefaultAllowed
public boolean isDefaultAllowed()- Specified by:
isDefaultAllowedin interfaceOSecuritySystem
-
authenticate
- Specified by:
authenticatein interfaceOSecuritySystem
-
authenticate
- Specified by:
authenticatein interfaceOSecuritySystem
-
authenticateServerUser
- Specified by:
authenticateServerUserin interfaceOSecuritySystem
-
getContext
- Specified by:
getContextin interfaceOSecuritySystem
-
getAuthenticationHeader
- Specified by:
getAuthenticationHeaderin interfaceOSecuritySystem
-
getAuthenticationHeaders
- Specified by:
getAuthenticationHeadersin interfaceOSecuritySystem
-
getConfig
- Specified by:
getConfigin interfaceOSecuritySystem
-
getComponentConfig
- Specified by:
getComponentConfigin interfaceOSecuritySystem
-
getSystemUser
Returns the "System User" associated with 'username' from the system database. If not found, returns null. dbName is used to filter the assigned roles. It may be null.- Specified by:
getSystemUserin interfaceOSecuritySystem
-
isAuthorized
- Specified by:
isAuthorizedin interfaceOSecuritySystem
-
isServerUserAuthorized
- Specified by:
isServerUserAuthorizedin interfaceOSecuritySystem
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceOSecuritySystem
-
arePasswordsStored
public boolean arePasswordsStored()- Specified by:
arePasswordsStoredin interfaceOSecuritySystem
-
isSingleSignOnSupported
public boolean isSingleSignOnSupported()- Specified by:
isSingleSignOnSupportedin interfaceOSecuritySystem
-
validatePassword
- Specified by:
validatePasswordin interfaceOSecuritySystem- Throws:
OInvalidPasswordException
-
replacePasswordValidator
-
getAuditing
OServerSecurity Interface *- Specified by:
getAuditingin interfaceOSecuritySystem
-
getAuthenticator
Description copied from interface:OSecuritySystemReturns the authenticator based on name, if one exists.- Specified by:
getAuthenticatorin interfaceOSecuritySystem
-
getPrimaryAuthenticator
Description copied from interface:OSecuritySystemReturns the first authenticator in the list, which is the primary authenticator.- Specified by:
getPrimaryAuthenticatorin interfaceOSecuritySystem
-
getUser
Description copied from interface:OSecuritySystemSome authenticators support maintaining a list of users and associated resources (and sometimes passwords).- Specified by:
getUserin interfaceOSecuritySystem
-
getServerUser
- Specified by:
getServerUserin interfaceOSecuritySystem
-
getSyslog
- Specified by:
getSyslogin interfaceOSecuritySystem
-
log
Description copied from interface:OSecuritySystemLogs to the auditing service, if installed.- Specified by:
login interfaceOSecuritySystemdbName- May be null or empty.user- May be null or empty.
-
registerSecurityClass
- Specified by:
registerSecurityClassin interfaceOSecuritySystem
-
unregisterSecurityClass
- Specified by:
unregisterSecurityClassin interfaceOSecuritySystem
-
load
-
reload
- Specified by:
reloadin interfaceOSecuritySystem
-
reload
- Specified by:
reloadin interfaceOSecuritySystem
-
reload
- Specified by:
reloadin interfaceOSecuritySystem
-
reload
- Specified by:
reloadin interfaceOSecuritySystem
-
reloadComponent
- Specified by:
reloadComponentin interfaceOSecuritySystem
-
onAfterDynamicPlugins
public void onAfterDynamicPlugins()- Specified by:
onAfterDynamicPluginsin interfaceOSecuritySystem
-
onAfterDynamicPlugins
- Specified by:
onAfterDynamicPluginsin interfaceOSecuritySystem
-
loadComponents
protected void loadComponents() -
close
public void close() -
authenticateAndAuthorize
public OSecurityUser authenticateAndAuthorize(String iUserName, String iPassword, String iResourceToCheck) - Specified by:
authenticateAndAuthorizein interfaceOSecuritySystem
-
existsUser
- Specified by:
existsUserin interfaceOSecuritySystem
-
addTemporaryUser
- Specified by:
addTemporaryUserin interfaceOSecuritySystem
-
newSecurity
- Specified by:
newSecurityin interfaceOSecuritySystem
-
setAuthenticatorList
-
getEnabledAuthenticators
-
getAuthenticatorsList
-
getTokenSign
- Specified by:
getTokenSignin interfaceOSecuritySystem
-