ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 | 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 |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too. If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Singleton class that stores all security settings
Definition at line 24 of file class.ilSecuritySettings.php.
|
private |
Private constructor: use _getInstance()
Definition at line 75 of file class.ilSecuritySettings.php.
References $DIC, read(), and ILIAS\Repository\settings().
|
static |
Get instance of ilSecuritySettings.
Definition at line 92 of file class.ilSecuritySettings.php.
Referenced by ilObjRoleFolderGUI\addToExternalSettingsForm(), ilObjUserFolderGUI\addToExternalSettingsForm(), ilAuthFrontend\checkExceededLoginAttempts(), ilObjUserFolderGUI\generalSettingsObject(), ilSecuritySettingsChecker\generatePasswords(), ilSecuritySettingsChecker\getPasswordRequirementsInfo(), ilAuthFrontend\handleAuthenticationFail(), ilAuthFrontend\handleAuthenticationSuccess(), 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 247 of file class.ilSecuritySettings.php.
References isAdminRoleProtected(), and SYSTEM_ROLE_ID.
ilSecuritySettings::getLoginMaxAttempts | ( | ) |
get the maximum count of login attempts
Definition at line 195 of file class.ilSecuritySettings.php.
References $login_max_attempts.
Referenced by save(), and validate().
ilSecuritySettings::getPasswordMaxAge | ( | ) |
get the maximum password age
Definition at line 179 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 163 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 147 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 519 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 503 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 487 of file class.ilSecuritySettings.php.
References $password_ucase_chars_num.
Referenced by ilObjUserFolderGUI\getPasswordPolicySettingsMap(), save(), and validate().
ilSecuritySettings::isAdminRoleProtected | ( | ) |
Definition at line 234 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 211 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 229 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 113 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 131 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 463 of file class.ilSecuritySettings.php.
References $prevent_simultaneous_logins.
Referenced by save().
ilSecuritySettings::protectedAdminRole | ( | bool | $a_stat | ) |
Definition at line 239 of file class.ilSecuritySettings.php.
|
private |
read settings private
Definition at line 291 of file class.ilSecuritySettings.php.
References $query, $res, ilDBConstants\FETCHMODE_ASSOC, ILIAS\Repository\int(), ILIAS\Repository\settings(), and SYSTEM_FOLDER_ID.
Referenced by __construct().
ilSecuritySettings::save | ( | ) |
Save settings.
Definition at line 261 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 203 of file class.ilSecuritySettings.php.
ilSecuritySettings::setLoginMaxAttempts | ( | int | $a_login_max_attempts | ) |
set the maximum count of login attempts
Definition at line 187 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 220 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 104 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMaxAge | ( | int | $a_password_max_age | ) |
set the maximum password age
Definition at line 171 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMaxLength | ( | int | $a_password_max_length | ) |
set the maximum length for passwords
Definition at line 155 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMinLength | ( | int | $a_password_min_length | ) |
set the minimum length for passwords
Definition at line 139 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordMustNotContainLoginnameStatus | ( | $status | ) |
Set whether the password must not contain the loginname or not.
Definition at line 511 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPasswordNumberOfLowercaseChars | ( | int | $password_lcase_chars_num | ) |
Set number of lowercase characters required.
Definition at line 495 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 479 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 122 of file class.ilSecuritySettings.php.
ilSecuritySettings::setPreventionOfSimultaneousLogins | ( | bool | $value | ) |
Enable/Disable prevention of simultaneous logins with the same account.
Definition at line 471 of file class.ilSecuritySettings.php.
ilSecuritySettings::validate | ( | ilPropertyFormGUI | $a_form = null | ) |
validate settings
ilPropertyFormGUI | null | $a_form |
Definition at line 346 of file class.ilSecuritySettings.php.
References $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE, ilObjPrivacySecurityGUI\getErrorMessage(), getLoginMaxAttempts(), getPasswordMaxAge(), getPasswordMaxLength(), getPasswordMinLength(), getPasswordNumberOfLowercaseChars(), getPasswordNumberOfUppercaseChars(), isHTTPSEnabled(), isPasswordCharsAndNumbersEnabled(), and isPasswordSpecialCharsEnabled().
|
private |
Definition at line 40 of file class.ilSecuritySettings.php.
|
protected |
Definition at line 43 of file class.ilSecuritySettings.php.
|
private |
Definition at line 45 of file class.ilSecuritySettings.php.
Referenced by isHTTPSEnabled().
|
staticprivate |
Definition at line 39 of file class.ilSecuritySettings.php.
|
private |
Definition at line 64 of file class.ilSecuritySettings.php.
Referenced by getLoginMaxAttempts().
|
private |
Definition at line 67 of file class.ilSecuritySettings.php.
Referenced by isPasswordChangeOnFirstLoginEnabled().
|
private |
Definition at line 57 of file class.ilSecuritySettings.php.
Referenced by isPasswordCharsAndNumbersEnabled().
|
private |
Definition at line 63 of file class.ilSecuritySettings.php.
Referenced by getPasswordNumberOfLowercaseChars(), and setPasswordNumberOfLowercaseChars().
|
private |
Definition at line 61 of file class.ilSecuritySettings.php.
Referenced by getPasswordMaxAge().
|
private |
Definition at line 60 of file class.ilSecuritySettings.php.
Referenced by getPasswordMaxLength().
|
private |
Definition at line 59 of file class.ilSecuritySettings.php.
Referenced by getPasswordMinLength().
|
private |
Definition at line 65 of file class.ilSecuritySettings.php.
Referenced by getPasswordMustNotContainLoginnameStatus().
|
private |
Definition at line 58 of file class.ilSecuritySettings.php.
Referenced by isPasswordSpecialCharsEnabled().
|
private |
Definition at line 62 of file class.ilSecuritySettings.php.
Referenced by getPasswordNumberOfUppercaseChars(), and setPasswordNumberOfUppercaseChars().
|
private |
Definition at line 68 of file class.ilSecuritySettings.php.
Referenced by isPreventionOfSimultaneousLoginsEnabled().
|
private |
Definition at line 70 of file class.ilSecuritySettings.php.
Referenced by isAdminRoleProtected().
|
private |
Definition at line 42 of file class.ilSecuritySettings.php.
|
static |
Definition at line 26 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
|
static |
Definition at line 27 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
|
static |
Definition at line 28 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages(), and validate().
|
private |
Definition at line 41 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_LOGIN_MAX_ATTEMPTS = 5 |
Definition at line 52 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_CHANGE_ON_FIRST_LOGIN_ENABLED = false |
Definition at line 54 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_CHARS_AND_NUMBERS_ENABLED = true |
Definition at line 47 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MAX_AGE = 90 |
Definition at line 51 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MAX_LENGTH = 0 |
Definition at line 50 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_MIN_LENGTH = 8 |
Definition at line 49 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PASSWORD_SPECIAL_CHARS_ENABLED = false |
Definition at line 48 of file class.ilSecuritySettings.php.
const ilSecuritySettings::DEFAULT_PREVENT_SIMULTANEOUS_LOGINS = false |
Definition at line 55 of file class.ilSecuritySettings.php.
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS = 7 |
Definition at line 33 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE = 6 |
Definition at line 32 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH = 5 |
Definition at line 31 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH = 4 |
Definition at line 30 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 37 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1 = 11 |
Definition at line 34 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2 = 8 |
Definition at line 35 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().
const ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3 = 9 |
Definition at line 36 of file class.ilSecuritySettings.php.
Referenced by ilObjPrivacySecurityGUI\initErrorMessages().