From 61738782c0ad8894c29e66ace9ae3944dc46e2ee Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 4 Jun 2020 01:18:24 -0400 Subject: [PATCH] fix #1107 --- conventional.yaml | 15 +++++++ docs/MANUAL.md | 32 ++++++++++++++ irc/accounts.go | 97 ++++++++++++++++++++++++++++++----------- irc/authscript.go | 109 ++++++++++++++++++++++++++++++++++++++++++++++ irc/config.go | 10 +++++ irc/errors.go | 1 + oragono.yaml | 15 +++++++ 7 files changed, 253 insertions(+), 26 deletions(-) create mode 100644 irc/authscript.go diff --git a/conventional.yaml b/conventional.yaml index fe3e5bbb..bbb631d0 100644 --- a/conventional.yaml +++ b/conventional.yaml @@ -491,6 +491,21 @@ accounts: # attributes: # member-of: "memberOf" + # pluggable authentication mechanism, via subprocess invocation + # see the manual for details on how to write an authentication plugin script + auth-script: + enabled: false + command: "/usr/local/bin/authenticate-irc-user" + # constant list of args to pass to the command; the actual authentication + # data is transmitted over stdin/stdout: + args: [] + # should we automatically create users if the plugin returns success? + autocreate: true + # timeout for process execution, after which we send a SIGTERM: + timeout: 9s + # how long after the SIGTERM before we follow up with a SIGKILL: + kill-timeout: 1s + # channel options channels: # modes that are set when new channels are created diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 9adad8db..17682274 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -47,6 +47,7 @@ _Copyright © Daniel Oaks , Shivaram Lingamneni