# TLS & mTLS Examples (/sdks/rust/how-to/tls)



Secure your KubeMQ connections with TLS encryption and mutual TLS (mTLS) authentication using the Rust SDK.

Choose **TLS** when you only need to encrypt traffic and verify the broker's identity — the client trusts a CA certificate and the connection is protected from eavesdropping, which covers most deployments. Choose **mTLS** when the broker must also verify the client, such as in zero-trust or multi-tenant environments — the client presents its own certificate and key, so only holders of a trusted client certificate can connect.

<Cards>
  <Card title="TLS Setup" href="/sdks/rust/how-to/tls/tls-setup">
    Connect with server-side TLS encryption
  </Card>

  <Card title="mTLS Setup" href="/sdks/rust/how-to/tls/mtls-setup">
    Connect with mutual TLS (client certificate authentication)
  </Card>
</Cards>
