ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Singleton class that stores all security settings. More...
Public Member Functions | |
getSecuritySettingsRefId () | |
setPasswordCharsAndNumbersEnabled ($a_chars_and_numbers_enabled) | |
set if the passwords have to contain characters and numbers More... | |
isPasswordCharsAndNumbersEnabled () | |
get boolean if the passwords have to contain characters and numbers More... | |
setPasswordSpecialCharsEnabled ($a_password_special_chars_enabled) | |
set if the passwords have to contain special characters More... | |
isPasswordSpecialCharsEnabled () | |
get boolean if the passwords have to contain special characters More... | |
setPasswordMinLength ($a_password_min_length) | |
set the minimum length for passwords More... | |
getPasswordMinLength () | |
get the minimum length for passwords More... | |
setPasswordMaxLength ($a_password_max_length) | |
set the maximum length for passwords More... | |
getPasswordMaxLength () | |
get the maximum length for passwords More... | |
setPasswordMaxAge ($a_password_max_age) | |
set the maximum password age More... | |
getPasswordMaxAge () | |
get the maximum password age More... | |
setLoginMaxAttempts ($a_login_max_attempts) | |
set the maximum count of login attempts More... | |
getLoginMaxAttempts () | |
get the maximum count of login attempts More... | |
setHTTPSEnabled ($value) | |
Enable https for certain scripts. More... | |
isHTTPSEnabled () | |
read access to https enabled property More... | |
setPasswordChangeOnFirstLoginEnabled ($a_password_change_on_first_login_enabled) | |
set if the passwords have to be changed by users on first login More... | |
isPasswordChangeOnFirstLoginEnabled () | |
get boolean if the passwords have to be changed by users on first login More... | |
isAdminRoleProtected () | |
Check if admin role is protected. More... | |
protectedAdminRole ($a_stat) | |
Set admin role protection status. More... | |
checkAdminRoleAccessible ($a_usr_id) | |
Check if the administrator role is accessible for a specific user. More... | |
save () | |
Save settings. More... | |
validate (ilPropertyFormGUI $a_form=null) | |
validate settings More... | |
isPreventionOfSimultaneousLoginsEnabled () | |
Prevention of simultaneous logins with the same account. More... | |
setPreventionOfSimultaneousLogins ($value) | |
Enable/Disable prevention of simultaneous logins with the same account. More... | |
setPasswordNumberOfUppercaseChars ($password_ucase_chars_num) | |
Set number of uppercase characters required. More... | |
getPasswordNumberOfUppercaseChars () | |
Returns number of uppercase characters required. More... | |
setPasswordNumberOfLowercaseChars ($password_lcase_chars_num) | |
Set number of lowercase characters required. More... | |
getPasswordNumberOfLowercaseChars () | |
Returns number of lowercase characters required. More... | |
setPasswordMustNotContainLoginnameStatus ($status) | |
Set whether the password must not contain the loginname or not. More... | |
getPasswordMustNotContainLoginnameStatus () | |
Return whether the password must not contain the loginname or not. More... | |
Static Public Member Functions | |
static | _getInstance () |
Get instance of ilSecuritySettings. More... | |
Data Fields | |
const | SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH = 4 |
const | SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH = 5 |
const | SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE = 6 |
const | SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS = 7 |
const | SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1 = 11 |
const | SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2 = 8 |
const | SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3 = 9 |
const | SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH = 10 |
const | DEFAULT_PASSWORD_CHARS_AND_NUMBERS_ENABLED = true |
const | DEFAULT_PASSWORD_SPECIAL_CHARS_ENABLED = false |
const | DEFAULT_PASSWORD_MIN_LENGTH = 8 |
const | DEFAULT_PASSWORD_MAX_LENGTH = 0 |
const | DEFAULT_PASSWORD_MAX_AGE = 90 |
const | DEFAULT_LOGIN_MAX_ATTEMPTS = 5 |
const | DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED = false |
const | DEFAULT_PREVENT_SIMULTANEOUS_LOGINS = false |
Static Public Attributes | |
static | $SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS = 1 |
static | $SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE = 2 |
static | $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE = 3 |
Private Member Functions | |
__construct () | |
Private constructor: use _getInstance() More... | |
read () | |
read settings More... | |
Private Attributes | |
$db | |
$settings | |
$https_enable | |
$password_chars_and_numbers_enabled = self::DEFAULT_PASSWORD_CHARS_AND_NUMBERS_ENABLED | |
$password_special_chars_enabled = self::DEFAULT_PASSWORD_SPECIAL_CHARS_ENABLED | |
$password_min_length = self::DEFAULT_PASSWORD_MIN_LENGTH | |
$password_max_length = self::DEFAULT_PASSWORD_MAX_LENGTH | |
$password_max_age = self::DEFAULT_PASSWORD_MAX_AGE | |
$password_ucase_chars_num = 0 | |
$password_lcase_chars_num = 0 | |
$login_max_attempts = self::DEFAULT_LOGIN_MAX_ATTEMPTS | |
$password_must_not_contain_loginname = false | |
$password_change_on_first_login_enabled = self::DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED | |
$prevent_simultaneous_logins = self::DEFAULT_PREVENT_SIMULTANEOUS_LOGINS | |
$protect_admin_role = false | |
Static Private Attributes | |
static | $instance = null |
Singleton class that stores all security settings.
/
Definition at line 34 of file class.ilSecuritySettings.php.
|
private |
Private constructor: use _getInstance()
private
Definition at line 87 of file class.ilSecuritySettings.php.
References $DIC, $ilDB, $ilSetting, read(), and settings().
|
static |
Get instance of ilSecuritySettings.
Definition at line 107 of file class.ilSecuritySettings.php.
Referenced by ilObjRoleFolderGUI\addToExternalSettingsForm(), ilObjSystemFolderGUI\addToExternalSettingsForm(), ilObjUserFolderGUI\addToExternalSettingsForm(), ilAuthFrontend\checkExceededLoginAttempts(), ilAuthBase\failedLoginObserver(), ilObjUserFolderGUI\generalSettingsObject(), ilUtil\generatePasswords(), ilUtil\getPasswordRequirementsInfo(), ilAuthFrontend\handleAuthenticationFail(), ilAuthFrontend\handleAuthenticationSuccess(), ilObjSystemFolderGUI\initHTTPSForm(), ilObjRoleFolderGUI\initSettingsForm(), ilUtil\isPassword(), ilObjUser\isPasswordChangeDemanded(), ilObjUser\isPasswordExpired(), ilUtil\isPasswordValidForUserContext(), ilAuthBase\loginObserver(), ilObjUserGUI\roleassignmentObject(), ilObjUserFolderGUI\saveGeneralSettingsObject(), ilObjSystemFolderGUI\saveHTTPSObject(), ilObjRoleFolderGUI\saveSettingsObject(), ilObjPrivacySecurityGUI\showSecurity(), and ilObjRoleGUI\userassignmentObject().
ilSecuritySettings::checkAdminRoleAccessible | ( | $a_usr_id | ) |
Check if the administrator role is accessible for a specific user.
int | $a_usr_id |
Definition at line 314 of file class.ilSecuritySettings.php.
References $DIC, and isAdminRoleProtected().
ilSecuritySettings::getLoginMaxAttempts | ( | ) |
get the maximum count of login attempts
Definition at line 243 of file class.ilSecuritySettings.php.
References $login_max_attempts.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordMaxAge | ( | ) |
get the maximum password age
Definition at line 223 of file class.ilSecuritySettings.php.
References $password_max_age.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordMaxLength | ( | ) |
get the maximum length for passwords
Definition at line 203 of file class.ilSecuritySettings.php.
References $password_max_length.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordMinLength | ( | ) |
get the minimum length for passwords
Definition at line 183 of file class.ilSecuritySettings.php.
References $password_min_length.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordMustNotContainLoginnameStatus | ( | ) |
Return whether the password must not contain the loginname or not.
boolean |
Definition at line 585 of file class.ilSecuritySettings.php.
References $password_must_not_contain_loginname.
Referenced by save().
ilSecuritySettings::getPasswordNumberOfLowercaseChars | ( | ) |
Returns number of lowercase characters required.
Definition at line 567 of file class.ilSecuritySettings.php.
References $password_lcase_chars_num.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordNumberOfUppercaseChars | ( | ) |
Returns number of uppercase characters required.
Definition at line 549 of file class.ilSecuritySettings.php.
References $password_ucase_chars_num.
Referenced by save(), and validate().
ilSecuritySettings::getSecuritySettingsRefId | ( | ) |
Definition at line 115 of file class.ilSecuritySettings.php.
ilSecuritySettings::isAdminRoleProtected | ( | ) |
Check if admin role is protected.
Definition at line 296 of file class.ilSecuritySettings.php.
References $protect_admin_role.
Referenced by checkAdminRoleAccessible(), and save().
ilSecuritySettings::isHTTPSEnabled | ( | ) |
read access to https enabled property
Definition at line 263 of file class.ilSecuritySettings.php.
References $https_enable.
Referenced by save(), and validate().
ilSecuritySettings::isPasswordChangeOnFirstLoginEnabled | ( | ) |
get boolean if the passwords have to be changed by users on first login
Definition at line 287 of file class.ilSecuritySettings.php.
References $password_change_on_first_login_enabled.
Referenced by save().
ilSecuritySettings::isPasswordCharsAndNumbersEnabled | ( | ) |
get boolean if the passwords have to contain characters and numbers
Definition at line 139 of file class.ilSecuritySettings.php.
References $password_chars_and_numbers_enabled.
Referenced by save(), and validate().
ilSecuritySettings::isPasswordSpecialCharsEnabled | ( | ) |
get boolean if the passwords have to contain special characters
Definition at line 163 of file class.ilSecuritySettings.php.
References $password_special_chars_enabled.
Referenced by save(), and validate().
ilSecuritySettings::isPreventionOfSimultaneousLoginsEnabled | ( | ) |
Prevention of simultaneous logins with the same account.
Definition at line 521 of file class.ilSecuritySettings.php.
References $prevent_simultaneous_logins.
Referenced by save().
ilSecuritySettings::protectedAdminRole | ( | $a_stat | ) |
Set admin role protection status.
type | $a_stat |
Definition at line 305 of file class.ilSecuritySettings.php.
|
private |
read settings
private
Definition at line 359 of file class.ilSecuritySettings.php.
References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_ASSOC, and settings().
Referenced by __construct().
ilSecuritySettings::save | ( | ) |
Save settings.
Definition at line 334 of file class.ilSecuritySettings.php.
References getLoginMaxAttempts(), getPasswordMaxAge(), getPasswordMaxLength(), getPasswordMinLength(), getPasswordMustNotContainLoginnameStatus(), getPasswordNumberOfLowercaseChars(), getPasswordNumberOfUppercaseChars(), isAdminRoleProtected(), isHTTPSEnabled(), isPasswordChangeOnFirstLoginEnabled(), isPasswordCharsAndNumbersEnabled(), isPasswordSpecialCharsEnabled(), isPreventionOfSimultaneousLoginsEnabled(), and settings().
ilSecuritySettings::setHTTPSEnabled | ( | $value | ) |
Enable https for certain scripts.
boolean | $value |
Definition at line 253 of file class.ilSecuritySettings.php.
ilSecuritySettings::setLoginMaxAttempts | ( | $a_login_max_attempts | ) |
set the maximum count of login attempts
integer | $a_login_max_attempts |
Definition at line 233 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordChangeOnFirstLoginEnabled | ( | $a_password_change_on_first_login_enabled | ) |
set if the passwords have to be changed by users on first login
boolean | $a_password_change_on_first_login_enabled |
Definition at line 275 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordCharsAndNumbersEnabled | ( | $a_chars_and_numbers_enabled | ) |
set if the passwords have to contain characters and numbers
boolean | $a_chars_and_numbers_enabled |
Definition at line 127 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMaxAge | ( | $a_password_max_age | ) |
set the maximum password age
integer | $a_password_max_age |
Definition at line 213 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMaxLength | ( | $a_password_max_length | ) |
set the maximum length for passwords
integer | $a_password_max_length |
Definition at line 193 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMinLength | ( | $a_password_min_length | ) |
set the minimum length for passwords
integer | $a_password_min_length |
Definition at line 173 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMustNotContainLoginnameStatus | ( | $status | ) |
Set whether the password must not contain the loginname or not.
boolean |
Definition at line 576 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordNumberOfLowercaseChars | ( | $password_lcase_chars_num | ) |
Set number of lowercase characters required.
integer |
Definition at line 558 of file class.ilSecuritySettings.php.
References $password_lcase_chars_num.
ilSecuritySettings::setPasswordNumberOfUppercaseChars | ( | $password_ucase_chars_num | ) |
Set number of uppercase characters required.
integer |
Definition at line 540 of file class.ilSecuritySettings.php.
References $password_ucase_chars_num.
ilSecuritySettings::setPasswordSpecialCharsEnabled | ( | $a_password_special_chars_enabled | ) |
set if the passwords have to contain special characters
boolean | $a_password_special_chars_enabled |
Definition at line 151 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPreventionOfSimultaneousLogins | ( | $value | ) |
Enable/Disable prevention of simultaneous logins with the same account.
boolean | $value |
Definition at line 531 of file class.ilSecuritySettings.php.
ilSecuritySettings::validate | ( | ilPropertyFormGUI | $a_form = null | ) |
validate settings
Definition at line 397 of file class.ilSecuritySettings.php.
References $code, $password_min_length, $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE, ilHTTPS\_checkHTTPS(), ilObjPrivacySecurityGUI\getErrorMessage(), getLoginMaxAttempts(), getPasswordMaxAge(), getPasswordMaxLength(), getPasswordMinLength(), getPasswordNumberOfLowercaseChars(), getPasswordNumberOfUppercaseChars(), isHTTPSEnabled(), isPasswordCharsAndNumbersEnabled(), and isPasswordSpecialCharsEnabled().
|
private |
Definition at line 50 of file class.ilSecuritySettings.php.
|
private |
Definition at line 53 of file class.ilSecuritySettings.php.
Referenced by isHTTPSEnabled().
|
staticprivate |
Definition at line 49 of file class.ilSecuritySettings.php.
|
private |
Definition at line 72 of file class.ilSecuritySettings.php.
Referenced by getLoginMaxAttempts().
|
private |
Definition at line 75 of file class.ilSecuritySettings.php.
Referenced by isPasswordChangeOnFirstLoginEnabled().
|
private |
Definition at line 65 of file class.ilSecuritySettings.php.
Referenced by isPasswordCharsAndNumbersEnabled().
|
private |
Definition at line 71 of file class.ilSecuritySettings.php.
Referenced by getPasswordNumberOfLowercaseChars(), and setPasswordNumberOfLowercaseChars().
|
private |
Definition at line 69 of file class.ilSecuritySettings.php.
Referenced by getPasswordMaxAge().
|
private |
Definition at line 68 of file class.ilSecuritySettings.php.
Referenced by getPasswordMaxLength().
|
private |
Definition at line 67 of file class.ilSecuritySettings.php.
Referenced by getPasswordMinLength(), and validate().
|
private |
Definition at line 73 of file class.ilSecuritySettings.php.
Referenced by getPasswordMustNotContainLoginnameStatus().
|
private |
Definition at line 66 of file class.ilSecuritySettings.php.
Referenced by isPasswordSpecialCharsEnabled().
|
private |
Definition at line 70 of file class.ilSecuritySettings.php.
Referenced by getPasswordNumberOfUppercaseChars(), and setPasswordNumberOfUppercaseChars().
|
private |
Definition at line 76 of file class.ilSecuritySettings.php.
Referenced by isPreventionOfSimultaneousLoginsEnabled().
|
private |
Definition at line 78 of file class.ilSecuritySettings.php.
Referenced by isAdminRoleProtected().
|
static |
Definition at line 36 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
|
static |
Definition at line 37 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
|
static |
Definition at line 38 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages(), and validate().
|
private |
Definition at line 51 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_LOGIN_MAX_ATTEMPTS = 5 |
Definition at line 60 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED = false |
Definition at line 62 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_CHARS_AND_NUMBERS_ENABLED = true |
Definition at line 55 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MAX_AGE = 90 |
Definition at line 59 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MAX_LENGTH = 0 |
Definition at line 58 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MIN_LENGTH = 8 |
Definition at line 57 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_SPECIAL_CHARS_ENABLED = false |
Definition at line 56 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PREVENT_SIMULTANEOUS_LOGINS = false |
Definition at line 63 of file class.ilSecuritySettings.php.
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS = 7 |
Definition at line 43 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE = 6 |
Definition at line 42 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH = 5 |
Definition at line 41 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH = 4 |
Definition at line 40 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH = 10 |
Definition at line 47 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1 = 11 |
Definition at line 44 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2 = 8 |
Definition at line 45 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3 = 9 |
Definition at line 46 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().