From ee87fb31ea42f92ab644f1cafa4f822d3c2d29fc Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Tue, 1 Nov 2022 20:42:00 -0500 Subject: [PATCH] Add processing phase tag "AA" for authentication/authorization phase --- gatekeeper.pl | 3 ++- testsuite/lib/gatekeeper.exp | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index 6dce906..6c6292e 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -2445,6 +2445,7 @@ foreach my $packet (@packets) { # each list element is an array reference validate_commands($packet, $oplist); + local $Phase = 'AA'; # Check that we have a keyring for this package: my @keyrings = directory_keyrings($op_header->{directory}); fatal("no keyring for package $op_header->{package}",0) if ($#keyrings < 0); @@ -2458,7 +2459,7 @@ foreach my $packet (@packets) { # each list element is an array reference check_replay($oplist, $sig_info->{sig_creation}); - local $Phase = 'EX'; + $Phase = 'EX'; # do the work execute_commands($oplist); diff --git a/testsuite/lib/gatekeeper.exp b/testsuite/lib/gatekeeper.exp index dc6370a..68a6f75 100644 --- a/testsuite/lib/gatekeeper.exp +++ b/testsuite/lib/gatekeeper.exp @@ -732,7 +732,7 @@ proc analyze_log { base_dir name assess } { exp_continue } # TODO: validate,package-no-config should be unknown-package - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\ no keyring for package ([^\r\n]+)} { # from read_directive_file, if package keyring not found set A(validate,package-no-keys) 1 @@ -751,19 +751,19 @@ proc analyze_log { base_dir name assess } { set A(validate,filename-mismatch-directive) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\ DEBUG: Signature made [^\r\n]+} { # from read_directive_file, reporting signature timestamp set A(validate,signature-timestamp) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\ GPG signed upload from the future - not allowed[^\r\n]+} { # from read_directive_file, if signature timestamp bad set A(validate,future-signature-timestamp) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\ GPG signed upload older than/same timestamp[^\r\n]+} { # from read_directive_file, if signature timestamp bad set A(validate,older-signature-timestamp) 1 @@ -870,35 +870,35 @@ proc analyze_log { base_dir name assess } { exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX)\])?\ + -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX|AA)\])?\ No uploader e-mail address\(es\) to report this error to!} { # from mail, when no email address is provided set A(mail,no-known-address) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX)\])?\ + -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX|AA)\])?\ NOMAIL is set - not sending email to [^\r\n]+} { # from mail, when mail is inhibited set A(mail,inhibited) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX)\])?\ + -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX|AA)\])?\ Sending email to [^\r\n]+} { # from mail, recording address list set A(mail,addresses) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX)\])?\ + -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX|AA)\])?\ Subject: [^\r\n]+} { # from mail, outgoing Subject line exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX)\])?\ + -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX|AA)\])?\ Error uploading package: [^\r\n]+} { # from mail, when a generic failure is reported exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX)\])?\ + -re {^gatekeeper\[[0-9]+\]: \(Test\)(?: \[(?:RP|EX|AA)\])?\ Body: [^\r\n]+} { # from mail, recording outgoing message body exp_continue -- 2.25.1