Skip to content

Security Overview

Danube provides a layered security model that protects data in transit and controls access to cluster resources. Each layer can be enabled independently, but for production all three should be active.

The auth.mode setting in the broker configuration controls the overall security posture:

ModeEncryptionAuthenticationAuthorizationUse Case
noneOffOffOffLocal development and testing
tlsTLS everywhereJWT tokensRBAC (default-deny)Production deployments

When mode: none, all connections are unencrypted with no authentication. Any client can produce, consume, and manage the cluster without credentials.

When mode: tls, the broker enables the full security stack:

  • All client and inter-broker connections are encrypted with TLS
  • Clients must present a valid JWT token to authenticate
  • Every operation is checked against RBAC policies — if no policy grants access, the request is denied

TLS & Certificates

Encrypt all network traffic. Server TLS for clients, mutual TLS for inter-broker communication.

Configure TLS →

Authentication (JWT)

Verify caller identity with signed JWT tokens. Offline token creation, no runtime key exchange.

Set up JWT →

Authorization (RBAC)

Control what each identity can do. Roles, bindings, scoped permissions with default-deny.

Configure RBAC →


danube_broker.yml
auth:
mode: tls
tls:
cert_file: "./cert/server-cert.pem"
key_file: "./cert/server-key.pem"
ca_file: "./cert/ca-cert.pem"
jwt:
secret_key: "your-secret-key"
issuer: "danube-auth"
expiration_time: 3600
super_admins:
- "admin"
admin_tls: false # Enable TLS on admin API (recommended for remote access)

Authorization is enforced on every gRPC call across all broker services.

OperationRequired PermissionResource
Topic lookupLookupTopic
Topic partitionsLookupTopic
Create producerProduceTopic
Send messageProduceTopic
SubscribeConsumeTopic
Receive messagesConsumeCluster
AcknowledgeConsumeCluster
OperationRequired PermissionResource
Create/delete namespaceManageNamespaceNamespace or Cluster
Create/delete topicManageTopicTopic or Namespace
List/inspect brokersManageBrokerCluster
Raft membership changesManageClusterCluster
Schema operationsManageSchemaSchema Subject or Topic
Role/binding managementManageClusterCluster