add option for serving jwt info

This commit is contained in:
Robin Appelman 2026-11-04 00:57:16 +01:00
commit c04a04ea29
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE
8 changed files with 256 additions and 22 deletions

View file

@ -19,9 +19,37 @@ in {
description = "Configuration for generating JWT authorization tokens";
type = types.nullOr (types.submodule {
options = {
secret = mkOption {
key = mkOption {
type = types.str;
description = "JWT secret";
description = "JWT RS256 key";
};
issuer = mkOption {
type = types.str;
description = "JWT issuer";
};
listen = mkOption {
type =
types.either (types.submodule {
options = {
path = mkOption {
type = types.path;
description = "UNIX socket path to listen om";
};
};
}) (types.submodule {
options = {
address = mkOption {
type = types.str;
description = "IP address to listen on";
};
port = mkOption {
type = types.port;
description = "port to listen on";
};
};
});
description = "Serve openid-configuration and JWT keys at the specified address or socket";
default = {path = "/var/run/rss-webhook-trigger/jwt.sock";};
};
};
});
@ -95,9 +123,10 @@ in {
ProtectHostname = true;
LockPersonality = true;
ProtectKernelTunables = true;
RestrictAddressFamilies = "AF_INET AF_INET6";
RestrictAddressFamilies = ["AF_INET" "AF_INET6" "AF_UNIX"];
RestrictRealtime = true;
ProtectProc = "noaccess";
RuntimeDirectory = "rss-webhook-trigger";
SystemCallFilter = ["@system-service" "~@resources" "~@privileged"];
IPAddressDeny = "localhost link-local multicast";
};