I'd like to have an FTP server on a Unix machine that will be able to query a certain API (probably via HTTP or local shell script) in order to authenticate the client.
It would be enough if there is a server that can handle the scenario below:
- Client connects via FTP to my server
- Client sends the username and password
- Server executes a local script with the given parameter
- (my custom logic inside the script)
- Return a success/failure code/message back to the FTP server
Is there such a server on the market? Or is it possible to customize some of the existing servers to cover the scenario above?
Note 1: I see that vsftpd offers a module for virtual users, but it's not quite clear (to me) how to setup such a module with a custom (eg: HTTP) API
Note 2: There seem to be some ways to build (in C) PAM modules, but I'm hoping for an easier way (that will allow me to configure the authentication mechanism rather than building a C library).
Note 3: In regards to the question being put on hold: please note that this question focuses mainly on a means through which FTP authentication can be achieved using a custom protocol/API. I'm not looking for a specific product, but I'm trying to solve a specific problem. Obviously, a product is needed to implement such a solution since we're dealing with a FTP server.