Class SambaduPasswordManagerModule
java.lang.Object
cz.metacentrum.perun.core.impl.modules.pwdmgr.GenericPasswordManagerModule
cz.metacentrum.perun.core.impl.modules.pwdmgr.EinfraPasswordManagerModule
cz.metacentrum.perun.core.impl.modules.pwdmgr.SambaduPasswordManagerModule
- All Implemented Interfaces:
PasswordManagerModule
This module allows us to set alternative password for Samba share services. We do not have logins in du-samba
namespace at all. It uses "einfra" namespace login instead, so this module extends its password manager, disables
normal password management and overrides alternative password management only. It reuses login format and strength
checks from einfra module.
- Author:
- Pavel Zlamal invalid input: '<'zlamal@cesnet.cz>
-
Field Summary
Fields inherited from class cz.metacentrum.perun.core.impl.modules.pwdmgr.EinfraPasswordManagerModule
einfraLoginPattern, einfraPasswordContainsDigit, einfraPasswordContainsLower, einfraPasswordContainsSpec, einfraPasswordContainsUpper, einfraPasswordMinLength
Fields inherited from class cz.metacentrum.perun.core.impl.modules.pwdmgr.GenericPasswordManagerModule
actualLoginNamespace, altPasswordManagerProgram, BIN_TRUE, DEFAULT_LOGIN_PATTERN, LOGIN_EXIST, PASSWORD_CHANGE, PASSWORD_CHECK, PASSWORD_CREATE, PASSWORD_DELETE, PASSWORD_RESERVE, PASSWORD_RESERVE_RANDOM, PASSWORD_VALIDATE, passwordManagerProgram, randomPasswordCharacters, randomPasswordLength, WEAKPASS
Fields inherited from interface cz.metacentrum.perun.core.implApi.modules.pwdmgr.PasswordManagerModule
ALT_PASSWORD_PREFIX, BIRTH_DAY_KEY, BIRTH_NUMBER_KEY, FIRST_NAME_KEY, LAST_NAME_KEY, LOGIN_PREFIX, MAIL_KEY, PASSWORD_KEY, TITLE_AFTER_KEY, TITLE_BEFORE_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changePassword
(PerunSession sess, String userLogin, String newPassword) void
checkPassword
(PerunSession sess, String userLogin, String password) void
createAlternativePassword
(PerunSession sess, User user, String passwordId, String password) void
deleteAlternativePassword
(PerunSession sess, User user, String passwordId) void
deletePassword
(PerunSession sess, String userLogin) generateAccount
(PerunSession session, Map<String, String> parameters) protected void
handleAltPwdManagerExit
(Process process, User user, String loginNamespace, String passwordId) Handle exit codes of samba-du password manager scriptsvoid
reservePassword
(PerunSession session, String userLogin, String password) void
reserveRandomPassword
(PerunSession session, String userLogin) void
validatePassword
(PerunSession sess, String userLogin, User user) Methods inherited from class cz.metacentrum.perun.core.impl.modules.pwdmgr.EinfraPasswordManagerModule
checkLoginFormat, checkPasswordStrength, handleSponsorship, isLoginPermitted
Methods inherited from class cz.metacentrum.perun.core.impl.modules.pwdmgr.GenericPasswordManagerModule
createAltPwdManagerProcess, createPwdManagerProcess, generateRandomPassword, getActualLoginNamespace, handleExit, handleGenericErrorCode, loginExist, sendPassword, setActualLoginNamespace
-
Constructor Details
-
SambaduPasswordManagerModule
public SambaduPasswordManagerModule()
-
-
Method Details
-
changePassword
- Specified by:
changePassword
in interfacePasswordManagerModule
- Overrides:
changePassword
in classGenericPasswordManagerModule
-
checkPassword
- Specified by:
checkPassword
in interfacePasswordManagerModule
- Overrides:
checkPassword
in classGenericPasswordManagerModule
-
createAlternativePassword
public void createAlternativePassword(PerunSession sess, User user, String passwordId, String password) throws PasswordStrengthException - Specified by:
createAlternativePassword
in interfacePasswordManagerModule
- Overrides:
createAlternativePassword
in classEinfraPasswordManagerModule
- Throws:
PasswordStrengthException
-
deleteAlternativePassword
- Specified by:
deleteAlternativePassword
in interfacePasswordManagerModule
- Overrides:
deleteAlternativePassword
in classEinfraPasswordManagerModule
-
deletePassword
- Specified by:
deletePassword
in interfacePasswordManagerModule
- Overrides:
deletePassword
in classGenericPasswordManagerModule
-
generateAccount
- Specified by:
generateAccount
in interfacePasswordManagerModule
- Overrides:
generateAccount
in classGenericPasswordManagerModule
-
handleAltPwdManagerExit
protected void handleAltPwdManagerExit(Process process, User user, String loginNamespace, String passwordId) Handle exit codes of samba-du password manager scripts- Overrides:
handleAltPwdManagerExit
in classGenericPasswordManagerModule
- Parameters:
process
- Running password manager script process.user
- User for which operation was performed.loginNamespace
- Namespace in which operation was performed.passwordId
- ID of alt password entry for which it was performed.
-
reservePassword
- Specified by:
reservePassword
in interfacePasswordManagerModule
- Overrides:
reservePassword
in classGenericPasswordManagerModule
-
reserveRandomPassword
- Specified by:
reserveRandomPassword
in interfacePasswordManagerModule
- Overrides:
reserveRandomPassword
in classEinfraPasswordManagerModule
-
validatePassword
public void validatePassword(PerunSession sess, String userLogin, User user) throws InvalidLoginException - Specified by:
validatePassword
in interfacePasswordManagerModule
- Overrides:
validatePassword
in classEinfraPasswordManagerModule
- Throws:
InvalidLoginException
-