Calibre-Web Integration with Authentik

Calibre-Web Integration with Authentik
Photo by Undine Tackmann / Unsplash

With my success yesterday integrating Tandoor Recipes with Authentik I want to keep the ball rolling and decide to see if I can get Calibre-Web integrated. A quick good search brought me upon Calibre-Web's documentation about LDAP Login. It starts by mentioning some additional packages and dependencies to do so. Then it dives right into "After a reboot". What was changing before the reboot? The installation of the packages and dependencies? So Calibre-Web's documentation seems a little confusing to me. Do I just install python-ldap and the go into the gui? That seems like what it is saying, but I don't feel 100% confident with this, and I don't feel like spinning up a test environment to test with. So instead I think I'll just take a checkpoint of CALIBRE-01 so I can roll it back if I mess things up.

Steps performed on CALIBRE-01

  • sudo apt update
    • 20 packages can be upgraded
  • sudo apt upgrade -y

Steps performed on HV-03 via Windows Admin Center

  • Navigate to Virtual Machiens
  • Select CALIBRE-01
  • Created a checkpoint

Steps performed on CALIBRE-01

  • sudo apt install build-essential
    • build-essential is already the newest version (12.9ubuntu3)
  • sudo apt install python3-dev
    • python3-dev is already the newest version (3.10.6-1~22.04)
  • sudo apt install libldap2-dev
  • sudo apt install libsas12-dev
    • Error: Unable to locate package libsas12-dev

Typo, let's fix it.

  • sudo apt install libsasl2-dev
  • sudo apt install slapd
  • sduo apt install ldap-utils
    • ldap-utils is already the newest version (2.5.16+dfsg-0ubuntu0.22.04.2)
  • sudo apt install tox
  • sudo apt install lcov
  • sudo apt install valgrind
  • sudo python -m pip install python-ldap
    • Command 'python' not found did you mean:
  • sudo python3 -m pip install python-ldap

So I have everything installed now, I guess the next step would be a reboot?

  • sudo reboot

Steps taken from Authentik Security

  • Click on Admin Interface
  • Click on the Appilcations header
  • Click on Providers
  • Click on Create
    • I select LDAP Provier
    • I click Next
    • Name: Calibre-Web-LDAP
    • Bind Flow: default-authentication-flow (Welcome to Authentik!)
    • Bind mode: Cached Binding
    • Search mode: Cached Querying
    • Base DN: DC=ldap,DC=goauthentik,DC=io
    • Certificate: authentik Self-Signed Certificate
    • Click on Finish
  • Navigate to Applications
  • Click on Create
    • Name: Calibre-Web
    • Slug: calibre-web
    • Provider: Calibre-Web-LDAP
    • I click on Create

Steps performed on Calibre-Web

Well the documentation says I should not see Flask_SimpleLDAP in the about page, which I don't....but I do see python-ldap. Hopefully the documentation is just out of date and not updated to the new package?

  • I click on Admin
  • I click on Edit Basic Configuration
  • I click on Feature Configuration

Well there is no new Login Type option that has appeared in this menu. Do I need to install Flask_SimpleLDAP as well? Looks like that command would be:

Steps performed on CALIBRE-01

  • sudo python3 -m pip install flask-simpleldap
    • Successfully installed flask-simpleldap-1.4.0
  • sudo reboot

Steps performed on Calibre-Web

Well now I do have Flask_SimpleLDAP on the about page. That's one step closer right?

  • I click on Admin
  • I click on Edit Basic Configuration
  • I click on Feature Configuration

I do now have the Login Type option. Yes! I've run out of time for today so I'm going to stop here before going any further with putting in the ldap settings.