Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for external authentication programs #317

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a-ilin
Copy link

@a-ilin a-ilin commented Jan 10, 2025

Hi! Could you please take a look?

This PR adds a feature of delegation of the authentication process to an external program of user choice. This functionality improves the script usability when then EMail proxy is running on a headless server.

The PR includes a working example of a script implementing the authentication process for Device Authorisation Grant flow by sending the parameters to a gotify server specified by user. The example script can be configured via environment variables or by editing the included config file.

For the communication mechanism between the proxy and the script, the standard input and output streams are being used with the data encoded in JSON format. The stdin/stdout were selected instead of direct program arguments to mitigate possible size limit of the command line argument length for authentication URLs. According to POSIX, the command line argument minimum size is 4096 bytes (xargs --show-limits).

* Add a new program option: --external-auth-program
* Add an example script for external authentication: external-auth-program/gotifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant