Skip to content

Commit dd241e4

Browse files
committed
Add Atheme XMLRPC integration for Convos authentication
Enable XMLRPC in Atheme for Convos to authenticate users via NickServ: - Load misc/httpd and transport/xmlrpc modules in Atheme config - Configure httpd on port 8080 with www_root for health checks - Remove netcat health server (conflicted with Atheme httpd) - Remove unused 6667 port from magnet-atheme fly.toml Configure Convos to use Atheme auth plugin: - Enable Convos::Plugin::Auth::Atheme plugin - Set XMLRPC URL to magnet-atheme.internal:8080/xmlrpc - Set IRC URL for registration commands - Set email domain to irc.perl.org
1 parent 18aa23d commit dd241e4

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

atheme/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ RUN chmod +x /app/entrypoint.sh
5757
# Container starts as root for Tailscale, drops to atheme user for services
5858
WORKDIR /opt/atheme/var
5959

60-
EXPOSE 6667
60+
# Atheme httpd serves XMLRPC for Convos authentication
61+
EXPOSE 8080
6162

6263
CMD ["/app/entrypoint.sh"]

atheme/atheme.conf.template

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ memoserv {
8787
/* Protocol module */
8888
loadmodule "protocol/solanum";
8989

90+
/* HTTP server and XMLRPC for Convos authentication integration */
91+
loadmodule "misc/httpd";
92+
loadmodule "transport/xmlrpc";
93+
9094
/* Backend modules */
9195
loadmodule "backend/opensex";
9296

@@ -172,3 +176,10 @@ operclass "sra" {
172176
operator "perigrin" {
173177
operclass = "sra";
174178
};
179+
180+
/* HTTP server for XMLRPC integration with Convos */
181+
httpd {
182+
host = "0.0.0.0";
183+
port = 8080;
184+
www_root = "/opt/atheme/www";
185+
};

atheme/entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ echo "Atheme configuration instantiated successfully"
6060
echo "Tailscale hostname: ${HOSTNAME}"
6161
echo "Services password: ${SERVICES_PASSWORD}"
6262

63-
# Simple HTTP health endpoint
64-
(while true; do
65-
echo -e "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n\r\nAtheme Services Health OK" | nc -l -p 8080
66-
done) &
63+
# Create www_root directory for Atheme httpd health endpoint
64+
mkdir -p /opt/atheme/www
65+
echo "OK" > /opt/atheme/www/health
66+
chown -R atheme:atheme /opt/atheme/www
6767

6868
# Cleanup function - only called when health check fails
6969
cleanup() {

servers/magnet-atheme/fly.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,3 @@ primary_region = "ord"
4444
timeout = "10s"
4545
path = "/health"
4646

47-
[[services]]
48-
internal_port = 6667
49-
protocol = "tcp"
50-
51-
[[services.ports]]
52-
port = 6667

servers/magnet-convos/fly.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ primary_region = 'ord'
2323
# Default theme for landing page and new users
2424
CONVOS_DEFAULT_THEME = "magnet"
2525
CONVOS_DEFAULT_SCHEME = "light"
26+
# Atheme authentication integration
27+
# Enable the Atheme auth plugin for NickServ-based authentication
28+
CONVOS_PLUGINS = "Convos::Plugin::Auth::Atheme"
29+
# XMLRPC endpoint for login authentication
30+
CONVOS_AUTH_ATHEME_URL = "http://magnet-atheme.internal:8080/xmlrpc"
31+
# IRC server for NickServ registration commands
32+
CONVOS_AUTH_ATHEME_IRC_URL = "irc://magnet-irc.flycast:16667"
33+
# Domain for user email addresses
34+
CONVOS_AUTH_ATHEME_DOMAIN = "irc.perl.org"
2635

2736
[mounts]
2837
source = "convos_data"

0 commit comments

Comments
 (0)