LogoLogo
  • Documentation
  • YouTube Videos
  • Topics
    • Authelia
    • Docker Folders
    • Petio
    • Prowlarr
    • PWM
  • IBRACORP
  • Discord
Powered by GitBook
On this page
  • PWM LDAP Self Service Solution
  • Table of Contents
  • Video Guide
  • Useful Links
  • Unraid Docker Template
  • Installation
  • Configuration
  • Additional Recommendations

Was this helpful?

Export as PDF
  1. Topics

PWM

PreviousProwlarr

Last updated 3 years ago

Was this helpful?

Our Links

IBRACORP - YouTube: GitHub - unRAID Forum - Discord - Twitter -

PWM LDAP Self Service Solution

Table of Contents

Video Guide

Prefer a video guide? Here's the video version of this documentation:

Useful Links

Unraid Docker Template

PWM Sycotix's Repository Tools:Security

Installation

  1. Head to the Community Applications store in Unraid

  2. Search for and click to install 'PWM' from Sycotix's Repository

  3. The template does not need any modifications past the port you want to reach it on, if the default of 8282 is already in use on your system.

  4. Click done and wait for the container to pull down and start.

  5. Open your MariaDB in Adminer (or use CLI if you prefer) and create a database called 'pwm'.

  6. Create a user and password for the new database called 'pwm' - and grant it all privileges.

  7. In your FreeIPA server, ensure you have a test user account. It does not require any special privileges and should be a normal user. \

    **Tip: Default behaviour in FreeIPA means that when an admin user sets or resets a users password, it will automatically expire immediately. \

    Sign in to FreeIPA as that user to ensure the proper password is in place. Check the expiration date of the password to be sure it's valid.**

  8. With all the above done we are now prepared for configuration.

Configuration

Docker

  1. Left-click the PWM container and open the WebUI \

  2. Once you see the WebUI, click Next to begin the Configuration

  3. Select the 'Manual Configuration' option

  4. Set a Configuration Password. This will be required any time you wish to edit the config of PWM.

  5. Now, you can configure all the below settings. \

    WARNING: YOU MUST CHANGE VALUES WHICH ARE SPECIFIC TO YOUR ENVIRONMENT. i.e. Base Domain, IP addresses and Ports.

Default Settings ⇨ LDAP Vendor Default Settings
OPEN_LDAP

Default Settings ⇨ Storage Default Settings
DB

LDAP ⇨ LDAP Directories ⇨ default ⇨ Connection ⇨ LDAP Contextless Login Roots
cn=users,cn=accounts,dc=domain,dc=com

LDAP ⇨ LDAP Directories ⇨ default ⇨ Connection ⇨ LDAP Proxy Password** (your FreeIPA admin password)
*hidden*

LDAP ⇨ LDAP Directories ⇨ default ⇨ Connection ⇨ LDAP Proxy User
uid=admin,cn=users,cn=accounts,dc=domain,dc=com

LDAP ⇨ LDAP Directories ⇨ default ⇨ Connection ⇨ LDAP Test User
uid=test,cn=users,cn=accounts,dc=domain,dc=com

LDAP ⇨ LDAP Directories ⇨ default ⇨ Connection ⇨ LDAP URLs (your FreeIPA server IP and non-SSL port, default 389)
ldap://192.168.1.150:389

LDAP ⇨ LDAP Directories ⇨ default ⇨ Login Setup ⇨ User Name Search Filter
(&(objectClass=posixAccount)(uid=%USERNAME%))

LDAP ⇨ LDAP Directories ⇨ default ⇨ User Attributes ⇨ Attribute to use for User Name
uid

LDAP ⇨ LDAP Directories ⇨ default ⇨ User Attributes ⇨ LDAP GUID Attribute
ipauniqueid

LDAP ⇨ LDAP Directories ⇨ default ⇨ User Attributes ⇨ LDAP Naming Attribute
uid

LDAP ⇨ LDAP Settings ⇨ Global ⇨ User Object Class
posixAccount

Modules ⇨ Authenticated ⇨ Administration ⇨ Administrator Permission
UserPermission-ldapGroup: [Profile:default Base:cn=admins,cn=groups,cn=accounts,dc=domain,dc=com]

Modules ⇨ Authenticated ⇨ Change Password ⇨ Profiles ⇨ default ⇨ Require Current Password During Change
NOTEXPIRED

Modules ⇨ Authenticated ⇨ Guest Registration ⇨ Creation Context
cn=ipausers,cn=groups,cn=accounts,dc=domain,dc=com

Setting ⇨ Settings ⇨ Application ⇨ Application ⇨ Home URL
https://portal.domain.com/private

Setting ⇨ Settings ⇨ Application ⇨ Application ⇨ Idle Timeout Seconds
600

Setting ⇨ Settings ⇨ Application ⇨ Application ⇨ Logout URL
https://portal.domain.com/private

Setting ⇨ Settings ⇨ Application ⇨ Application ⇨ Site URL
https://portal.domain.com/

Setting ⇨ Settings ⇨ Database (Remote) ⇨ Connection ⇨ Database Class
com.mysql.jdbc.Driver

Setting ⇨ Settings ⇨ Database (Remote) ⇨ Connection ⇨ Database Connection String (your MariaDB IP and Port)
jdbc:mysql://192.168.1.100:3306/pwm?useTimezone=true&serverTimezone=UTC

Setting ⇨ Settings ⇨ Database (Remote) ⇨ Connection ⇨ Database Driver
LOAD THE MYSQL JAVA package you downloaded in the Configuration steps.

Setting ⇨ Settings ⇨ Database (Remote) ⇨ Connection ⇨ Database Password
*hidden*

Setting ⇨ Settings ⇨ Database (Remote) ⇨ Connection ⇨ Database User Name
pwm

Setting ⇨ Settings ⇨ Database (Remote) ⇨ Connection ⇨ Database Vendor
DB_OTHER
  1. With all the above configured, you have the minimum required to connect to your FreeIPA LDAP and use it for authentication.

  2. Select Save in the very top-right of the Configuration Editor.

  3. Once it sends you back to the login screen, select Configuration Manager.

  4. Check that everything looks okay, it should look like this:

  5. If it all looks clear, head to your home page and try to sign in with your FreeIPA admin account. This will allow you to check that authentication is working.

  6. Once you sign in using an authenticated account successfully, you must now take PWM out of Configuration Mode.

  7. Head to the Configuration Manager and select Restrict Configuration.

  8. Profit.

Additional Recommendations

You may also need to try the following settings to resolve common problems:

Setting ⇨ Policies ⇨ Password Policies ⇨ default ⇨ Disallowed Attributes
uid givenName sn
Setting ⇨ Policies ⇨ Password Policies ⇨ default ⇨ Minimum Alphabetic
1
Setting ⇨ Policies ⇨ Password Policies ⇨ default ⇨ Minimum Length
8
Setting ⇨ Policies ⇨ Password Policies ⇨ default ⇨ Minimum Lowercase
1
Setting ⇨ Policies ⇨ Password Policies ⇨ default ⇨ Minimum Numeric
1
Setting ⇨ Policies ⇨ Password Policies ⇨ default ⇨ Minimum Uppercase
1
Setting ⇨ Settings ⇨ Password Settings ⇨ Password Policy Source
PWM (aka Local)
Setting ⇨ Settings ⇨ Security ⇨ Web Security ⇨ Enable Form Nonce
False
Setting ⇨ Settings ⇨ Security ⇨ Web Security ⇨ Use X-Forwarded-For Header
False

PWM: MySQL Connector (select version 5.1.49 - Platform Independent):

Ensure you have MariaDB installed and operational. We recommend using Adminer to manage your MariaDB. Click to see how.

Download the MySQL/Java connector package from the section above.

Tip: if you receive constant redirects, in the address bar, remove everything past the port so it looks like this: (where SERVERIP is your server which PWM is running on)

Now that you have the basics set up, you can successfully use PWM to authenticate users and process user management. However, some addition config is recommended at your own discretion in the Configuration Editor. 1. Set up your SMTP setting to allow emails to work 2. Set up your reverse proxy and DNS entries to allow the address to work externally 3. Set up your password policies 4. There's plenty more PWM can do (over 400 settings). So take your time and enjoy the process.

https://github.com/pwm-project/pwm
https://downloads.mysql.com/archives/c-j/
here
http://SERVERIP:8282
https://portal.domain.com
Video Guide
Useful Links
Unraid Docker Template
Installation
Configuration
Docker
Additional Recommendations
Useful Links
https://ibracorp.io
https://youtube.com/c/IBRACORP
https://github.com/ibracorp
http://bit.ly/2MwDPTV
https://discord.gg/VWAG7rZ
https://twitter.com/IBRACORP_IO
PWM: Install & Configure LDAP Self Service Solution