mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-02 22:46:56 -05:00
[Enhancement]: User access control based on subnet #826
Labels
No labels
authentication
awaiting release
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/audiobookshelf#826
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 @cassieesposito on GitHub (Dec 14, 2022).
Describe the feature/enhancement
Allow/deny access to particular users based on the IP/subnet they're connecting from.
There are several use cases for this:
@advplyr commented on GitHub (Mar 22, 2023):
I think this is something the end-user would configure on their server and out of the scope of Abs. I may be misunderstanding though what you are requesting. Do you have an example project that does this?
@cassieesposito commented on GitHub (Mar 23, 2023):
An example of a project that does this is Jellyfin. If you go in to the Networking settings, there is a setting for LAN networks where you can define a comma separated list of IP addresses or subnets. Once you've done that, each user account has a checkbox setting for "Allow remote connections to this server"
I haven't actually looked in to the details of how this is implemented, but the approach that seems obvious to me and will (I hope) more clearly define the behavior I'm describing is as follows.
If LAN networks is defined, upon an authentication attempt, Jellyfin checks whether the user account allows remote connections. If it does not, Jellyfin checks whether the originating IP address is included in Lan networks. If it is not, the authentication request is rejected without ever making a password challenge attempt.
This has at least two use cases, possibly more:
Configuring this outside of ABS would be a significantly more difficult and fragile process. One possible approach would be to set up an intermediate layer of user authentication at the reverse proxy level. You would have to set the credentials to match the ABS credentials. Upon a successful login attempt to the the intermediate layer, it would forward the credentials to ABS.
In conclusion, this would be dramatically more work than handling this within ABS and would produce a significantly worse product.
@advplyr commented on GitHub (Apr 30, 2023):
I still think this would be better suited for the user to setup once we finish implementing passportjs here https://github.com/advplyr/audiobookshelf/pull/1636
I'm not sure though