mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3267] [Feature Request] server plugin op for HTTP CONNECT authentication? #2618
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2618
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 @lindi2 on GitHub (Jan 23, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3267
Describe the feature request
Background
I'm trying to create a system where embedded devices can expose their SSH service for technicians even when they are behind NAT. It is very important that each device can only register as "device-XYZ" where XYZ is the serial number of the device. It seems I can implement this easily by creating a plugin that handles the "NewProxy" op (or by using the existing fp-multiuser and frp_plugin_allowed_ports plugins).
Feature request
I would like to restrict each technician so that they can access only devices that they are maintaining. Would it be possible to create a new proxy op for handling the HTTP CONNECT in tcpmux?
Here's my current test setup:
Command used to access a device:
ssh -o 'proxycommand socat - PROXY:10.5.5.28:device-123-domain:443,proxyport=5002,proxyauth=technician-1:technician-1-password' device-123Describe alternatives you've considered
The first alternative that I thought was to run an HTTP reverse proxy in front of frp and handle the authentication there.
I am not very familiar with the frp code base yet to understand what would be the best way to implement this feature.
Affected area
@fatedier commented on GitHub (Jan 29, 2023):
Maybe we can support httpconnect auth directly
WDYT?
@lindi2 commented on GitHub (Jan 29, 2023):
Would that mean that all technicians accessing "proxy1" would be using the same password? Ideally each technician would authenticate using their own password and only the "frps" would see that password. The "frpc" should not know about the passwords of technicians.
@fatedier commented on GitHub (Jan 30, 2023):
Combine with
route_by_http_user, you can set unique password for each user.After we support httpconnect auth, you can change the auth password in server plugin.
Example:
If you don't want to set password in frpc, you can omit it and set in your server plugin.
@fatedier commented on GitHub (Jun 30, 2023):
Closed by https://github.com/fatedier/frp/pull/3345