diff --git a/test/e2e/suite/conformance/certificates/acme/acme.go b/test/e2e/suite/conformance/certificates/acme/acme.go index b4d3f19ca..0c923596e 100644 --- a/test/e2e/suite/conformance/certificates/acme/acme.go +++ b/test/e2e/suite/conformance/certificates/acme/acme.go @@ -38,6 +38,7 @@ var _ = framework.ConformanceDescribe("Certificates", func() { certificates.IPAddressFeature, certificates.DurationFeature, certificates.WildcardsFeature, + certificates.URISANsFeature, ) // unsupportedDNS01Features is a list of features that are not supported by the ACME @@ -45,6 +46,7 @@ var _ = framework.ConformanceDescribe("Certificates", func() { var unsupportedDNS01Features = certificates.NewFeatureSet( certificates.IPAddressFeature, certificates.DurationFeature, + certificates.URISANsFeature, ) provisionerHTTP01 := new(acmeIssuerProvisioner) diff --git a/test/e2e/suite/conformance/certificates/featureset.go b/test/e2e/suite/conformance/certificates/featureset.go index 0731f24a3..f4e97ea25 100644 --- a/test/e2e/suite/conformance/certificates/featureset.go +++ b/test/e2e/suite/conformance/certificates/featureset.go @@ -98,4 +98,8 @@ const ( // certificates for the same private key. This is useful for some issuers // that have trouble being configured to support this feature. ReusePrivateKeyFeature Feature = "ReusePrivateKey" + + // URISANs denotes whether to the target issuer is able to sign a certificate + // that includes a URISANs. ACME providers do not support this. + URISANsFeature Feature = "URISANs" ) diff --git a/test/e2e/suite/conformance/certificates/suite.go b/test/e2e/suite/conformance/certificates/suite.go index 25264572e..9c4f9c20f 100644 --- a/test/e2e/suite/conformance/certificates/suite.go +++ b/test/e2e/suite/conformance/certificates/suite.go @@ -252,6 +252,34 @@ func (s *Suite) Define() { Expect(err).NotTo(HaveOccurred()) }) + It("should issue a certificate that includes only a URISANs name", func() { + s.checkFeatures(URISANsFeature) + + testCertificate := &cmapi.Certificate{ + ObjectMeta: metav1.ObjectMeta{ + Name: "testcert", + Namespace: f.Namespace.Name, + }, + Spec: cmapi.CertificateSpec{ + SecretName: "testcert-tls", + URISANs: []string{ + "spiffe://cluster.local/ns/sandbox/sa/foo", + }, + IssuerRef: issuerRef, + }, + } + By("Creating a Certificate") + err := f.CRClient.Create(ctx, testCertificate) + Expect(err).NotTo(HaveOccurred()) + + By("Waiting for the Certificate to be issued...") + err = f.Helper().WaitCertificateIssuedValid(f.Namespace.Name, "testcert", time.Minute*5) + Expect(err).NotTo(HaveOccurred()) + + err = f.Helper().WaitCertificateIssuedValid(f.Namespace.Name, "testcert", time.Minute*5) + Expect(err).NotTo(HaveOccurred()) + }) + It("should issue another certificate with the same private key if the existing certificate and CertificateRequest are deleted", func() { s.checkFeatures(ReusePrivateKeyFeature)