
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 OSecuritySystempublic boolean isDefaultAllowed()
isDefaultAllowed in interface OSecuritySystempublic String authenticate(String username, String password)
authenticate in interface OSecuritySystemprotected OServer getServer()
public String getAuthenticationHeader(String databaseName)
getAuthenticationHeader in interface OSecuritySystempublic Map<String,String> getAuthenticationHeaders(String databaseName)
getAuthenticationHeaders in interface OSecuritySystempublic ODocument getConfig()
getConfig in interface OSecuritySystempublic ODocument getComponentConfig(String name)
getComponentConfig in interface OSecuritySystempublic OUser getSystemUser(String username, String dbName)
getSystemUser in interface OSecuritySystempublic boolean isAuthorized(String username, String resource)
isAuthorized in interface OSecuritySystempublic boolean isEnabled()
isEnabled in interface OSecuritySystempublic boolean arePasswordsStored()
arePasswordsStored in interface OSecuritySystempublic boolean isSingleSignOnSupported()
isSingleSignOnSupported in interface OSecuritySystempublic void validatePassword(String username, String password) throws OInvalidPasswordException
validatePassword in interface OSecuritySystemOInvalidPasswordExceptionpublic void replacePasswordValidator(OPasswordValidator validator)
public OAuditingService getAuditing()
getAuditing in interface OServerSecuritypublic OSecurityAuthenticator getAuthenticator(String authMethod)
OServerSecuritygetAuthenticator in interface OServerSecuritypublic OSecurityAuthenticator getPrimaryAuthenticator()
OServerSecuritygetPrimaryAuthenticator in interface OServerSecuritypublic OServerUserConfiguration getUser(String username)
OServerSecuritygetUser in interface OServerSecuritypublic ODatabase<?> openDatabase(String dbName)
openDatabase in interface OServerSecuritypublic OSyslog getSyslog()
getSyslog in interface OServerSecuritypublic void log(OAuditingOperation operation, String dbName, OSecurityUser user, String message)
OSecuritySystemlog in interface OSecuritySystemdbName - May be null or empty.user - May be null or empty.public void registerSecurityClass(Class<?> cls)
registerSecurityClass in interface OSecuritySystempublic void unregisterSecurityClass(Class<?> cls)
unregisterSecurityClass in interface OSecuritySystempublic void reload(String cfgPath)
reload in interface OSecuritySystempublic void reload(OSecurityUser user, String cfgPath)
reload in interface OSecuritySystempublic void reload(ODocument configDoc)
reload in interface OSecuritySystempublic void reload(OSecurityUser user, ODocument configDoc)
reload in interface OSecuritySystempublic void reloadComponent(OSecurityUser user, String name, ODocument jsonConfig)
reloadComponent in interface OSecuritySystempublic void securityRecordChange(String dbURL, ODocument record)
securityRecordChange in interface OSecuritySystempublic void onBeforeActivate()
onBeforeActivate in interface OServerLifecycleListenerpublic void onAfterActivate()
onAfterActivate in interface OServerLifecycleListenerpublic void onAfterDynamicPlugins()
onAfterDynamicPlugins in interface OServerSecuritypublic void onAfterDynamicPlugins(OSecurityUser user)
onAfterDynamicPlugins in interface OServerSecuritypublic void onBeforeDeactivate()
onBeforeDeactivate in interface OServerLifecycleListenerpublic void onAfterDeactivate()
onAfterDeactivate in interface OServerLifecycleListenerprotected void loadComponents()
public OSecurityInternal newSecurity()
newSecurity in interface OSecurityFactoryCopyright © 2009–2025 OrientDB. All rights reserved.