Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce basic LDAP authentication. #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fraggerfox
Copy link
Contributor

@fraggerfox fraggerfox commented Nov 19, 2024

Introduce basic LDAP authentication.

This PR introduces basic LDAP authentication and the necessary bits to configure it.

LDAP is now provided as a site wide configuration option in the admin panel.
image

When this option is enabled.

  • The login attempts are first tried against the configured LDAP instance.
  • On failure against LDAP, it will attempt to authenticate with the local user.
  • On Success it will update the local user's password with the one that was successfully authenticated against LDAP.

The configuration details are shown at the bottom on the configuration section of admin panel.
image

LDAP authentication and local account password sync (Successful login)
image

Failed LDAP and local authentication (Failed login)
image

Local authentication when LDAP is unavailable (Successful login)
image

Local authentication if the user is not present in LDAP (Successful login)
image

Partially Addresses #77, the changes were implemented based on a LDAP set up I use in my personal infrastructure. So not all configuration options may be present in this implementation.

The LDAP implementation is done using https://github.com/go-ldap/ldap

@fraggerfox fraggerfox force-pushed the introduce-ldap-authentication branch 2 times, most recently from 1385f21 to db76bae Compare November 19, 2024 06:53
@fraggerfox fraggerfox marked this pull request as ready for review November 20, 2024 08:55
@fraggerfox fraggerfox force-pushed the introduce-ldap-authentication branch 6 times, most recently from 4f7c36e to ab88b33 Compare November 26, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant