mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[PR #1367] [CLOSED] Server: Implement native HTTPS support for the web interface #1283
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#1283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1367
Author: @lyzstrik
Created: 12/20/2025
Status: ❌ Closed
Base:
main← Head:server/native-https📝 Commits (6)
e0bf2c0server: Implement native HTTPS support for the web interfaceaed5ba8Merge branch 'main' into server/native-https83bf3baMerge branch 'main' into server/native-https3b1d3c5refactor(server): migrate to rustls 0.23 and improve TLS handlingbdaf6a3fix(review): address coderabbit review comments (cargo features and1a03924fmt📊 Changes
12 files changed (+474 additions, -205 deletions)
View changed files
📝
Cargo.lock(+132 -50)📝
docs/install.md(+11 -4)📝
lldap_config.docker_template.toml(+10 -0)📝
server/Cargo.toml(+16 -9)📝
server/src/cli.rs(+23 -0)📝
server/src/configuration.rs(+42 -2)📝
server/src/healthcheck.rs(+114 -47)📝
server/src/ldap_server.rs(+12 -49)📝
server/src/main.rs(+8 -3)📝
server/src/mod.rs(+1 -0)📝
server/src/tcp_server.rs(+85 -41)➕
server/src/tls.rs(+20 -0)📄 Description
Fixes #813
Description
This PR implements native HTTPS support for the LLDAP web interface. This allows users to expose the web UI securely without strictly requiring a reverse proxy for basic setups.
Additionally, this PR performs a major modernization of the TLS stack, migrating the entire project to Rustls 0.23 (via
rustls-pki-typesandringprovider).Changes
Dependency Upgrades:
Upgraded
rustlsto v0.23 (was v0.20/v0.21) andtokio-rustlsto v0.26.Upgraded
actix-webto v4.12 to enable therustls-0_23feature.Updated
rustls-pemfileto v2 andwebpki-rootsto v0.26.Introduced
rustls-pki-typesfor modern type handling throughout the codebase.Configuration:
Added
https_optionstoConfigurationand corresponding CLI arguments (--https-enabled,--https-port,--https-cert-file,--https-key-file).Refactoring (DRY & Modernization):
Created a new shared module
server/src/tls.rsto centralize private key and certificate loading usingCertificateDerandPrivateKeyDer.Server Factory: Refactored
tcp_server.rsto use a closure-based factory pattern. This allows building theApponce and binding it either via.tcp()(HTTP) or.rustls_0_23()(HTTPS) without code duplication.LDAP Server: Updated
ldap_server.rsto use the newServerConfig::builder_with_providerAPI from Rustls 0.23.Healthcheck Improvements:
Split
check_apiinto distinctcheck_httpandcheck_httpsfunctions.The
check_httpsfunction now performs strict certificate validation (pinning) against the local certificate file instead of blindly accepting insecure certificates.Updated
main.rsto run LDAP, LDAPS, HTTP, and HTTPS healthchecks in parallel.Documentation:
Edit
lldap_config.docker_template.tomlto enable HTTPS via configuration.Edit
docs/install.mdto enable HTTPS viadocker-compose.yml.Verification
I verified the changes locally using self-signed certificates and a full CA chain.
1. Configuration:
Tested via
lldap_config.toml:Tested via
docker-compose.ymlenv variable:2. Startup Logs:
The server correctly identifies the HTTPS configuration and binds to the correct port using Rustls 0.23:
3. Connectivity:
Tested with
curl --cacert certs/rootCA.crt https://localhost:17174/health4. Healthcheck:
Tested the built-in
lldap healthcheckcommand. It now correctly reports status for all enabled services:Notes
Logs with self-signed certificates: When using a self-signed certificate, if a client (like a browser or curl) connects without trusting the CA, rustls will log a Fatal:
CertificateUnknown error. This is expected behavior with strict TLS.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.