Redis Caching & Messaging (Pub/Sub, Streams) · Ders

TLS ile Aktarım Sırasında Şifreleme

TLS'yi etkinleştirip sertifikaları yapılandırarak ve istemcilerden güvenli biçimde bağlanarak Redis trafiğini dinlemeye karşı koruyun.

4. ders / 413 adım

TLS ile Aktarım Sırasında Şifreleme, CoddyKit'te ücretsiz bir Redis Caching & Messaging (Pub/Sub, Streams) dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Redis Caching & Messaging (Pub/Sub, Streams) öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Redis Caching & Messaging (Pub/Sub, Streams) kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

Why Encrypt in Transit?

By default Redis speaks plaintext over the network. Anyone able to sniff the wire can read your commands, including AUTH passwords and cached data. TLS encrypts the connection so traffic stays confidential and tamper-evident.

TLS Building Blocks

TLS uses certificates:

  • A server certificate proves the server's identity
  • A private key the server keeps secret
  • A CA certificate clients use to verify the server

Generating Certificates

For testing, the Redis source ships a helper script, or you can use openssl to create a CA and a server cert/key pair.

openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes

Enabling TLS on the Server

Configure the TLS port and certificate paths. Setting port 0 disables the plaintext port so only TLS is accepted.

tls-port 6379
port 0
tls-cert-file server.crt
tls-key-file server.key
tls-ca-cert-file ca.crt

Mutual TLS

For stronger security, require clients to present their own certificate (mTLS). The server then authenticates the client in addition to encrypting traffic.

tls-auth-clients yes

Connecting with redis-cli

redis-cli supports TLS with the --tls flag plus the CA and, for mTLS, the client cert and key.

redis-cli --tls --cacert ca.crt -h myhost -p 6379

Connecting from Code

Client libraries accept TLS settings: enable TLS, point to the CA, and (for mTLS) the client certificate and key.

client = redis.Redis(host='myhost', port=6379, ssl=True, ssl_ca_certs='ca.crt')

Replication and Cluster over TLS

Inter-node traffic should be encrypted too. Enable tls-replication yes and tls-cluster yes so replicas and cluster bus connections also use TLS.

tls-replication yes
tls-cluster yes

Protocol and Cipher Hardening

Restrict allowed protocols and ciphers to modern, strong options to avoid downgrade attacks.

tls-protocols "TLSv1.2 TLSv1.3"

TLS Is Not Everything

TLS protects data in transit, not at rest, and does not replace authentication. Keep using requirepass/ACLs and bind to trusted interfaces; TLS is one layer of defense in depth.

Cost and Trade-offs

TLS adds CPU overhead for the handshake and encryption. It is usually negligible with persistent connections and connection pooling, but worth measuring under load.

Quick Check

Test your understanding of Redis TLS.

Recap

You enabled TLS on Redis: generated certificates, configured the TLS port and key/cert files, optionally required client certs for mTLS, secured replication and cluster traffic, and connected from CLI and code. Remember TLS is one layer; pair it with authentication and network isolation.

Başlamak ücretsiz

Yapay zeka eğitmeniyle Redis Caching & Messaging (Pub/Sub, Streams) öğren — ücretsiz

Tarayıcında gerçek kod yaz ve çalıştır, 7/24 yapay zeka eğitmeninden anında yardım al; web'de ya da uygulamada kaldığın yerden devam et.

Kurslar
12
Dersler
48

Sıkça Sorulan Sorular

“TLS ile Aktarım Sırasında Şifreleme” dersi ücretsiz mi?

Evet — “TLS ile Aktarım Sırasında Şifreleme” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Redis Caching & Messaging (Pub/Sub, Streams) kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Redis Caching & Messaging (Pub/Sub, Streams) kursu toplamda 4 dersten oluşur.

“TLS ile Aktarım Sırasında Şifreleme” dersinde ne öğreneceğim?

TLS'yi etkinleştirip sertifikaları yapılandırarak ve istemcilerden güvenli biçimde bağlanarak Redis trafiğini dinlemeye karşı koruyun. Redis Caching & Messaging (Pub/Sub, Streams) ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

Redis Caching & Messaging (Pub/Sub, Streams) öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te Redis Caching & Messaging (Pub/Sub, Streams), başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“TLS ile Aktarım Sırasında Şifreleme” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu Redis Caching & Messaging (Pub/Sub, Streams) dersinde kod yazıp çalıştırabilir miyim?

Evet. Her Redis Caching & Messaging (Pub/Sub, Streams) dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Kimlik Doğrulama ve Yetkilendirme
  2. Redis için Ağ Güvenliği
  3. Operasyonel En İyi Uygulamalar
  4. TLS ile Aktarım Sırasında Şifreleme
← Redis Caching & Messaging (Pub/Sub, Streams) Sayfasına Dön