Sign inSign up

gabe565/self-service-password

By gabe565

Updated almost 8 years ago

An alpine based image to run self-service-password to allow a user to reset their LDAP password.

Image
0

386

gabe565/self-service-password repository overview

gabe565/self-service-password

An alpine-based docker image to run php-fpm with self-service-password.

Quick Start

Run the self-service-password image:

docker run --name self-service-password --detach gabe565/self-service-password

You will not be able to access this image from the host machine without special setup since this image is a light php-fpm image. A webserver will need to be running to pass HTTP calls to php-fpm.

Running with docker-compose

The provided docker-compose file is setup with some environment variables in-place and an nginx reverse-proxy setup.

To run this image

  1. Download docker-compose.yml and nginx.conf into an empty directory.

  2. Change any environment variables that need to be personalized.

  3. Run the following command to start the app image and the reverse-proxy.

    docker-compose up -d
    

The container should now be bound to the host machine at port 8080

Environment

Most of the original self-service-password options can be changed through (all-uppercase) environment variables to allow for customization.

VariableDescriptionDefault Value
DEBUGEnable debug loggingfalse
LDAP_URLLDAP server urlldap://localhost
LDAP_STARTTLSEnable starttlsfalse
LDAP_BINDDNUser bind DNcn=manager,dc=example,dc=com
LDAP_BINDPWUser bind passwordsecret
LDAP_BASEBase to find users indc=example,dc=com
LDAP_LOGIN_ATTRIBUTELDAP field that corresponds to the "Login" input.uid
LDAP_FULLNAME_ATTRIBUTELDAP field that corresponds to the user's full name.cn
LDAP_FILTERUser filter. Note that the other LDAP_* variables can be resolved here, just type them lowercase as a PHP variable.(&(objectClass=person)($ldap_login_attribute={login}))
AD_MODEIf enabled, unicodePwd will be used as the password field.false
AD_OPTIONS_FORCE_UNLOCKForce unlock an account on password change.false
AD_OPTIONS_FORCE_PWD_CHANGEForce a password change at the next user login.false
AD_OPTIONS_CHANGE_EXPIRED_PASSWORDAllow users to update their password even if it is expired.false
SAMBA_MODEIf enabled, sambaNTpassword and sambaPwdLastSet attributes will be updated along with the usual password field.false
SAMBA_OPTIONS_MIN_AGESets the password minimum age.5
SAMBA_OPTIONS_MAX_AGESets the password maximum age.45
SHADOW_OPTIONS_UPDATE_SHADOWLASTCHANGERequires shadowAccount objectClass. Updates the shadowLastChange attribute.false
SHADOW_OPTION_UPDATE_SHADOWEXPIRERequires shadowAccount objectClass. Updates the shadowExpireDays attribute.false
SHADOW_OPTIONS_SHADOW_EXPIRE_DAYSShadow expiry time. Value of -1 means never expire.-1
HASHThe hashing method to use for userPasswordclear
HASH_OPTIONS_CRYPT_SALT_PREFIXCharacters to prefix to the crypt hash.$6$
HASH_OPTIONS_CRYPT_SALT_LENGTHLength of the salt for the crypt hash.6
PWD_MIN_LENGTHMinimum length.0
PWD_MAX_LENGTHMaximum length.0
PWD_MIN_LOWERMinimum lowercase characters.0
PWD_MIN_UPPERMinimum uppercase characters.0
PWD_MIN_DIGITMinumum digit characters.0
PWD_MIN_SPECIALMinimum special characters.0
PWD_SPECIAL_CHARSDefines characters that are considered special characters.^a-zA-Z0-9
PWD_FORBIDDEN_CHARSDefines characters that are not allowed.
PWD_NO_REUSEDoes not allow the next password to be the same as the current.true
PWD_DIFF_LOGINDo not allow the password to be the same as the login.true
PWD_COMPLEXITYNumber of different class of character required.0
USE_PWNEDPASSWORDSUse the pwnedpasswords API to securely check if the password has been in a leak.false
PWD_SHOW_POLICYShow the policy constraints. One of: always, never, onerror.never
PWD_SHOW_POLICY_POSPosition of the policy constraints message. One of: above, below.above
WHO_CHANGE_PASSWORDWho is allowed to change their password. One of: user, manager.user
USE_CHANGEUse the standard password change form.true
CHANGE_SSHKEYAllow users to change their SSH key.false
CHANGE_SSHKEY_ATTRIBUTEAttribute that corresponds to an SSH key.sshPublicKey
WHO_CHANGE_SSHKEYWho can change their SSH key. One of: user, manager.user
NOTIFY_ON_SSHKEY_CHANGENotify a user on SSH key change. Requires valid mail configuration.false
USE_QUESTIONSEnables question/answer for password reset.true
ANSWER_OBJECTCLASSObject class where the answer is stored.extensibleObject
ANSWER_ATTRIBUTEAttribute that stores a users' answer.info
CRYPT_ANSWERSEnables encryption on user answers.true
USE_TOKENSEnables email tokens for password reset.true
CRYPT_TOKENSEnables encryption on user tokens.true
TOKEN_LIFETIMEAmount of time before a token expires.3600
MAIL_ATTRIBUTEAttribute that stores user email addresses.mail
MAIL_ADDRESS_USE_LDAPGet the first mail address from LDAP and hide mail input field.false
MAIL_FROMSender email address.[email protected]
MAIL_FROM_NAMESender name.Self Service Password
MAIL_SIGNATURESender signature.
NOTIFY_ON_CHANGESend an email on password change.false
MAIL_PROTOCOLProtocol to send mail over.smtp
MAIL_SMTP_DEBUGEnables debug logging on email send.false
MAIL_SMTP_HOSTSMTP server's hostname/IP address.localhost
MAIL_SMTP_AUTHSend username/password with SMTP.false
MAIL_SMTP_USERSMTP username.
MAIL_SMTP_PASSSMTP password.
MAIL_SMTP_PORTSMTP port.25
MAIL_SMTP_TIMEOUTSMTP timeout in seconds.30
MAIL_SMTP_KEEPALIVESMTP keepalive.false
MAIL_SMTP_SECURESMTP secure communication.tls
MAIL_SMTP_AUTOTLSSMTP autotlstrue
MAIL_CONTENTTYPEContent-Type header to send with emails.text/plain
MAIL_WORDWRAPMail word-wrap.

Tag summary

Content type

Image

Digest

Size

33.3 MB

Last updated

almost 8 years ago

docker pull gabe565/self-service-password