ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
Singleton class that stores all security settings. More...
Public Member Functions | |
setPasswordCharsAndNumbersEnabled (bool $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 (bool $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 (int $a_password_min_length) | |
set the minimum length for passwords More... | |
getPasswordMinLength () | |
get the minimum length for passwords More... | |
setPasswordMaxLength (int $a_password_max_length) | |
set the maximum length for passwords More... | |
getPasswordMaxLength () | |
get the maximum length for passwords More... | |
setPasswordMaxAge (int $a_password_max_age) | |
set the maximum password age More... | |
getPasswordMaxAge () | |
get the maximum password age More... | |
setLoginMaxAttempts (int $a_login_max_attempts) | |
set the maximum count of login attempts More... | |
getLoginMaxAttempts () | |
get the maximum count of login attempts More... | |
setHTTPSEnabled (bool $value) | |
Enable https for certain scripts. More... | |
isHTTPSEnabled () | |
read access to https enabled property More... | |
setPasswordChangeOnFirstLoginEnabled (bool $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 () | |
protectedAdminRole (bool $a_stat) | |
checkAdminRoleAccessible (int $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 (bool $value) | |
Enable/Disable prevention of simultaneous logins with the same account. More... | |
setPasswordNumberOfUppercaseChars (int $password_ucase_chars_num) | |
Set number of uppercase characters required. More... | |
getPasswordNumberOfUppercaseChars () | |
Returns number of uppercase characters required. More... | |
setPasswordNumberOfLowercaseChars (int $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 | MAX_LOGIN_ATTEMPTS = 99 |
const | DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED = false |
const | DEFAULT_PREVENT_SIMULTANEOUS_LOGINS = false |
Static Public Attributes | |
static int | $SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS = 1 |
static int | $SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE = 2 |
static int | $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE = 3 |
Protected Attributes | |
ilHTTPS | $https |
Private Member Functions | |
__construct () | |
Private constructor: use _getInstance() More... | |
read () | |
read settings private More... | |
Private Attributes | |
ilDBInterface | $db |
ilSetting | $settings |
ilRbacReview | $review |
bool | $https_enable |
bool | $password_chars_and_numbers_enabled = self::DEFAULT_PASSWORD_CHARS_AND_NUMBERS_ENABLED |
bool | $password_special_chars_enabled = self::DEFAULT_PASSWORD_SPECIAL_CHARS_ENABLED |
int | $password_min_length = self::DEFAULT_PASSWORD_MIN_LENGTH |
int | $password_max_length = self::DEFAULT_PASSWORD_MAX_LENGTH |
int | $password_max_age = self::DEFAULT_PASSWORD_MAX_AGE |
int | $password_ucase_chars_num = 0 |
int | $password_lcase_chars_num = 0 |
int | $login_max_attempts = self::DEFAULT_LOGIN_MAX_ATTEMPTS |
bool | $password_must_not_contain_loginname = false |
bool | $password_change_on_first_login_enabled = self::DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED |
bool | $prevent_simultaneous_logins = self::DEFAULT_PREVENT_SIMULTANEOUS_LOGINS |
bool | $protect_admin_role = false |
Static Private Attributes | |
static self | $instance = null |
Singleton class that stores all security settings.
Definition at line 27 of file class.ilSecuritySettings.php.
|
private |
Private constructor: use _getInstance()
Definition at line 79 of file class.ilSecuritySettings.php.
References $DIC, read(), and ILIAS\Repository\settings().
|
static |
Get instance of ilSecuritySettings.
Definition at line 96 of file class.ilSecuritySettings.php.
Referenced by ilObjRoleFolderGUI\addToExternalSettingsForm(), ilObjUserFolderGUI\addToExternalSettingsForm(), ilAuthFrontend\checkExceededLoginAttempts(), ilObjUserFolderGUI\generalSettingsObject(), ilSecuritySettingsChecker\generatePasswords(), ilSecuritySettingsChecker\getPasswordRequirementsInfo(), ilAuthFrontend\handleAuthenticationSuccess(), ilAuthFrontend\handleLoginAttempts(), ilObjRoleFolderGUI\initSettingsForm(), ilSecuritySettingsChecker\isPassword(), ilObjUser\isPasswordChangeDemanded(), ilObjUser\isPasswordExpired(), ilSecuritySettingsChecker\isPasswordValidForUserContext(), ilRoleAssignmentTableGUI\parse(), ilObjUserFolderGUI\saveGeneralSettingsObject(), ilObjRoleFolderGUI\saveSettingsObject(), ilObjPrivacySecurityGUI\showSecurity(), and ilObjRoleGUI\userassignmentObject().
ilSecuritySettings::checkAdminRoleAccessible | ( | int | $a_usr_id | ) |
Check if the administrator role is accessible for a specific user.
Definition at line 251 of file class.ilSecuritySettings.php.
References isAdminRoleProtected(), and SYSTEM_ROLE_ID.
ilSecuritySettings::getLoginMaxAttempts | ( | ) |
get the maximum count of login attempts
Definition at line 199 of file class.ilSecuritySettings.php.
References $login_max_attempts.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordMaxAge | ( | ) |
get the maximum password age
Definition at line 183 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 167 of file class.ilSecuritySettings.php.
References $password_max_length.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::getPasswordMinLength | ( | ) |
get the minimum length for passwords
Definition at line 151 of file class.ilSecuritySettings.php.
References $password_min_length.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::getPasswordMustNotContainLoginnameStatus | ( | ) |
Return whether the password must not contain the loginname or not.
Definition at line 523 of file class.ilSecuritySettings.php.
References $password_must_not_contain_loginname.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), and save().
ilSecuritySettings::getPasswordNumberOfLowercaseChars | ( | ) |
Returns number of lowercase characters required.
Definition at line 507 of file class.ilSecuritySettings.php.
References $password_lcase_chars_num.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::getPasswordNumberOfUppercaseChars | ( | ) |
Returns number of uppercase characters required.
Definition at line 491 of file class.ilSecuritySettings.php.
References $password_ucase_chars_num.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::isAdminRoleProtected | ( | ) |
Definition at line 238 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 215 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 233 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 117 of file class.ilSecuritySettings.php.
References $password_chars_and_numbers_enabled.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::isPasswordSpecialCharsEnabled | ( | ) |
get boolean if the passwords have to contain special characters
Definition at line 135 of file class.ilSecuritySettings.php.
References $password_special_chars_enabled.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::isPreventionOfSimultaneousLoginsEnabled | ( | ) |
Prevention of simultaneous logins with the same account.
Definition at line 467 of file class.ilSecuritySettings.php.
References $prevent_simultaneous_logins.
Referenced by save().
ilSecuritySettings::protectedAdminRole | ( | bool | $a_stat | ) |
Definition at line 243 of file class.ilSecuritySettings.php.
|
private |
read settings private
Definition at line 295 of file class.ilSecuritySettings.php.
References $res, ilDBConstants\FETCHMODE_ASSOC, ILIAS\Repository\int(), null, ILIAS\Repository\settings(), and SYSTEM_FOLDER_ID.
Referenced by __construct().
ilSecuritySettings::save | ( | ) |
Save settings.
Definition at line 265 of file class.ilSecuritySettings.php.
References getLoginMaxAttempts(), getPasswordMaxAge(), getPasswordMaxLength(), getPasswordMinLength(), getPasswordMustNotContainLoginnameStatus(), getPasswordNumberOfLowercaseChars(), getPasswordNumberOfUppercaseChars(), isAdminRoleProtected(), isHTTPSEnabled(), isPasswordChangeOnFirstLoginEnabled(), isPasswordCharsAndNumbersEnabled(), isPasswordSpecialCharsEnabled(), isPreventionOfSimultaneousLoginsEnabled(), and ILIAS\Repository\settings().
ilSecuritySettings::setHTTPSEnabled | ( | bool | $value | ) |
Enable https for certain scripts.
Definition at line 207 of file class.ilSecuritySettings.php.
ilSecuritySettings::setLoginMaxAttempts | ( | int | $a_login_max_attempts | ) |
set the maximum count of login attempts
Definition at line 191 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordChangeOnFirstLoginEnabled | ( | bool | $a_password_change_on_first_login_enabled | ) |
set if the passwords have to be changed by users on first login
Definition at line 224 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordCharsAndNumbersEnabled | ( | bool | $a_chars_and_numbers_enabled | ) |
set if the passwords have to contain characters and numbers
Definition at line 108 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMaxAge | ( | int | $a_password_max_age | ) |
set the maximum password age
Definition at line 175 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMaxLength | ( | int | $a_password_max_length | ) |
set the maximum length for passwords
Definition at line 159 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMinLength | ( | int | $a_password_min_length | ) |
set the minimum length for passwords
Definition at line 143 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMustNotContainLoginnameStatus | ( | $status | ) |
Set whether the password must not contain the loginname or not.
Definition at line 515 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordNumberOfLowercaseChars | ( | int | $password_lcase_chars_num | ) |
Set number of lowercase characters required.
Definition at line 499 of file class.ilSecuritySettings.php.
References $password_lcase_chars_num.
ilSecuritySettings::setPasswordNumberOfUppercaseChars | ( | int | $password_ucase_chars_num | ) |
Set number of uppercase characters required.
Definition at line 483 of file class.ilSecuritySettings.php.
References $password_ucase_chars_num.
ilSecuritySettings::setPasswordSpecialCharsEnabled | ( | bool | $a_password_special_chars_enabled | ) |
set if the passwords have to contain special characters
Definition at line 126 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPreventionOfSimultaneousLogins | ( | bool | $value | ) |
Enable/Disable prevention of simultaneous logins with the same account.
Definition at line 475 of file class.ilSecuritySettings.php.
ilSecuritySettings::validate | ( | ?ilPropertyFormGUI | $a_form = null | ) |
validate settings
ilPropertyFormGUI | null | $a_form |
Definition at line 350 of file class.ilSecuritySettings.php.
References $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE, ilObjPrivacySecurityGUI\getErrorMessage(), getLoginMaxAttempts(), getPasswordMaxAge(), getPasswordMaxLength(), getPasswordMinLength(), getPasswordNumberOfLowercaseChars(), getPasswordNumberOfUppercaseChars(), isHTTPSEnabled(), isPasswordCharsAndNumbersEnabled(), isPasswordSpecialCharsEnabled(), and null.
|
private |
Definition at line 43 of file class.ilSecuritySettings.php.
|
protected |
Definition at line 46 of file class.ilSecuritySettings.php.
|
private |
Definition at line 48 of file class.ilSecuritySettings.php.
Referenced by isHTTPSEnabled().
|
staticprivate |
Definition at line 42 of file class.ilSecuritySettings.php.
|
private |
Definition at line 68 of file class.ilSecuritySettings.php.
Referenced by getLoginMaxAttempts().
|
private |
Definition at line 71 of file class.ilSecuritySettings.php.
Referenced by isPasswordChangeOnFirstLoginEnabled().
|
private |
Definition at line 61 of file class.ilSecuritySettings.php.
Referenced by isPasswordCharsAndNumbersEnabled().
|
private |
Definition at line 67 of file class.ilSecuritySettings.php.
Referenced by getPasswordNumberOfLowercaseChars(), and setPasswordNumberOfLowercaseChars().
|
private |
Definition at line 65 of file class.ilSecuritySettings.php.
Referenced by getPasswordMaxAge().
|
private |
Definition at line 64 of file class.ilSecuritySettings.php.
Referenced by getPasswordMaxLength().
|
private |
Definition at line 63 of file class.ilSecuritySettings.php.
Referenced by getPasswordMinLength().
|
private |
Definition at line 69 of file class.ilSecuritySettings.php.
Referenced by getPasswordMustNotContainLoginnameStatus().
|
private |
Definition at line 62 of file class.ilSecuritySettings.php.
Referenced by isPasswordSpecialCharsEnabled().
|
private |
Definition at line 66 of file class.ilSecuritySettings.php.
Referenced by getPasswordNumberOfUppercaseChars(), and setPasswordNumberOfUppercaseChars().
|
private |
Definition at line 72 of file class.ilSecuritySettings.php.
Referenced by isPreventionOfSimultaneousLoginsEnabled().
|
private |
Definition at line 74 of file class.ilSecuritySettings.php.
Referenced by isAdminRoleProtected().
|
private |
Definition at line 45 of file class.ilSecuritySettings.php.
|
static |
Definition at line 29 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
|
static |
Definition at line 30 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
|
static |
Definition at line 31 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages(), and validate().
|
private |
Definition at line 44 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_LOGIN_MAX_ATTEMPTS = 5 |
Definition at line 55 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED = false |
Definition at line 58 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_CHARS_AND_NUMBERS_ENABLED = true |
Definition at line 50 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MAX_AGE = 90 |
Definition at line 54 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MAX_LENGTH = 0 |
Definition at line 53 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MIN_LENGTH = 8 |
Definition at line 52 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_SPECIAL_CHARS_ENABLED = false |
Definition at line 51 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PREVENT_SIMULTANEOUS_LOGINS = false |
Definition at line 59 of file class.ilSecuritySettings.php.
const ilSecuritySettings::MAX_LOGIN_ATTEMPTS = 99 |
Definition at line 56 of file class.ilSecuritySettings.php.
Referenced by ilObjUserFolderGUI\initFormGeneralSettings(), and ILIAS\User\Setup\DBUpdateSteps10\step_4().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS = 7 |
Definition at line 36 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE = 6 |
Definition at line 35 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH = 5 |
Definition at line 34 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH = 4 |
Definition at line 33 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 40 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1 = 11 |
Definition at line 37 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2 = 8 |
Definition at line 38 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3 = 9 |
Definition at line 39 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().