mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[GH-ISSUE #1219] Dependency on external HTTP services #433
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#433
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?
Originally created by @selfhoster1312 on GitHub (Jul 17, 2025).
Original GitHub issue: https://github.com/lldap/lldap/issues/1219
I personally find that it's a problem (especially for a critical service managing auth), but even if that's a deliberate choice it should be documented.
From a first look it looks like this is due to:
The main problem problem is that these CDN can be used to inject arbitrary javascript. The secondary problem is that lldap would not work (or not great) without internet access on the client side (LAN setup).
It would be interesting to see in those dependencies what can be served locally, and what can be entirely removed:
If we don't want to change the status quo, it should be mentioned in the docs.
@nitnelave commented on GitHub (Jul 17, 2025):
A couple of comments:
On security: all the JS that is downloaded is checksummed, so there is no risk of arbitrary JS injection.
On darkmode.js: it is part of bootstrap, but not the default.
On making things local by default: external requests can be cached by the client browser and fetched in parallel when not cached, rather than having to download a big chunk of data from a single server, so I don't think it should be the default.
The use case of being able to serve LLDAP without internet access is valid, though a bit unusual, and definitely not the main target of LLDAP. However, you're not the first one to have this concern, and there is a "index_local.html" file that can be used to reference locally-downloaded versions of all the external assets. As mentioned above, it is not and will not be the default. I don't quite remember how to package LLDAP to use that file though. The simplest way would be to use the main docker image and mount a local "static" folder with the right assets (and the index_local.html overwriting the index.html)
@selfhoster1312 commented on GitHub (Jul 17, 2025):
That's good :)
Well right now that is the case that the 3MB wasm blob is the main thing to download. Multiplexing HTTP requests and caching works exactly the same whether we download from JSDelivr or from the LLDAP server. The only differences are:
I think the benefits of selfhosting the assets far outweight the downsides. I also think it's possible to reduce their footprints quite a bit (i'm also looking into reducing the WASM side but not having great success so far). In my case it looks like outside of the WASM blob it's "only" 500KB of CSS/JS/fonts (uncompressed).
I believe imho it's worth taking time to think it through. Making lldap more lightweight and more resilient sounds aligned with the philosophy of the project, and i'd be willing to contribute PRs for that. But of course, if you are sure things should remain this way, my offer to make a PR documenting this still stands.
I will of course let you decide on the course of action 👍
@martadinata666 commented on GitHub (Jul 17, 2025):
I assume this is not docker deployment? afaik, docker already use local method by default long ago? #311 and #310.
@nitnelave commented on GitHub (Jul 17, 2025):
Hmm, I may still be convinced, I don't want to unconditionally say no :)
Another concern is ease of development: any solution put in place should not require much dev effort to change the resources.
I was hoping that bootstrap would be common enough to be in the cache, and that a CDN would have a close enough server otherwise, but for most people LLDAP is localhost or just about, you can't really get much closer. You may have a point there. But really, at this point we're splitting hairs, time to first render is not going to make a difference to any LLDAP use, I'd wager. So as long as the development process doesn't get more complicated, feel free to send PRs to make index_local the default (and only option).
I'm all for minimizing the size of the assets, and for wasm there are some rust packers that I wanted to try but haven't had time. Any progress in this area is welcome.
@Masgalor commented on GitHub (Jul 17, 2025):
As a small side-note, all the Linux packages I maintain use exclusively
index_local.html.@nitnelave commented on GitHub (Oct 4, 2025):
I'll close this, but feel free to reopen if you have a concrete proposal.