Skip to content

Commit 80da7fb

Browse files
committed
Attempt Fulcio e2e test
Signed-off-by: Zach Steindler <[email protected]>
1 parent f6aee43 commit 80da7fb

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/e2e_test.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,38 @@ func TestSignVerifyBundle(t *testing.T) {
877877

878878
args := []string{imgName}
879879
must(cmd.Exec(ctx, args), t)
880+
881+
// Sign image with Fulcio
882+
identityToken, err := getOIDCToken()
883+
if err != nil {
884+
t.Fatal(err)
885+
}
886+
887+
ko = options.KeyOpts{
888+
IDToken: identityToken,
889+
FulcioURL: fulcioURL,
890+
RekorURL: rekorURL,
891+
SkipConfirmation: true,
892+
}
893+
so = options.SignOptions{
894+
Upload: true,
895+
NewBundleFormat: true,
896+
TlogUpload: true,
897+
}
898+
must(sign.SignCmd(ro, ko, so, []string{imgName}), t)
899+
900+
// Verify Fulcio-signed image
901+
cmd = cliverify.VerifyCommand{
902+
CertVerifyOptions: options.CertVerifyOptions{
903+
CertOidcIssuer: os.Getenv("OIDC_URL"),
904+
CertIdentityRegexp: ".+",
905+
},
906+
CommonVerifyOptions: options.CommonVerifyOptions{
907+
TrustedRootPath: trustedRootPath,
908+
},
909+
NewBundleFormat: true,
910+
}
911+
880912
}
881913

882914
func TestAttestVerify(t *testing.T) {

0 commit comments

Comments
 (0)