Re: [Trans] Add get_entries_max_limit attribute to get-sth request
Al Cutter <al@google.com> Mon, 04 February 2019 12:02 UTC
Return-Path: <alcutter@google.com>
X-Original-To: trans@ietfa.amsl.com
Delivered-To: trans@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
by ietfa.amsl.com (Postfix) with ESMTP id C9FD712875B
for <trans@ietfa.amsl.com>; Mon, 4 Feb 2019 04:02:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.142
X-Spam-Level:
X-Spam-Status: No, score=-17.142 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.142, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5,
USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key)
header.d=google.com
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 A-u_m_qr8mAt for <trans@ietfa.amsl.com>;
Mon, 4 Feb 2019 04:02:03 -0800 (PST)
Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com
[IPv6:2a00:1450:4864:20::52e])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 7F150130DE4
for <trans@ietf.org>; Mon, 4 Feb 2019 04:02:02 -0800 (PST)
Received: by mail-ed1-x52e.google.com with SMTP id g22so10997806edr.7
for <trans@ietf.org>; Mon, 04 Feb 2019 04:02:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=sPnbV9qIfmhmOk88hrP0I/Q3CaxbN5jws0MBe5Sp6Cg=;
b=iAeR2YcFZNn1Z5Kd05/yn0oGisrd2OHHMX5Mof9vndEMo520bEnddWtpZQP2u6EkAE
8K00xALks2tTuA4kbmXigcaCZY3r6LZ3Rb70PdiKE0PbEVGHQRPh9Y8+iOWxg02+evvJ
sYTuMV+WNvIKtcpsf0L7IAb+98KvFL+wnnf7e7ao9a7LogDYiflqZ2WcBU0RcGdRXfgl
wvZdQxqF25s3/ufeBuay8AQLg+57IvaSBvIIYvGzwfi0KCrVqD0MpXlVwn72mMwjfPz7
/hIYgmpOvu5SMTXiuuwYJSwC8ER5uiUW6Dt6wHpLhqv7fMIMDX0sCHICG7S+tFoJExhT
2vFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=sPnbV9qIfmhmOk88hrP0I/Q3CaxbN5jws0MBe5Sp6Cg=;
b=qlT6ZC4bbp5BcYKSS0vvJ2Tq6Ta0N5ngFwv8gQTzttga+PFkoH9o1QCxYxluwooAZ/
3fOb6zwxhsWnnqIORQMlu1y2AdNuS/8T6lihDBePLPsPZXVieVs+pd6z+EcUovcKYXaF
b/yBvKawAiQX44CJMH2rMKDe2+NLsdOxjsC3f4SoRj80w8B4u3uPqSJwCeUmfDRt4NoW
/7DTWUoJsp9gvq+TM3X0FCXpCPYPcsyYHAKpAqVP0bZZCy+/kUc9i8QMda5UwXqjZt7x
8UcMvHfMk6msyz5rm2oUaLU2oRb9u9t5teneP5IhK8VWGsbKjYhbOqnrNUzNHt48kE3w
Zb7A==
X-Gm-Message-State: AJcUukc4gAUQZCZ107a30M6Es17y1MeRmDPXlNw7Lko0hj77pL+XULAj
IFJnrlWHjLXuebF9yAcdJqml+Iip4D+CELfO6azc3A==
X-Google-Smtp-Source: ALg8bN5+pS8eW/yS6a00NaplLOBYeLdV3x1VEc/k1nUz2JEyevYkKAEi/d+KidHeDckUxIQFhCmn3HtWklXw/sPn1XE=
X-Received: by 2002:a17:906:3e48:: with SMTP id
t8mr37643845eji.149.1549281720547;
Mon, 04 Feb 2019 04:02:00 -0800 (PST)
MIME-Version: 1.0
References: <CAAuMfY_2fxJO1mAQS0=pOgmGvNa5AtmZp3TZPvndoLngjVZyrw@mail.gmail.com>
In-Reply-To: <CAAuMfY_2fxJO1mAQS0=pOgmGvNa5AtmZp3TZPvndoLngjVZyrw@mail.gmail.com>
From: Al Cutter <al@google.com>
Date: Mon, 4 Feb 2019 12:01:46 +0000
Message-ID: <CACM=_OdxtMtoQFp_wKz6c1E=9a51cR6xRVgbHUjJpQCSS-5fOA@mail.gmail.com>
To: =?UTF-8?B?VsOhY2xhdiBKaXJvdnNrw70=?= <vaclav.jirovsky@gmail.com>
Cc: Trans <trans@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000009cbfe605811042c8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/trans/8kgki5AfMY6yCvVGel4kA4OPmKc>
Subject: Re: [Trans] Add get_entries_max_limit attribute to get-sth request
X-BeenThere: trans@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Public Notary Transparency working group discussion list
<trans.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/trans>,
<mailto:trans-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/trans/>
List-Post: <mailto:trans@ietf.org>
List-Help: <mailto:trans-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/trans>,
<mailto:trans-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Feb 2019 12:02:10 -0000
Hi Vaclav, I think there might be other ways of achieving what you're after. On Mon, 4 Feb 2019, 10:19 Václav Jirovský, <vaclav.jirovsky@gmail.com> wrote: > Hello all, > > I would like to propose modification Retrieve Latest Signed Tree Head section > of RFC6962 - adding new attribute *get_entries_max_limit.* > > Reason for this change - 4.6 section actual version: > > * Logs MAY restrict the number of entries that can be retrieved per > "get-entries" request. If a client requests more than the permitted > number of entries, the log SHALL return the maximum number of entries > permissible. These entries SHALL be sequential beginning with the > entry specified by "start". > * > > > If you want to download all entries from CT server, you don't what number > of entries will server return to you by request - so you have to process, > count real number of returned entries and after that, you can do another > request. This is not efficient, you could do these request in parallel, if > you would have garanteed number of returned entries. > Perhaps you could call get-sth to learn the current tree size, then divide the range from what you currently have to the log's actual tree size into N subranges, start N workers each repeatedly calling get-entries always with start=first entry they don't yet have for their subrange, and end=limit of their allocated subrange until they have fetched all of their allocated entries? That seems like it might give you the parallelism you're after? > *Proposed modification:* > > > 4.3 <https://tools.ietf.org/html/rfc6962#section-4.3>. Retrieve Latest Signed Tree Head > > GET https://<log server>/ct/v1/get-sth > No inputs. > > Outputs: > > tree_size: The size of the tree, in entries, in decimal. > timestamp: The timestamp, in decimal. > sha256_root_hash: The Merkle Tree Hash of the tree, in base64. > > * get_entries_max_limit: Maximum entries count provided by server get-entries method.* > > tree_head_signature: A TreeHeadSignature for the above data. > > > 4.6 <https://tools.ietf.org/html/rfc6962#section-4.6>. Retrieve Entries from Log > > GET https://<log server>/ct/v1/get-entries > > > Inputs: > start: 0-based index of first entry to retrieve, in decimal. > end: 0-based index of last entry to retrieve, in decimal. > > > ..... > > > Logs MAY restrict the number of entries that can be retrieved per > "get-entries" request. *If a client requests more than the permitted > number of entries ("get_entries_max_limit" output of "get-sth" request),* > > * the log SHALL return the maximum number of entries > permissible. If a client requests less or equal than the permitted > number of entries ("get_entries_max_limit" output of "get-sth" request), > the log MUST return the maximum number of entries permissible. * > These entries SHALL be sequential beginning with the > > entry specified by "start". > > It seems like you're optimising for a very specific use case - if I just want to inspect one entry (e.g. a monitor tells me "hey, there's a cert for your domain at entry X) I might have to download 1000s of certs just to fetch the one I'm interested in? Also, what happens when I just want to request the last few entries from the tree? (Perhaps there's a typo in your proposal?) Just because I happen to have an STH with a given "get_entries_max_limit" it doesn't mean that the log didn't change that limit between when the STH was created and when I make a request so I'd have to have logic to cope anyway - log operators may wish to adjust this limit dynamically/from time to time in order to react to usage patterns or resource consumption/availability etc. Cheers, Al. > > Best, > > Vaclav Jirovsky > > > _______________________________________________ > Trans mailing list > Trans@ietf.org > https://www.ietf.org/mailman/listinfo/trans >
- [Trans] Add get_entries_max_limit attribute to ge… Václav Jirovský
- Re: [Trans] Add get_entries_max_limit attribute t… Al Cutter
- Re: [Trans] Add get_entries_max_limit attribute t… Václav Jirovský
- Re: [Trans] Add get_entries_max_limit attribute t… Al Cutter
- Re: [Trans] Add get_entries_max_limit attribute t… Paul Wouters