Whoever controls a message broker's administration plane can read every stream, inject messages that downstream systems trust, rewind consumers and harvest the credentials of every connector, so the platform itself has to be hardened as a tier 0 system. This guide covers the broker or event streaming platform as a target rather than the applications that use it: who administers it, the service accounts it runs as and uses internally, the keys and certificates that hold it together, the logs it must produce, and how it is patched, backed up, scaled and retired. It is vendor-neutral and applies to self-hosted queue brokers, distributed log platforms, IoT publish and subscribe brokers and managed cloud messaging services, with notes where the shared responsibility split differs. It is written for platform, integration and security engineers who run an existing broker estate.
Designing a new platform and onboarding the first clients is covered in the Message broker and event streaming platform rollout playbook, including the choice of client authentication mechanism. This page assumes the platform is already in production and goes deeper on the administration plane, internal identities, key material and lifecycle.
Key takeaways
- Map the whole administration plane. Admin APIs, management consoles, metrics and management ports, coordination services, schema registries and connector frameworks can all change what the broker does; most estates protect only the client port.
- Separate data rights from platform rights. Creating topics, altering configuration, resetting consumer offsets, managing access rules and replaying history are administrative actions and need their own roles, approvals and logs.
- Internal identities are non-human identities too. Broker to broker replication, coordination service access, connector workers and mirroring jobs each need a distinct credential with an owner, rotation and monitoring.
- Keys and certificates decide the outage risk. Listener certificates, the internal certificate authority, storage encryption keys and credential stores need inventories, renewal automation and tested recovery.
- Log administrative actions separately from traffic. Access rule changes, offset resets, topic deletion and new principals are the events that reveal misuse, and they are often off by default.
What makes up a broker's attack surface
A broker is several services, each with its own port, credential and failure mode. Inventory them before hardening, because the forgotten interface is usually the exposed one. OWASP's guidance on insecure system configuration in CI/CD estates makes the same point for build tooling: inventory every system, its version and its owner first.
| Component | What it can do if misused | Typical credential | Hardening priority |
|---|---|---|---|
| Client listeners | Publish or consume on any topic the principal is allowed | Client certificate, SASL credential, bearer token | TLS only, authenticated, rules deny by default |
| Inter-broker or cluster listener | Replicate, truncate or forge partition data; act as a broker | Cluster certificate or shared cluster secret | Separate listener, separate identity, never reachable from client networks |
| Coordination or metadata service | Change cluster membership, configuration and access rules directly | Service credential or certificate | Authenticated and encrypted, reachable only from brokers and admins |
| Admin API and command line tools | Create and delete topics, change rules, reset offsets | Admin principal | Named humans via single sign-on, just-in-time elevation |
| Management console or web UI | Browse messages, publish test messages, change configuration | Local accounts or single sign-on | Default accounts removed, MFA, management network only |
| Metrics and management ports | Read internals; on some platforms invoke operations | Often none by default | Bind to management network, authenticate, read-only where possible |
| Schema registry | Change message contracts, break or subvert consumers | Registry admin and client credentials | Treat as administration interface; compatibility rules enforced |
| Connector framework | Read and write external databases and SaaS; run plugins | Broker principal plus external credentials | REST interface locked down, plugins allow-listed, secrets externalised |
| Mirroring and replication jobs | Copy whole streams to another cluster or region | Principals on both clusters | Scoped to named topics, owned, logged |
Managed services: the provider runs the brokers, coordination layer and storage, so most of the inter-broker and host rows move to the provider. The customer still owns the cloud IAM roles that administer the service, client and connector identities, network exposure, encryption key choice and log export. Read the provider's shared responsibility statement and record the split for each row above.
Administrative roles and separation of duties
Most broker products ship with one powerful superuser concept. Break it into roles that match real tasks, so that a compromised operator account or automation token cannot do everything. NIST SP 800-53 Rev. 5 AC-5 (Separation of Duties) and AC-6 (Least Privilege) are the controls to evidence.
| Role | Allowed actions | Not allowed | Holders |
|---|---|---|---|
| Platform administrator | Cluster configuration, upgrades, listener and certificate changes | Reading message payloads; granting itself data access without approval | Two to four named engineers, elevated just in time |
| Access administrator | Create principals, change access rules and quotas | Cluster configuration; data access | Platform security or IAM team, ideally driven from a rules repository |
| Topic owner | Approve producers and consumers for owned prefixes, set retention within policy | Changes outside owned prefixes | Application or domain team lead |
| Operator | Read metrics, consumer lag and logs; restart services | Rule changes, offset resets, topic deletion | On-call rota |
| Data replay or offset administrator | Reset consumer offsets, replay historical data | Rule changes | Named people, change ticket required |
| Break-glass | Full control during an outage | Day-to-day use | Sealed credential, monitored, rotated after every use |
- Use the identity provider for humans: consoles and admin APIs should authenticate humans through single sign-on with phishing-resistant MFA. Remove or disable built-in default accounts; where a local account must remain for recovery, treat it as break-glass. See the Break-Glass Account Guide.
- Manage access rules as code: keep rules, quotas and topic definitions in a repository, apply them with a single automation identity and require review from someone other than the author. Manual rule changes then show up as drift.
- Restrict offset and replay rights: resetting another application's consumer group offsets can replay payments or skip fraud checks. Keep it out of the operator role.
- Limit broad subscriptions: the MQTT 5.0 specification advises servers to consider limiting access to topic filters with broad scope such as the multi-level wildcard, a rule worth applying to wildcard reads on every platform.
Service accounts the platform runs as and uses
A broker estate holds more non-human identities than its client list suggests. Each of the following needs a distinct credential, an owner in the NHI inventory, a rotation method and alerting on unusual use. NIST SP 800-53 IA-9 (Service Identification and Authentication) and CSF 2.0 PR.AA-01 cover the requirement.
| Identity | Purpose | Common mistake | Better pattern |
|---|---|---|---|
| Host or container runtime account | Runs the broker process | Runs as root or administrator | Dedicated unprivileged account, read-only filesystem except data and log paths |
| Inter-broker identity | Replication and cluster membership | Same credential as an admin or a client | Per-cluster certificate from the internal CA, accepted only on the cluster listener |
| Coordination service identity | Brokers reading and writing cluster metadata | Unauthenticated metadata service on a flat network | Mutual TLS or SASL to the metadata service, network restricted to brokers |
| Connector worker identity | Connectors producing and consuming | One principal for all connectors | One principal per connector, scoped to its topics |
| Connector external credentials | Database, object storage and SaaS access | Passwords in connector configuration visible through the REST interface | Referenced from a secrets manager at runtime; see Securing the secrets manager itself |
| Mirroring identity | Cross-cluster or cross-region copy | Superuser on both clusters | Read on named source topics, write on named target topics only |
| Access rule automation identity | Applies rules and topic definitions from the repository | Long-lived admin password in a pipeline variable | Short-lived federated credential from the pipeline; see the Workload Identity Federation Guide |
| Monitoring identity | Collects metrics and lag | Admin rights "to read everything" | Read-only describe rights, no data access |
For credential types and rotation detail on one widely used distributed log platform, see the distributed streaming platform credentials guide. For ownership and lifecycle of these identities across the estate, see the Service Account Security Guide.
Keys, certificates and credential stores
Brokers hold several kinds of key material, and an expired or leaked one causes either an outage or a silent compromise. NIST SP 800-53 SC-12 (Cryptographic Key Establishment and Management) and NIST SP 800-57 Part 1 Rev. 5 frame the lifecycle: generation, distribution, storage, use, rotation, revocation and destruction.
| Key material | Where it lives | Risk | Control |
|---|---|---|---|
| Listener server certificates and private keys | Keystores on each broker | Expiry outage; stolen key enables impersonation | Short validity, automated renewal, hostname verification on clients, inventory with expiry alerts |
| Internal CA signing key | CA service or hardware security module | Anyone holding it can mint broker or client identities | Offline or HSM-backed root, issuing CA scoped to the broker estate; see Securing the internal PKI and certificate authority itself |
| Keystore and truststore passwords | Broker configuration files | Plaintext in configuration management or images | Injected from a secrets manager at start-up, file permissions restricted to the broker account |
| SASL credential store | Broker or metadata service | Theft enables offline attacks | Salted challenge-response storage where used; RFC 5802 notes stored SCRAM data alone cannot impersonate a client but still allows offline password attacks, so protect it and use long random secrets |
| Token signing keys and issuer trust | Identity provider; broker validation configuration | Trusting the wrong issuer or audience admits forged tokens | Pin issuer and audience, validate expiry; RFC 7628 requires TLS for OAUTHBEARER |
| Storage encryption keys | Cloud KMS or disk encryption | Snapshots and backups readable by anyone with storage access | Customer-managed keys for regulated topics, key use logged; see Securing the cloud key management service (KMS) itself |
| Payload signing or encryption keys | Producers and consumers | Undetected message forgery inside the broker | For high-value flows only; keys per producer, verification at consumers |
Long-lived connections: RFC 7628 notes that a connection can outlast the access token used to establish it, and the MQTT 5.0 specification allows servers to require periodic re-authentication. Where the platform supports re-authentication or maximum connection lifetimes, enable them so revoking a credential actually disconnects the client.
Network placement and platform hardening
- Separate listeners by purpose: client, inter-broker, coordination and administration traffic on different listeners and, ideally, different network segments, so firewall rules can express who may reach what (NIST SP 800-53 SC-7, CIS Control 12).
- TLS everywhere, including inside the cluster: AMQP 1.0 Part 5 requires the TLS client to validate the server certificate, and the MQTT 5.0 specification advises checking that certificates match the hostname. Check that every client library has verification enabled, not just the broker.
- Disable unused protocols and plugins: each protocol adapter, plugin and management extension is another parser and port (CM-7 Least Functionality). Keep an allow-list for connector plugins, because a connector plugin runs code inside the connector workers.
- Quotas and limits: per-principal produce, consume, request and connection quotas stop one client starving others (SC-5 Denial-of-service Protection).
- No internet exposure by default: exposed broker ports invite exploitation of public-facing services (MITRE ATT&CK T1190). The only exception is a purpose-built IoT edge broker, which then needs device certificates, strict topic rules and its own monitoring. See the MQTT Security Guide.
- Host hardening: apply the operating system and container benchmarks your organisation uses, restrict shell access to broker hosts through privileged access management, and keep data directories readable only by the broker account.
Audit logging and monitoring
Brokers usually log connections and errors well and administrative actions poorly. Turn on authorisation and admin audit logging explicitly, ship it to the SIEM and protect it from the platform administrators it records (AU-2 Event Logging, AU-9 Protection of Audit Information, AU-12 Audit Record Generation).
| Event | Why it matters | Suggested response |
|---|---|---|
| New principal created or credential issued | Persistence through a new identity (ATT&CK T1098 Account Manipulation) | Match to an approved request; alert if none |
| Access rule granting read on a sensitive prefix or a wildcard | Quiet route to bulk data access | Alert; require topic owner approval |
| Consumer offset reset or group membership by a new principal | Replay, skipped processing or stolen messages | Alert outside change windows |
| Topic deletion, retention cut or configuration change | Destruction of evidence or data | Alert; protected topics require two-person approval |
| Connector created or reconfigured | Exfiltration path to an external system | Alert on any new sink destination |
| Repeated authentication failures, topic scanning, clients that connect and send nothing | The MQTT 5.0 specification lists these as abnormal behaviours worth monitoring | Rate-limit, block list by address or client identifier |
| Writes to topics by unexpected producers | Message injection (ATT&CK T1565.002 Transmitted Data Manipulation) | Alert on producers outside the topic's approved list |
| Admin logging disabled or log volume drops | Covering tracks | High-severity alert |
NIST SP 800-92 Rev. 1 (initial public draft, October 2023) is a useful planning reference for log retention, transport and access. Retain broker admin logs at least as long as the longest topic retention, so an investigation can see who could read the data that was stored. For pipeline transport of these logs, see Securing the log pipeline (collectors, forwarders, data pipeline) itself.
Lifecycle: patch, upgrade, back up, recover, retire
- Patch on a defined clock: track broker, coordination service, connector framework, plugin and client library versions, subscribe to the project's or vendor's security advisories and check the CISA Known Exploited Vulnerabilities catalogue, which has included broker flaws (SI-2 Flaw Remediation). Rolling upgrades across replicas let most clusters patch without downtime.
- Back up what you cannot replay: topic data is often replayable from source systems; access rules, principals, topic configuration, schemas, connector definitions and the CA material are not. Back them up as code or exports, encrypted, with restore tested (CP-9 System Backup).
- Scale safely: new brokers join with certificates issued for that purpose, never by copying another broker's keystore. Removing brokers includes revoking their certificates.
- Review dormant identities: principals and connectors with no activity in 90 days (an NHI Mgmt Group recommended threshold) are reviewed with their owner and removed if unused.
- Retire cleanly: when a topic, connector or cluster is decommissioned, remove its rules and principals, revoke its certificates, rotate any external credentials its connectors held and securely delete storage and snapshots.
Hardening an existing broker: a phased approach
- Inventory (weeks 1 to 2): list every cluster, listener, admin interface, connector, schema registry, principal and certificate with owner and expiry. Compare listeners with firewall rules.
- Close the admin plane (weeks 2 to 4): move consoles, admin APIs and metrics ports to the management network behind single sign-on, remove default accounts and split the superuser into the roles above. Test with the on-call team before removing old access, and keep a break-glass path.
- Separate internal identities (weeks 4 to 8): issue distinct inter-broker, coordination, connector and mirroring credentials. Roll one broker at a time, accepting old and new credentials during the overlap, then remove the old one.
- Externalise secrets and automate certificates (weeks 6 to 10): move keystore passwords and connector credentials to a secrets manager and put listener certificates on automated renewal. Rollback is restoring the previous configuration from version control.
- Turn on admin audit logging (week 8 onward): enable authorisation and admin logs, build the alerts in the table above and run them in report-only mode for two weeks to tune noise.
- Move rules to code (weeks 10 to 14): export current rules, review each with its topic owner, commit the approved set and apply it through the automation identity. Unexpected grants found during review are findings.
- Prove recovery: restore configuration, rules and CA material into an isolated cluster and confirm a pilot application works.
Decision guidance
| Decision | Option A | Option B | Choose A when |
|---|---|---|---|
| Platform model | Managed cloud messaging service | Self-hosted cluster | You want provider identity and key integration and have no need to control broker internals; choose B when data residency, protocol support or cost at scale requires it, and staff the CA, patching and storage work |
| Inter-broker identity | Per-cluster certificates from an internal CA | Shared cluster secret | Almost always; B only for small, isolated clusters with documented rotation |
| Access rules | Generated from a repository | Edited through the console | You have more than a handful of applications or any regulated data |
| Tenancy | Separate clusters per security zone | Shared cluster with logical isolation | Regulated, production or OT data must not share an admin credential with other zones |
| Admin access | Just-in-time elevation | Standing admin group | Always for production; B is tolerable only in non-production |
Small organisations: a managed service with cloud IAM roles for administration, one principal per application and provider log export covers most of this page. Large estates: a platform team with rules as code, a topic catalogue with named owners, a dedicated issuing CA and admin audit alerts in the SOC.
Detection and measurement
- Admin plane exposure: admin interfaces reachable only from the management network and behind single sign-on, as a share of all admin interfaces (target 100%).
- Standing admin holders: number of humans with permanent platform administrator rights (target four or fewer per cluster).
- Distinct internal identities: internal functions (inter-broker, coordination, each connector, mirroring, monitoring) with their own credential, as a share of all internal functions (target 100%).
- Certificate renewal automation: listener and inter-broker certificates on automated renewal, and the count expiring within 30 days without a renewal scheduled (target zero).
- Externalised secrets: connector and keystore credentials referenced from a secrets manager rather than stored in configuration (target 100%).
- Rule drift: access rules present on the cluster but absent from the repository (target zero).
Framework mapping
| Area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 |
|---|---|---|---|
| Admin roles and separation | AC-2, AC-5, AC-6 | PR.AA-05 | 5, 6 |
| Service and internal identities | IA-5, IA-9 | PR.AA-01 | 5, 6 |
| Keys, certificates and transport | SC-8, SC-12, SC-28 | PR.DS-01, PR.DS-02 | 3 |
| Platform hardening and configuration | CM-2, CM-6, CM-7, SC-5, SC-7 | PR.PS-01 | 4, 12 |
| Admin audit logging and monitoring | AU-2, AU-9, AU-12 | PR.PS-04, DE.CM-09 | 8 |
| Patching, backup and lifecycle | SI-2, CP-9 | ID.AM-08 | 7, 11 |
Relevant MITRE ATT&CK techniques: T1190 Exploit Public-Facing Application, T1098 Account Manipulation, T1552.001 Credentials In Files, T1040 Network Sniffing and T1565.002 Transmitted Data Manipulation.
Common failure patterns
- Client port hardened, admin plane open: TLS and authentication on client listeners while the management console keeps a default account and the metrics port answers anyone on the network.
- One superuser for everything: inter-broker replication, connectors, monitoring and humans share one powerful principal, so a single leaked configuration file gives full control.
- Connector credentials readable through the REST interface: database and SaaS passwords sit in connector configuration that any connector API user can retrieve (ATT&CK T1552.001).
- Certificates renewed by hand: a listener or inter-broker certificate expires, the cluster partitions, and the emergency fix is a long-validity certificate that is never replaced.
- Offsets and retention treated as operations: on-call staff can reset consumer offsets or cut retention without a ticket, which is indistinguishable from sabotage in the logs.
- Decommissioning skipped: retired applications leave principals, wildcard rules and running connectors behind, each holding valid credentials.
Practitioner checklist
- Inventory every listener, admin interface, coordination service, schema registry, connector and mirroring job with an owner.
- Put consoles, admin APIs and metrics ports on the management network behind single sign-on with MFA; remove default accounts.
- Split administration into platform, access, operator, replay and break-glass roles with just-in-time elevation.
- Give inter-broker, coordination, connector, mirroring, monitoring and automation functions their own credentials.
- Move keystore passwords and connector external credentials into a secrets manager.
- Automate listener and inter-broker certificate renewal from a scoped issuing CA, and alert on expiry.
- Manage access rules, quotas and topics as code with independent review; alert on drift.
- Enable admin and authorisation audit logs, ship them to the SIEM and alert on the events listed above.
- Patch on a defined clock and back up rules, principals, schemas, connector definitions and CA material with tested restore.
- Remove principals, rules, certificates and connector credentials when topics, applications or clusters are retired.
Standards and references
- OASIS: MQTT Version 5.0
- OASIS: AMQP Version 1.0 Part 5 Security
- IETF: RFC 7628 A Set of SASL Mechanisms for OAuth
- IETF: RFC 5802 Salted Challenge Response Authentication Mechanism (SCRAM)
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
- NIST: SP 800-57 Part 1 Rev. 5 Recommendation for Key Management
- NIST: SP 800-92 Rev. 1 Cybersecurity Log Management Planning Guide (initial public draft)
- CIS: Critical Security Controls v8.1
Related NHI Mgmt Group resources: Message broker and event streaming platform rollout playbook, If your message broker and event streaming platform is compromised, Service Account Security Guide, Machine Identity, PKI and Certificate Lifecycle Guide.