Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support TLS config #139

Merged
merged 6 commits into from
Oct 3, 2024
Merged

feat: Support TLS config #139

merged 6 commits into from
Oct 3, 2024

Conversation

jopemachine
Copy link
Member

@jopemachine jopemachine commented Oct 3, 2024

Resolves #18.

  • Support for TLS encrypted network connections between RaftNodes
  • Refactoring of code to generate Config using ConfigBuilder

How to test

After executing the following command, enable the TLS feature in the example code's cargo.toml and bootstrap the cluster.

openssl genrsa -out server.key 2048 ; \
echo "[ req ]
default_bits       = 2048
default_md         = sha256
default_keyfile    = server.key
distinguished_name = req_distinguished_name
req_extensions     = req_ext
x509_extensions    = v3_req
prompt             = no

[ req_distinguished_name ]
C  = KR
ST = Seoul
L  = Seoul
O  = MyOrganization
OU = MyUnit
CN = localhost

[ req_ext ]
subjectAltName = @alt_names

[ v3_req ]
subjectAltName = @alt_names

[ alt_names ]
DNS.1 = localhost
IP.1  = 127.0.0.1" > openssl.cnf ; \
openssl req -new -key server.key -out server.csr -config openssl.cnf ; \
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt -extensions v3_req -extfile openssl.cnf ; \
cp server.crt ca_cert.pem

@jopemachine jopemachine self-assigned this Oct 3, 2024
@jopemachine jopemachine added feature New feature or request refactoring Rewrite something in better way while keeping the same functionality labels Oct 3, 2024
@jopemachine jopemachine merged commit 4ba70d0 into main Oct 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request refactoring Rewrite something in better way while keeping the same functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SSL authorized RaftServiceClient API
1 participant