diff --git a/apps/frontend/src/components/ui/connection-form.tsx b/apps/frontend/src/components/ui/connection-form.tsx index 495e68a8..63971ea7 100644 --- a/apps/frontend/src/components/ui/connection-form.tsx +++ b/apps/frontend/src/components/ui/connection-form.tsx @@ -19,8 +19,8 @@ function ConnectionForm({ onClose }: ConnectionFormProps) { port: "6379", username: "", password: "", - tls: false, - verifyTlsCertificate: false, + tls: true, + verifyTlsCertificate: true, alias: "", }) const [connectionId, setConnectionId] = useState(null) diff --git a/apps/frontend/src/components/ui/connection-modal.tsx b/apps/frontend/src/components/ui/connection-modal.tsx index 15bdbad5..a92abb37 100644 --- a/apps/frontend/src/components/ui/connection-modal.tsx +++ b/apps/frontend/src/components/ui/connection-modal.tsx @@ -162,25 +162,42 @@ export function ConnectionModal({ {showVerifyTlsCertificate ? "Use TLS" : "TLS"} - + {!connectionDetails.tls && ( + + + + Disabling TLS means your connection will not be encrypted. + + + )} {showVerifyTlsCertificate && ( -
- - onConnectionDetailsChange({ - ...connectionDetails, - verifyTlsCertificate: e.target.checked, - }) - } - type="checkbox" - /> - -
+ <> +
+ + onConnectionDetailsChange({ + ...connectionDetails, + verifyTlsCertificate: e.target.checked, + }) + } + type="checkbox" + /> + +
+ {connectionDetails.tls && !connectionDetails.verifyTlsCertificate && ( + + + + Disabling certificate verification makes the connection vulnerable to man-in-the-middle attacks. + + + )} + )} {showConnectionLimitWarning && ( diff --git a/apps/frontend/src/components/ui/edit-form.tsx b/apps/frontend/src/components/ui/edit-form.tsx index 445b9dce..117efeff 100644 --- a/apps/frontend/src/components/ui/edit-form.tsx +++ b/apps/frontend/src/components/ui/edit-form.tsx @@ -35,8 +35,8 @@ function EditForm({ onClose, connectionId }: EditFormProps) { port: "6379", username: "", password: "", - tls: false, - verifyTlsCertificate: false, + tls: true, + verifyTlsCertificate: true, alias: "", }) const [passwordDirty, setPasswordDirty] = useState(false) @@ -49,7 +49,7 @@ function EditForm({ onClose, connectionId }: EditFormProps) { username: currentConnection.username ?? "", password: currentConnection.password ?? "", alias: currentConnection.alias ?? "", - tls: currentConnection.tls ?? false, + tls: currentConnection.tls ?? true, verifyTlsCertificate: currentConnection.verifyTlsCertificate ?? false, //TODO: Add handling and UI for uploading cert caCertPath: currentConnection.caCertPath ?? "", @@ -142,7 +142,7 @@ function EditForm({ onClose, connectionId }: EditFormProps) { onSubmit={handleSubmit} open showConnectionLimitWarning={shouldShowConnectionLimitWarning} - showVerifyTlsCertificate={false} + showVerifyTlsCertificate={true} submitButtonText="Apply Changes" title="Edit Connection" />