Skip to content

Security: maxpert/strangeq

Security

SECURITY.md

Security Policy

Supported Versions

Use the latest published release. This repository does not state a maintenance window or backport policy for older releases. Consult the release history for available fixes.

Reporting a Vulnerability

Please do not open a public issue for security problems.

Use GitHub's private vulnerability reporting if it is enabled for this repository. No monitored security email address is published here. If private reporting is unavailable, contact a repository maintainer privately without disclosing exploit details in a public issue.

Include affected version (amqp-server --version), configuration (redact secrets), reproduction steps, and impact. We aim to acknowledge reports within 48 hours. Fixes are released as patch versions and announced through a GitHub Security Advisory.

Defaults

Out of the box the broker listens on 127.0.0.1:5672 with authentication, authorization and TLS off. Telemetry (/metrics, /health) and the management API are off, and bind loopback when enabled. pprof is off. Binding a non-loopback address with authentication off, TLS off, or ANONYMOUS in authmechanisms logs a startup warning but still starts.

Security Best Practices

Authentication

Turn on authentication for anything beyond a local test. The broker supports SASL PLAIN and ANONYMOUS, with users in a JSON auth file (the only backend). Use PLAIN over TLS, and never enable ANONYMOUS on a reachable listener. Passwords are stored as salted SHA-256 hashes in RabbitMQ's format (SHA-512 and MD5 hashes imported from RabbitMQ are also accepted). Existing bcrypt hashes still work, at bcrypt's per-login cost. Definitions exports carry each user's password hash, as RabbitMQ's do, so only principals with manage_users receive the user section; protect exported files like credentials. Rotate passwords on a schedule. See Authorization.

Network Security

Enable TLS on every listener that leaves the host, use certificates your clients trust, and firewall the AMQP, management, telemetry and cluster peer ports. A cluster's peer token lets any holder take part in consensus, so keep it in a file only the service account can read. See TLS and Clustering.

Configuration and Storage

Restrict the config file, auth file and private keys to their owner or the service group (for example 0600, or root-owned 0640 with group amqp). Never commit credentials. Load private keys from protected files or your secret manager. Protect the storage directory with file permissions and back it up.

Monitoring

Scrape the Prometheus metrics and alert on amqp_auth_failures_total, resource alarms and errors. Keep telemetry on loopback (or behind a proxy) and pprof off.

Example Secure Configuration

network:
  address: "0.0.0.0:5672"
  maxconnections: 10000

storage:
  path: /var/lib/amqp/data
  durability: barrier

security:
  tlsenabled: true
  tlscertfile: /etc/amqp/certs/server.crt
  tlskeyfile: /etc/amqp/certs/server.key
  authenticationenabled: true
  authenticationfilepath: /etc/amqp/auth.json
  authorizationenabled: true
  authmechanisms: [PLAIN]
  allowedhosts: ["10.0.0.0/8", "localhost"]
  blockedusers: []
  authfailurelimit: 5
  authfailurewindowms: 60000

telemetry:
  enabled: true
  address: 127.0.0.1
  port: 9419
  pprofenabled: false

server:
  loglevel: warn

Create /etc/amqp/auth.json with password hashes and per-vhost permissions before starting the broker. See Authorization. The example keeps TLS on port 5672, so clients use amqps://HOST:5672/. For certificate setup and port selection, see TLS configuration.

Known Limitations

  1. Rate limiting: only failed authentication is limited, per IPv4 address or IPv6 /64 (security.authfailurelimit). There's no general AMQP request-rate limit.
  2. SASL EXTERNAL: not supported. Mutual TLS verifies client certificates at the transport layer but doesn't map them to broker users. Enable SASL authentication and authorization separately. The management API's secure/ssl connection flags report TLS transport, not user authorization.
  3. Audit logging: management API mutations write structured audit records to the broker log. That's not a durable audit trail, and AMQP operations aren't audited.
  4. Virtual hosts: the broker accepts only /. Queues and exchanges share that namespace.

Security Checklist

  • TLS enabled with valid certificates
  • Authentication and authorization enabled (PLAIN with TLS)
  • ANONYMOUS mechanism disabled
  • Strong passwords used
  • Configuration files have restricted permissions
  • Storage directories protected
  • Firewall rules configured
  • Monitoring and alerting enabled
  • Telemetry bound to loopback; pprof disabled
  • Connection access control (allowedhosts/allowedusers) reviewed

There aren't any published security advisories