From patchwork Thu Jan 30 17:38:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2734 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 487ndK2s55z3xyG for ; Thu, 30 Jan 2020 17:38:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 487ndJ56SWz2cs; Thu, 30 Jan 2020 17:38:28 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580405908; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lvfhuRjS16loJY9bhrtWbSmsG2uJd/s7LXzVykIXe7c=; b=s630MIAYs0vIKQZbVxYF41Qjhy2ukgvGYdq2OxbNpmaM81TUn8VIdNc8HdjsmMX6wq4aEj 6NPDFiQLyEKZ1VDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580405908; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lvfhuRjS16loJY9bhrtWbSmsG2uJd/s7LXzVykIXe7c=; b=RkRU7RL6YEMkpn8OM2USFnLIQONqwkNZDhfEZUBmsMRwZueBWTut9+8mmeM+csZGJ5tV5P 6M6YWD97mas2VdogHXWVz+w4+sCtmcWapr4GBUrR0DWwfb7fukcPV/LOCKD7GXs243vPw3 n4ndIRCucsIS85PJDAUGzw96YRZKaLAfEY2JOt5cnrchy0DeynG6rIvm8VCRpt+dRCmy8Z kK2Fd6zQ7iND/UAoL3KZdZ2XGiwwSc7cc/ay+mMIKmNC6DPI6P0ZwPo/rjHkmGHrvak6Kv hGh3nrg55Js/VyPiMzXK69CqoaBqQ6MPHTSr17GB27DyTDBmGCTUQenZhqZAUA== Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 487ndJ2NVGz2xmB; Thu, 30 Jan 2020 17:38:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 487ndF2CDyz2xn1 for ; Thu, 30 Jan 2020 17:38:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 487ndD2YtRz2pL; Thu, 30 Jan 2020 17:38:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580405904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WzxOmvZ4DbMQVJ5lTgan/0v7D5BcRab2JGMmj5JhtRI=; b=7+5n3K7NYAalczdDmtI8O9BvG1YXNoln62BVI/b3OOPBirPRVPtmchtC0+iDZ4qCeWZ+Ga McQui+qCRFM+m3Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580405904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WzxOmvZ4DbMQVJ5lTgan/0v7D5BcRab2JGMmj5JhtRI=; b=JkHThlY12zwmczHV1hyRWaQWuPLBKesVpIUUgc1EYkZPO3AxyIe0izfkU7MBhaDcpFMUEK nt4aKN8/oyW+9aAJ1OyLpjka9y+UETxENmSBoQ3kmxZkw/kmk+Y3gfFQRMPMoCpi9qlNsW oD5RSwpOlby5IuRdkWj7PXHviU2yN9/7Iqe5ocuHz8dgX94aePkMwUxMw1GWj0uHlQuPdl whjGd6F6S5cpklnElMbaOCjyvKfuwc8aeC5+73PnYAjwiH9UJpKmbXh7wC/FR/qvh2NcFm 3kz7FniWq4MCOpX+oq/412nWbhZPo7qnGUcRl+Smf/mWjQI+Cw33QN5SGtd/4w== From: Michael Tremer To: ddns@lists.ipfire.org Subject: [PATCH 1/2] Lightning Wire Labs: Drop authentication using username/password Date: Thu, 30 Jan 2020 17:38:13 +0000 Message-Id: <20200130173814.9364-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: ddns@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List for the IPFire dynamic DNS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ddns-bounces@lists.ipfire.org Sender: "ddns" This is quite dangerous using the main credentials to update DDNS. Hence LWL is dropping this now and only supports authentication using tokens. Signed-off-by: Michael Tremer --- src/ddns/providers.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 661fbcc..95f3dd5 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1227,27 +1227,17 @@ class DDNSProviderLightningWireLabs(DDNSProvider): url = "https://dns.lightningwirelabs.com/update" def update(self): + # Raise an error if no auth details are given. + if not self.token: + raise DDNSConfigurationError + data = { "hostname" : self.hostname, + "token" : self.token, "address6" : self.get_address("ipv6", "-"), "address4" : self.get_address("ipv4", "-"), } - # Check if a token has been set. - if self.token: - data["token"] = self.token - - # Check for username and password. - elif self.username and self.password: - data.update({ - "username" : self.username, - "password" : self.password, - }) - - # Raise an error if no auth details are given. - else: - raise DDNSConfigurationError - # Send update to the server. response = self.send_request(self.url, data=data) From patchwork Thu Jan 30 17:38:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2733 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 487ndK1Hmpz3xYT for ; Thu, 30 Jan 2020 17:38:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 487ndJ0zzfz6Tn; Thu, 30 Jan 2020 17:38:27 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580405908; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=D5F9twBTFOSUYelCSyOphApCnqY1TQSVUvbdESB1XzY=; b=1I4d6lxusmsl0u6nDd8FsegyG6b0BVf4qQKeQINTb0qKc+3T4qyflNs58G7CFfL6exeQLc vBvcfDSvnMyHBmDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580405908; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=D5F9twBTFOSUYelCSyOphApCnqY1TQSVUvbdESB1XzY=; b=C7vTn8Sgp6sy8l7gvxIzNtAhDXeMjjeX9ps61wgbhg/Eqmbyw4X8v62QWivmP8AsAP8gUp FYsrZulmaioJr/h7CaJNPkmeL6AS7kvZOYU/VqmRttV1p/6Aa/glpaeQ3dO/325cw43hoO u32TITZ7P9fSyeste1mhqknpH8jh74YhQLa7pEjB+mQdOjl1Bte0tLD0scKyIM/5uJs0BT MjVf4ElVY2Tp+yyfEpNexO4ypzRZDXkN/ov9ippb8GZzI/KAmXrpFEYxs7K2BuynjcVrA3 s1NcunQR3U4pzeme2M+CtUGpRahs5oap8+gabl1KUGCrlkNMaFs9l6utvMryHw== Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 487ndH0TnWz2xn4; Thu, 30 Jan 2020 17:38:27 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 487ndF3dz1z2xrL for ; Thu, 30 Jan 2020 17:38:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 487ndD5lQHz6Tg; Thu, 30 Jan 2020 17:38:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580405904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yVX10jl12wBidjjWUKCBwtOkGNlETb7V6bwH6fuhY+s=; b=jVxY7CyobKItbmQMM3NFfoBT3XfKsISvjDqBDsIXB70YQK84LYG/IN6wDYrluB9kuDYyNA nrTnn4+3WuvWmJBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580405904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yVX10jl12wBidjjWUKCBwtOkGNlETb7V6bwH6fuhY+s=; b=XnbAMwRqAmFoEjzLlAG1uvRvgOuSNEqjoHrYBeLCAXn3bvS+BzNtkBpu0w9Mb151dnML1R 0O3EYLBpSWdwcimGJVDXmhDue1UEqWNbSbS2pVhqRqADfpqbxzAsosZ4jez7Vr+M2EPXrb Gh1LyKyN3qskcLIXlehAZmC4CeNXCfzx5TqDaruwDj3FYjZQ4YdAK1T2HJnnUdeEQM2j2a yMfKp88ROAJEDk27YUFvjGAkUItqlKhce/ZACkXT4jf3/LSK5dzs1SQ8durfMxAhgyjrgP iItItb8P3Ivx5vgogrVVodSyC/fyHeFTZZbDbs+b0pttgKHHPZ+LFUcBOEGSMw== From: Michael Tremer To: ddns@lists.ipfire.org Subject: [PATCH 2/2] Lightning Wire Labs: Access website using HTTPS Date: Thu, 30 Jan 2020 17:38:14 +0000 Message-Id: <20200130173814.9364-2-michael.tremer@ipfire.org> In-Reply-To: <20200130173814.9364-1-michael.tremer@ipfire.org> References: <20200130173814.9364-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: ddns@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List for the IPFire dynamic DNS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ddns-bounces@lists.ipfire.org Sender: "ddns" Signed-off-by: Michael Tremer --- src/ddns/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 95f3dd5..4154c91 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1219,7 +1219,7 @@ class DDNSProviderGoogle(DDNSProtocolDynDNS2, DDNSProvider): class DDNSProviderLightningWireLabs(DDNSProvider): handle = "dns.lightningwirelabs.com" name = "Lightning Wire Labs DNS Service" - website = "http://dns.lightningwirelabs.com/" + website = "https://dns.lightningwirelabs.com/" # Information about the format of the HTTPS request is to be found # https://dns.lightningwirelabs.com/knowledge-base/api/ddns