Tighten public receipt acceptance and finalise transport qualification evidence
This commit is contained in:
parent
15a9f96f79
commit
8ee28075e9
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"status": "qualified-on-atlas-installation-pending",
|
||||
"deployment_regression_tests": 67,
|
||||
"deployment_regression_tests": 68,
|
||||
"retained_compressed_release_all_checksums_and_signatures": "passed",
|
||||
"legacy_signed_release_compatibility": "passed",
|
||||
"real_root_filesystem_receipt_boundaries": "passed",
|
||||
|
||||
@ -93,7 +93,7 @@ The next genuine application release is the definitive end-to-end benchmark.
|
||||
worker and its successful activation record is read back, avoiding another full
|
||||
package extraction solely to obtain these facts.
|
||||
|
||||
Focused qualification: **67 deployment regression tests passed**, including all
|
||||
Focused qualification: **68 deployment regression tests passed**, including all
|
||||
previous tests and compression/signature/checksum/corruption/truncation/expansion,
|
||||
unsafe archive, lock, upload failure, timing, receipt/redaction, activation/backup/
|
||||
rollback and permission cases. A real root-owned Atlas filesystem fixture proved
|
||||
|
||||
@ -10,6 +10,7 @@ import threading
|
||||
import time
|
||||
import urllib.request
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import tempfile
|
||||
|
||||
from receipt import Receipt, summary, write_local
|
||||
@ -41,7 +42,10 @@ def public_acceptance(meter):
|
||||
result={}
|
||||
for name,url in [('plotdirector','https://plotdirector.com/'),('catherine','https://catherinelynwood.com/')]:
|
||||
with urllib.request.urlopen(url,timeout=20) as response:
|
||||
require(response.status==200,'Public HTTPS acceptance failed');response.read()
|
||||
require(response.status==200,'Public HTTPS acceptance failed')
|
||||
allowed={'plotdirector.com','www.plotdirector.com'} if name=='plotdirector' else {'catherinelynwood.com','www.catherinelynwood.com'}
|
||||
require(urllib.parse.urlsplit(response.geturl()).hostname in allowed,'Unexpected public acceptance redirect')
|
||||
response.read()
|
||||
result[name]={'status':200,'tls_verified':True}
|
||||
return result
|
||||
|
||||
|
||||
@ -78,4 +78,13 @@ class PipelineTests(unittest.TestCase):
|
||||
self.assertEqual(meter.data['failed_server_operation']['status'],'failed')
|
||||
self.assertNotIn('never-echo',json.dumps(meter.data))
|
||||
|
||||
def test_public_acceptance_does_not_accept_redirect_to_an_unrelated_site(self):
|
||||
class Response:
|
||||
status=200
|
||||
def __enter__(self):return self
|
||||
def __exit__(self,*args):pass
|
||||
def geturl(self):return 'https://unrelated.example/'
|
||||
with patch.object(deploy.urllib.request,'urlopen',return_value=Response()):
|
||||
with self.assertRaises(Refused):deploy.public_acceptance(deploy.Receipt())
|
||||
|
||||
if __name__=='__main__':unittest.main()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user