From a032d8af475d20c98eb1ea80aa1e94fe6d651d90 Mon Sep 17 00:00:00 2001 From: Brandon Tang Date: Tue, 1 Aug 2017 10:52:35 -0700 Subject: [PATCH] Added transparencyCert, SCT1, SCT2 to tests and jsonschemas, added length requirement for proof --- auslib/blobs/schemas/apprelease-v8.yml | 13 +++++++++++++ auslib/test/blobs/test_apprelease.py | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/auslib/blobs/schemas/apprelease-v8.yml b/auslib/blobs/schemas/apprelease-v8.yml index 770eceb995..c4ee0bb7de 100644 --- a/auslib/blobs/schemas/apprelease-v8.yml +++ b/auslib/blobs/schemas/apprelease-v8.yml @@ -58,6 +58,15 @@ backgroundInterval: type: number description: This decides how quickly or slowly Firefox downloads an MAR. + transparencyCert: + type: string + description: Certificate recieved from script worker used to submit to CT. + SCT1: + type: string + description: Signed certificate timestamp response when valid certificate is submitted to log. + SCT2: + type: string + description: Signed certificate timestamp response when valid certificate is submitted to log. # Top level fileUrls are useful primarily for release style builds, # where the URLs are predictable and only vary by locale and platform. # It"s worth noting that while we normally serve different channels @@ -180,6 +189,8 @@ proof: type: string description: The inclusion proof required for binary transparency test. + minLength: 1 + maxLength: 834 from: type: string description: The release this partial update can be applied to. Should match another release in Balrog"s database. @@ -214,6 +225,8 @@ proof: type: string description: The inclusion proof required for binary transparency test. + minLength: 1 + maxLength: 834 from: type: string description: The release this partial update can be applied to. Should match another release in Balrog"s database. diff --git a/auslib/test/blobs/test_apprelease.py b/auslib/test/blobs/test_apprelease.py index 5f1d0c8070..7db0792f19 100755 --- a/auslib/test/blobs/test_apprelease.py +++ b/auslib/test/blobs/test_apprelease.py @@ -2924,6 +2924,9 @@ def setUp(self): "showNeverForVersion": true, "promptWaitTime": 12345, "backgroundInterval": 123, + "transparencyCert": "cert", + "SCT1": "sct1", + "SCT2": "sct2", "fileUrls": { "c1": { "partials": { @@ -2990,6 +2993,9 @@ def testGetPartialReleaseReferences_Happy_Case(self): "showNeverForVersion": true, "promptWaitTime": 12345, "backgroundInterval": 123, + "transparencyCert": "cert", + "SCT1": "sct1", + "SCT2": "sct2", "fileUrls": { "c1": { "partials": { @@ -3059,7 +3065,8 @@ def testSchema8OptionalAttributes(self): expected_header = '' + 'alertURL="http://example.org/alert/l" promptWaitTime="12345" backgroundInterval="123" ' \ + 'transparencyCert="cert" SCT1="sct1" SCT2="sct2">' expected = [""" """, """