From 7126c4068b4306199a7137f71bab75a2cd85775a Mon Sep 17 00:00:00 2001 From: anonpenguin23 Date: Thu, 27 Nov 2025 16:52:49 +0200 Subject: [PATCH] feat: enhance HTTPS support and certificate management - Added a new CertificateManager for managing self-signed certificates, ensuring secure communication within the network. - Updated the configuration to support self-signed certificates and Let's Encrypt integration for HTTPS. - Enhanced the installer to generate and manage certificates automatically, improving the setup experience. - Introduced a centralized TLS configuration for HTTP clients, ensuring consistent security practices across the application. - Updated documentation to reflect new port requirements and HTTPS setup instructions. --- pkg/cli/prod_commands_test.go | 36 +++++++++++------------ pkg/environments/templates/render_test.go | 1 - 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/pkg/cli/prod_commands_test.go b/pkg/cli/prod_commands_test.go index 83131e5..926d589 100644 --- a/pkg/cli/prod_commands_test.go +++ b/pkg/cli/prod_commands_test.go @@ -128,24 +128,24 @@ func TestNormalizePeers(t *testing.T) { expectCount: 0, expectError: false, }, - { - name: "single peer", - input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx", - expectCount: 1, - expectError: false, - }, - { - name: "multiple peers", - input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.2/tcp/4001/p2p/12D3KooWJwUy2VBT9V4VrCYnHddWvQw7TKkWN7PoXRSLTQDrYPj", - expectCount: 2, - expectError: false, - }, - { - name: "duplicate peers deduplicated", - input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx", - expectCount: 1, - expectError: false, - }, + { + name: "single peer", + input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj", + expectCount: 1, + expectError: false, + }, + { + name: "multiple peers", + input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj,/ip4/10.0.0.2/tcp/4001/p2p/12D3KooWJzL4SHW3o7sZpzjfEPJzC6Ky7gKvJxY8vQVDR2jHc8F1", + expectCount: 2, + expectError: false, + }, + { + name: "duplicate peers deduplicated", + input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj", + expectCount: 1, + expectError: false, + }, { name: "invalid multiaddr", input: "not-a-multiaddr", diff --git a/pkg/environments/templates/render_test.go b/pkg/environments/templates/render_test.go index df53608..54ee93e 100644 --- a/pkg/environments/templates/render_test.go +++ b/pkg/environments/templates/render_test.go @@ -29,7 +29,6 @@ func TestRenderNodeConfig(t *testing.T) { "id: \"node2\"", "tcp/4002", "rqlite_port: 5002", - "rqlite_raft_port: 7002", "rqlite_join_address: \"localhost:5001\"", bootstrapMultiaddr, "cluster_api_url: \"http://localhost:9104\"",