public class ODefaultServerSecurity extends Object implements OSecurityFactory, OServerLifecycleListener, OServerSecurity
Constructor and Description |
---|
ODefaultServerSecurity(OServer oServer,
OServerConfigurationManager serverCfg) |
Modifier and Type | Method and Description |
---|---|
boolean |
arePasswordsStored() |
String |
authenticate(String username,
String password) |
OAuditingService |
getAuditing()
OServerSecurity Interface *
|
String |
getAuthenticationHeader(String databaseName) |
Map<String,String> |
getAuthenticationHeaders(String databaseName) |
OSecurityAuthenticator |
getAuthenticator(String authMethod)
Returns the authenticator based on name, if one exists.
|
ODocument |
getComponentConfig(String name) |
ODocument |
getConfig() |
protected String |
getConfigProperty(String name) |
OSecurityAuthenticator |
getPrimaryAuthenticator()
Returns the first authenticator in the list, which is the primary authenticator.
|
protected OServer |
getServer() |
OSyslog |
getSyslog() |
OUser |
getSystemUser(String username,
String dbName)
Returns the "System User" associated with 'username' from the system database.
|
OServerUserConfiguration |
getUser(String username)
Some authenticators support maintaining a list of users and associated resources (and sometimes
passwords).
|
boolean |
isAuthorized(String username,
String resource) |
boolean |
isDefaultAllowed() |
boolean |
isEnabled() |
boolean |
isSingleSignOnSupported() |
protected void |
loadComponents() |
void |
log(OAuditingOperation operation,
String dbName,
OSecurityUser user,
String message)
Logs to the auditing service, if installed.
|
OSecurityInternal |
newSecurity()
OSecurityFactory Interface *
|
void |
onAfterActivate() |
void |
onAfterDeactivate() |
void |
onAfterDynamicPlugins() |
void |
onAfterDynamicPlugins(OSecurityUser user) |
void |
onBeforeActivate()
OServerLifecycleListener Interface *
|
void |
onBeforeDeactivate() |
ODatabase<?> |
openDatabase(String dbName) |
void |
registerSecurityClass(Class<?> cls) |
void |
reload(ODocument configDoc) |
void |
reload(OSecurityUser user,
ODocument configDoc) |
void |
reload(OSecurityUser user,
String cfgPath) |
void |
reload(String cfgPath) |
void |
reloadComponent(OSecurityUser user,
String name,
ODocument jsonConfig) |
void |
replacePasswordValidator(OPasswordValidator validator) |
void |
securityRecordChange(String dbURL,
ODocument record)
Called each time one of the security classes (OUser, ORole, OServerRole) is modified.
|
void |
shutdown() |
void |
unregisterSecurityClass(Class<?> cls) |
void |
validatePassword(String username,
String password) |
public ODefaultServerSecurity(OServer oServer, OServerConfigurationManager serverCfg)
public void shutdown()
shutdown
in interface OSecuritySystem
public boolean isDefaultAllowed()
isDefaultAllowed
in interface OSecuritySystem
public String authenticate(String username, String password)
authenticate
in interface OSecuritySystem
protected OServer getServer()
public String getAuthenticationHeader(String databaseName)
getAuthenticationHeader
in interface OSecuritySystem
public Map<String,String> getAuthenticationHeaders(String databaseName)
getAuthenticationHeaders
in interface OSecuritySystem
public ODocument getConfig()
getConfig
in interface OSecuritySystem
public ODocument getComponentConfig(String name)
getComponentConfig
in interface OSecuritySystem
public OUser getSystemUser(String username, String dbName)
getSystemUser
in interface OSecuritySystem
public boolean isAuthorized(String username, String resource)
isAuthorized
in interface OSecuritySystem
public boolean isEnabled()
isEnabled
in interface OSecuritySystem
public boolean arePasswordsStored()
arePasswordsStored
in interface OSecuritySystem
public boolean isSingleSignOnSupported()
isSingleSignOnSupported
in interface OSecuritySystem
public void validatePassword(String username, String password) throws OInvalidPasswordException
validatePassword
in interface OSecuritySystem
OInvalidPasswordException
public void replacePasswordValidator(OPasswordValidator validator)
public OAuditingService getAuditing()
getAuditing
in interface OServerSecurity
public OSecurityAuthenticator getAuthenticator(String authMethod)
OServerSecurity
getAuthenticator
in interface OServerSecurity
public OSecurityAuthenticator getPrimaryAuthenticator()
OServerSecurity
getPrimaryAuthenticator
in interface OServerSecurity
public OServerUserConfiguration getUser(String username)
OServerSecurity
getUser
in interface OServerSecurity
public ODatabase<?> openDatabase(String dbName)
openDatabase
in interface OServerSecurity
public OSyslog getSyslog()
getSyslog
in interface OServerSecurity
public void log(OAuditingOperation operation, String dbName, OSecurityUser user, String message)
OSecuritySystem
log
in interface OSecuritySystem
dbName
- May be null or empty.user
- May be null or empty.public void registerSecurityClass(Class<?> cls)
registerSecurityClass
in interface OSecuritySystem
public void unregisterSecurityClass(Class<?> cls)
unregisterSecurityClass
in interface OSecuritySystem
public void reload(String cfgPath)
reload
in interface OSecuritySystem
public void reload(OSecurityUser user, String cfgPath)
reload
in interface OSecuritySystem
public void reload(ODocument configDoc)
reload
in interface OSecuritySystem
public void reload(OSecurityUser user, ODocument configDoc)
reload
in interface OSecuritySystem
public void reloadComponent(OSecurityUser user, String name, ODocument jsonConfig)
reloadComponent
in interface OSecuritySystem
public void securityRecordChange(String dbURL, ODocument record)
securityRecordChange
in interface OSecuritySystem
public void onBeforeActivate()
onBeforeActivate
in interface OServerLifecycleListener
public void onAfterActivate()
onAfterActivate
in interface OServerLifecycleListener
public void onAfterDynamicPlugins()
onAfterDynamicPlugins
in interface OServerSecurity
public void onAfterDynamicPlugins(OSecurityUser user)
onAfterDynamicPlugins
in interface OServerSecurity
public void onBeforeDeactivate()
onBeforeDeactivate
in interface OServerLifecycleListener
public void onAfterDeactivate()
onAfterDeactivate
in interface OServerLifecycleListener
protected void loadComponents()
public OSecurityInternal newSecurity()
newSecurity
in interface OSecurityFactory
Copyright © 2009–2020 OrientDB. All rights reserved.