Skip to main content
SimpleAuth is a middleware that challenges SIP requests with digest authentication against a static list of users. It suits tests and small deployments. It has no configuration file besides the users file.

Docker image

fonoster/routr-simpleauth

Ports

Environment variables

Users file

The users file is a JSON array. This file defines two users.

gRPC contract

For a method in METHODS, SimpleAuth returns the request unchanged when the From user is in ALLOWLIST or the digest response is valid. Otherwise, it returns 401 Unauthorized with a challenge for the Request-URI host. See processor.proto.

Minimal example

This command runs SimpleAuth for INVITE and MESSAGE requests.
This Dispatcher fragment runs SimpleAuth before the Processor.

Notes

  • SimpleAuth loads PATH_TO_AUTH with Node’s require, so use a .json file and an absolute path.
  • METHODS and ALLOWLIST are split on commas without trimming. Do not put spaces after the commas.
  • RTPRelay and SimpleAuth both default to port 51903. Change BIND_ADDR on one of them if they share a host.