Re: [DNSOP] DNS cookies and multi-vendor anycast incompatibility

Mukund Sivaraman <muks@mukund.org> Sat, 23 June 2018 02:48 UTC

Return-Path: <muks@mukund.org>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C92B130F2D for <dnsop@ietfa.amsl.com>; Fri, 22 Jun 2018 19:48:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bHmZmfZ9VL8s for <dnsop@ietfa.amsl.com>; Fri, 22 Jun 2018 19:48:53 -0700 (PDT)
Received: from mail.banu.com (mail.banu.com [46.4.129.225]) by ietfa.amsl.com (Postfix) with ESMTP id 1B945130DF0 for <dnsop@ietf.org>; Fri, 22 Jun 2018 19:48:52 -0700 (PDT)
Received: from jurassic (unknown [182.156.99.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.banu.com (Postfix) with ESMTPSA id B49E032C0935; Sat, 23 Jun 2018 02:48:47 +0000 (UTC)
Date: Sat, 23 Jun 2018 08:18:40 +0530
From: Mukund Sivaraman <muks@mukund.org>
To: Warren Kumari <warren@kumari.net>
Cc: Evan Hunt <each@isc.org>, dnsop <dnsop@ietf.org>, Paul Wouters <paul@nohats.ca>, daniel.salzman@nic.cz
Message-ID: <20180623024840.GA25981@jurassic>
References: <c70f058c-8e82-f905-e352-f3e2fd0d4cfc@nic.cz> <alpine.LRH.2.21.1806201006530.6077@bofh.nohats.ca> <107c3532-a07d-9821-70ab-94c00a9dd2f0@nic.cz> <F6CB5212-461C-4E91-8E56-43B9E6377A7C@isc.org> <CAHw9_iLdsTPjxwm6Tpah0kMXwwM894SG+407Muv3AcN3js-ZbQ@mail.gmail.com> <20180623002916.GD83312@isc.org> <CAHw9_iJqt7QVaCRJijm_TXPN7JDJQRPuUdW9ef96dzgQm43nXQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAHw9_iJqt7QVaCRJijm_TXPN7JDJQRPuUdW9ef96dzgQm43nXQ@mail.gmail.com>
User-Agent: Mutt/1.9.2 (2017-12-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/e2Mpe_P2TAEp33ys9yHTEmsfFBE>
Subject: Re: [DNSOP] DNS cookies and multi-vendor anycast incompatibility
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 23 Jun 2018 02:48:56 -0000

On Fri, Jun 22, 2018 at 10:26:55PM -0400, Warren Kumari wrote:
> I have not tried configuring cookie on Knot, but looking
> in alg_containers.c, I can configure:
> { 0, "FNV-64" },
> { 1, "HMAC-SHA256-64" }
> 
> Under BIND:
> cookie-algorithm:
> Set the algorithm to be used when generating the server cookie. One of
> "aes", "sha1"
> or "sha256". The default is "aes" if supported by the cryptographic library
> or otherwise
> "sha256".
> 
> So, if I set both to use their (non-default) of SHA256 (and set the same
> secret:-)) do they actually generate compatible cookies?
> I'd guess / assume so, but I haven't tested this...

BTW, speaking of secret, section 7.1 (Client and Server Secret Rollover)
of RFC 7873 says this:

   The longer a secret is used, the higher the probability that it has
   been compromised.  Thus, clients and servers are configured with a
   lifetime setting for their secret, and they roll over to a new secret
   when that lifetime expires, or earlier due to deliberate jitter as
   described below.  The default lifetime is one day, and the maximum
   permitted is one month.

I don't think BIND has any support for automatic secret
rollovers. Re-configuring the secret manually per-day is not realistic
for a nameserver cluster.. at least it would be inconvenient and require
external tooling.

There should be a specification of KDF usage for this to work across
implementations.

		Mukund