ra: Remove DnsNames from NewOrderRequest (#8100)

Remove the deprecated `DnsNames` field from the `NewOrderRequest`
struct. All users of this struct use `Identifier` instead.

Part of #7311
This commit is contained in:
James Renken 2025-04-07 23:48:58 -04:00 committed by GitHub
parent 767abc73a4
commit 1e00ee58b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 113 additions and 216 deletions

View File

@ -663,8 +663,6 @@ type NewOrderRequest struct {
// Next unused field number: 9 // Next unused field number: 9
RegistrationID int64 `protobuf:"varint,1,opt,name=registrationID,proto3" json:"registrationID,omitempty"` RegistrationID int64 `protobuf:"varint,1,opt,name=registrationID,proto3" json:"registrationID,omitempty"`
// TODO(#7311): dnsNames are being deprecated in favour of identifiers.
DnsNames []string `protobuf:"bytes,2,rep,name=dnsNames,proto3" json:"dnsNames,omitempty"`
Identifiers []*proto.Identifier `protobuf:"bytes,8,rep,name=identifiers,proto3" json:"identifiers,omitempty"` Identifiers []*proto.Identifier `protobuf:"bytes,8,rep,name=identifiers,proto3" json:"identifiers,omitempty"`
CertificateProfileName string `protobuf:"bytes,5,opt,name=certificateProfileName,proto3" json:"certificateProfileName,omitempty"` CertificateProfileName string `protobuf:"bytes,5,opt,name=certificateProfileName,proto3" json:"certificateProfileName,omitempty"`
// Replaces is the ARI certificate Id that this order replaces. // Replaces is the ARI certificate Id that this order replaces.
@ -712,13 +710,6 @@ func (x *NewOrderRequest) GetRegistrationID() int64 {
return 0 return 0
} }
func (x *NewOrderRequest) GetDnsNames() []string {
if x != nil {
return x.DnsNames
}
return nil
}
func (x *NewOrderRequest) GetIdentifiers() []*proto.Identifier { func (x *NewOrderRequest) GetIdentifiers() []*proto.Identifier {
if x != nil { if x != nil {
return x.Identifiers return x.Identifiers
@ -1018,113 +1009,112 @@ var file_ra_proto_rawDesc = []byte{
0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64,
0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65,
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x18, 0x07, 0x20, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x18, 0x07, 0x20,
0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x72, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x22, 0x91, 0x02, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x72, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x22, 0xfb, 0x01,
0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73,
0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x32, 0x0a, 0x0b, 0x69, 0x64, 0x65,
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
0x69, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x72, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a,
0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x64, 0x16, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x65, 0x72, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63,
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x65, 0x72, 0x74, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72,
0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61,
0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x53, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x29, 0x0a, 0x17, 0x47,
0x65, 0x72, 0x69, 0x61, 0x6c, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x07, 0x22, 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21,
0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65,
0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x73, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03,
0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x73, 0x72, 0x18, 0x02, 0x63, 0x73, 0x72, 0x22, 0x3f, 0x0a, 0x15, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x73, 0x72, 0x22, 0x3f, 0x0a, 0x15, 0x55, 0x6e, 0x70, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e,
0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01,
0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x2e, 0x0a, 0x16, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41,
0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x2e, 0x0a, 0x16, 0x55, 0x6e, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xaa, 0x08, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xaa, 0x08, 0x0a, 0x15, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b,
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x6e, 0x12, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67,
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x19, 0x55,
0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x00, 0x12, 0x57, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x70,
0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x24,
0x2e, 0x72, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69,
0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x15, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x4b, 0x65, 0x79, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12,
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x16, 0x44, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x2e,
0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x72, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x16, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76,
0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x48, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x0a, 0x11, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x21, 0x2e, 0x72, 0x61, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52,
0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x72, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x66,
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x17, 0x44, 0x65, 0x61, 0x63, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e,
0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x72, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f,
0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x17, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
0x22, 0x00, 0x12, 0x53, 0x0a, 0x15, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e,
0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x15,
0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b,
0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x00, 0x12, 0x47, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42,
0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65,
0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x21, 0x41, 0x64,
0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x52, 0x65,
0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12,
0x2c, 0x2e, 0x72, 0x61, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74,
0x69, 0x76, 0x65, 0x6c, 0x79, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x4f, 0x72,
0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65,
0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x75,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x72, 0x61,
0x12, 0x6b, 0x0a, 0x21, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
0x76, 0x65, 0x6c, 0x79, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12,
0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x38, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0c, 0x47, 0x65, 0x6e,
0x08, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x2e, 0x4e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, 0x12, 0x17, 0x2e, 0x72, 0x61, 0x2e, 0x47,
0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x61, 0x2e, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x73, 0x70,
0x10, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73,
0x6e, 0x12, 0x1b, 0x2e, 0x72, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x6e,
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65,
0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x00, 0x32, 0x3b, 0x0a, 0x0b, 0x53, 0x43, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x43, 0x54, 0x73, 0x12, 0x0e, 0x2e, 0x72, 0x61,
0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x72, 0x61,
0x3b, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, 0x12, 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x29,
0x17, 0x2e, 0x72, 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x74,
0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x61, 0x2e, 0x4f, 0x43, 0x73, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, 0x62, 0x6f, 0x75, 0x6c, 0x64, 0x65, 0x72,
0x53, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, 0x2f, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x33,
0x2e, 0x72, 0x61, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x55,
0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x3b, 0x0a, 0x0b, 0x53, 0x43, 0x54, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x43, 0x54,
0x73, 0x12, 0x0e, 0x2e, 0x72, 0x61, 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0f, 0x2e, 0x72, 0x61, 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x74, 0x73, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, 0x62,
0x6f, 0x75, 0x6c, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -102,8 +102,7 @@ message AdministrativelyRevokeCertificateRequest {
message NewOrderRequest { message NewOrderRequest {
// Next unused field number: 9 // Next unused field number: 9
int64 registrationID = 1; int64 registrationID = 1;
// TODO(#7311): dnsNames are being deprecated in favour of identifiers. reserved 2; // previously dnsNames
repeated string dnsNames = 2;
repeated core.Identifier identifiers = 8; repeated core.Identifier identifiers = 8;
string certificateProfileName = 5; string certificateProfileName = 5;
// Replaces is the ARI certificate Id that this order replaces. // Replaces is the ARI certificate Id that this order replaces.

View File

@ -2290,7 +2290,7 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New
return nil, errIncompleteGRPCRequest return nil, errIncompleteGRPCRequest
} }
idents := identifier.Normalize(identifier.FromProtoSliceWithDefault(req)) idents := identifier.Normalize(identifier.FromProtoSlice(req.Identifiers))
profile, err := ra.profiles.get(req.CertificateProfileName) profile, err := ra.profiles.get(req.CertificateProfileName)
if err != nil { if err != nil {

View File

@ -1368,7 +1368,6 @@ func TestNewOrder(t *testing.T) {
orderA, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ orderA, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
CertificateProfileName: "test", CertificateProfileName: "test",
DnsNames: []string{"b.com", "a.com", "a.com", "C.COM"},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
@ -1379,11 +1378,10 @@ func TestNewOrder(t *testing.T) {
test.AssertNotError(t, err, "ra.NewOrder failed") test.AssertNotError(t, err, "ra.NewOrder failed")
test.AssertEquals(t, orderA.RegistrationID, int64(1)) test.AssertEquals(t, orderA.RegistrationID, int64(1))
test.AssertEquals(t, orderA.Expires.AsTime(), now.Add(ra.profiles.def().orderLifetime)) test.AssertEquals(t, orderA.Expires.AsTime(), now.Add(ra.profiles.def().orderLifetime))
test.AssertEquals(t, len(orderA.DnsNames), 3)
test.AssertEquals(t, len(orderA.Identifiers), 3) test.AssertEquals(t, len(orderA.Identifiers), 3)
test.AssertEquals(t, orderA.CertificateProfileName, "test") test.AssertEquals(t, orderA.CertificateProfileName, "test")
// We expect the order names to have been sorted, deduped, and lowercased // We expect the order's identifier values to have been sorted,
test.AssertDeepEquals(t, orderA.DnsNames, []string{"a.com", "b.com", "c.com"}) // deduplicated, and lowercased.
test.AssertDeepEquals(t, orderA.Identifiers, []*corepb.Identifier{ test.AssertDeepEquals(t, orderA.Identifiers, []*corepb.Identifier{
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
@ -1395,38 +1393,12 @@ func TestNewOrder(t *testing.T) {
_, err = ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ _, err = ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a"},
Identifiers: []*corepb.Identifier{identifier.NewDNS("a").ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS("a").ToProto()},
}) })
test.AssertError(t, err, "NewOrder with invalid names did not error") test.AssertError(t, err, "NewOrder with invalid names did not error")
test.AssertEquals(t, err.Error(), "Cannot issue for \"a\": Domain name needs at least one dot") test.AssertEquals(t, err.Error(), "Cannot issue for \"a\": Domain name needs at least one dot")
} }
// TestNewOrder_Identifiers tests that NewOrder works when other microservices
// don't yet understand Identifiers, or have stopped understanding DnsNames.
func TestNewOrder_Identifiers(t *testing.T) {
_, _, ra, _, _, cleanUp := initAuthorities(t)
defer cleanUp()
_, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id,
CertificateProfileName: "test",
DnsNames: []string{"a.com"},
})
if err != nil {
t.Errorf("ra.NewOrder failed without Identifiers: %#v", err)
}
_, err = ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id,
CertificateProfileName: "test",
Identifiers: []*corepb.Identifier{identifier.NewDNS("a.com").ToProto()},
})
if err != nil {
t.Errorf("ra.NewOrder failed without DnsNames: %#v", err)
}
}
// TestNewOrder_OrderReuse tests that subsequent requests by an ACME account to create // TestNewOrder_OrderReuse tests that subsequent requests by an ACME account to create
// an identical order results in only one order being created & subsequently // an identical order results in only one order being created & subsequently
// reused. // reused.
@ -1435,7 +1407,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
defer cleanUp() defer cleanUp()
// Create an initial order with regA and names // Create an initial order with regA and names
names := []string{"zombo.com", "welcome.to.zombo.com"}
idents := identifier.ACMEIdentifiers{ idents := identifier.ACMEIdentifiers{
identifier.NewDNS("zombo.com"), identifier.NewDNS("zombo.com"),
identifier.NewDNS("welcome.to.zombo.com"), identifier.NewDNS("welcome.to.zombo.com"),
@ -1443,7 +1414,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
orderReq := &rapb.NewOrderRequest{ orderReq := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: names,
Identifiers: idents.ToProtoSlice(), Identifiers: idents.ToProtoSlice(),
CertificateProfileName: "test", CertificateProfileName: "test",
} }
@ -1463,7 +1433,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
testCases := []struct { testCases := []struct {
Name string Name string
RegistrationID int64 RegistrationID int64
DnsNames []string
Identifiers identifier.ACMEIdentifiers Identifiers identifier.ACMEIdentifiers
Profile string Profile string
ExpectReuse bool ExpectReuse bool
@ -1471,7 +1440,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
{ {
Name: "Duplicate order, same regID", Name: "Duplicate order, same regID",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: names,
Identifiers: idents, Identifiers: idents,
Profile: "test", Profile: "test",
// We expect reuse since the order matches firstOrder // We expect reuse since the order matches firstOrder
@ -1480,7 +1448,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
{ {
Name: "Subset of order names, same regID", Name: "Subset of order names, same regID",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: names[:1],
Identifiers: idents[:1], Identifiers: idents[:1],
Profile: "test", Profile: "test",
// We do not expect reuse because the order names don't match firstOrder // We do not expect reuse because the order names don't match firstOrder
@ -1489,7 +1456,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
{ {
Name: "Superset of order names, same regID", Name: "Superset of order names, same regID",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: append(names, "blog.zombo.com"),
Identifiers: append(idents, identifier.NewDNS("blog.zombo.com")), Identifiers: append(idents, identifier.NewDNS("blog.zombo.com")),
Profile: "test", Profile: "test",
// We do not expect reuse because the order names don't match firstOrder // We do not expect reuse because the order names don't match firstOrder
@ -1498,7 +1464,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
{ {
Name: "Missing profile, same regID", Name: "Missing profile, same regID",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: append(names, "blog.zombo.com"),
Identifiers: append(idents, identifier.NewDNS("blog.zombo.com")), Identifiers: append(idents, identifier.NewDNS("blog.zombo.com")),
// We do not expect reuse because the profile is missing // We do not expect reuse because the profile is missing
ExpectReuse: false, ExpectReuse: false,
@ -1506,7 +1471,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
{ {
Name: "Missing profile, same regID", Name: "Missing profile, same regID",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: append(names, "blog.zombo.com"),
Identifiers: append(idents, identifier.NewDNS("blog.zombo.com")), Identifiers: append(idents, identifier.NewDNS("blog.zombo.com")),
Profile: "different", Profile: "different",
// We do not expect reuse because a different profile is specified // We do not expect reuse because a different profile is specified
@ -1515,7 +1479,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
{ {
Name: "Duplicate order, different regID", Name: "Duplicate order, different regID",
RegistrationID: secondReg.Id, RegistrationID: secondReg.Id,
DnsNames: names,
Identifiers: idents, Identifiers: idents,
Profile: "test", Profile: "test",
// We do not expect reuse because the order regID differs from firstOrder // We do not expect reuse because the order regID differs from firstOrder
@ -1529,7 +1492,6 @@ func TestNewOrder_OrderReuse(t *testing.T) {
// Add the order for the test request // Add the order for the test request
order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: tc.RegistrationID, RegistrationID: tc.RegistrationID,
DnsNames: tc.DnsNames,
Identifiers: tc.Identifiers.ToProtoSlice(), Identifiers: tc.Identifiers.ToProtoSlice(),
CertificateProfileName: tc.Profile, CertificateProfileName: tc.Profile,
}) })
@ -1562,7 +1524,6 @@ func TestNewOrder_OrderReuse_Expired(t *testing.T) {
// Create an initial order. // Create an initial order.
extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a.com", "b.com"},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
@ -1577,7 +1538,6 @@ func TestNewOrder_OrderReuse_Expired(t *testing.T) {
// Now a new order for the same names should not reuse the first one. // Now a new order for the same names should not reuse the first one.
new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a.com", "b.com"},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
@ -1597,7 +1557,6 @@ func TestNewOrder_OrderReuse_Invalid(t *testing.T) {
// Create an initial order. // Create an initial order.
extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a.com", "b.com"},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
@ -1615,7 +1574,6 @@ func TestNewOrder_OrderReuse_Invalid(t *testing.T) {
// Now a new order for the same names should not reuse the first one. // Now a new order for the same names should not reuse the first one.
new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a.com", "b.com"},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
@ -1638,7 +1596,6 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
) )
extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{pending, valid, invalid},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS(pending).ToProto(), identifier.NewDNS(pending).ToProto(),
identifier.NewDNS(valid).ToProto(), identifier.NewDNS(valid).ToProto(),
@ -1675,7 +1632,6 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
testCases := []struct { testCases := []struct {
Name string Name string
RegistrationID int64 RegistrationID int64
DnsName string
Identifier identifier.ACMEIdentifier Identifier identifier.ACMEIdentifier
Profile string Profile string
ExpectReuse bool ExpectReuse bool
@ -1683,28 +1639,24 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
{ {
Name: "Reuse pending authz", Name: "Reuse pending authz",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsName: pending,
Identifier: identifier.NewDNS(pending), Identifier: identifier.NewDNS(pending),
ExpectReuse: true, // TODO(#7715): Invert this. ExpectReuse: true, // TODO(#7715): Invert this.
}, },
{ {
Name: "Reuse valid authz", Name: "Reuse valid authz",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsName: valid,
Identifier: identifier.NewDNS(valid), Identifier: identifier.NewDNS(valid),
ExpectReuse: true, ExpectReuse: true,
}, },
{ {
Name: "Don't reuse invalid authz", Name: "Don't reuse invalid authz",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsName: invalid,
Identifier: identifier.NewDNS(invalid), Identifier: identifier.NewDNS(invalid),
ExpectReuse: false, ExpectReuse: false,
}, },
{ {
Name: "Don't reuse valid authz with wrong profile", Name: "Don't reuse valid authz with wrong profile",
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsName: valid,
Identifier: identifier.NewDNS(valid), Identifier: identifier.NewDNS(valid),
Profile: "test", Profile: "test",
ExpectReuse: false, ExpectReuse: false,
@ -1712,7 +1664,6 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
{ {
Name: "Don't reuse valid authz from other acct", Name: "Don't reuse valid authz from other acct",
RegistrationID: secondReg.Id, RegistrationID: secondReg.Id,
DnsName: valid,
Identifier: identifier.NewDNS(valid), Identifier: identifier.NewDNS(valid),
ExpectReuse: false, ExpectReuse: false,
}, },
@ -1722,7 +1673,6 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
t.Run(tc.Name, func(t *testing.T) { t.Run(tc.Name, func(t *testing.T) {
new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: tc.RegistrationID, RegistrationID: tc.RegistrationID,
DnsNames: []string{tc.DnsName},
Identifiers: []*corepb.Identifier{tc.Identifier.ToProto()}, Identifiers: []*corepb.Identifier{tc.Identifier.ToProto()},
CertificateProfileName: tc.Profile, CertificateProfileName: tc.Profile,
}) })
@ -1730,9 +1680,9 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
test.AssertNotEquals(t, new.Id, extant.Id) test.AssertNotEquals(t, new.Id, extant.Id)
if tc.ExpectReuse { if tc.ExpectReuse {
test.AssertEquals(t, new.V2Authorizations[0], extantAuthzs[tc.DnsName]) test.AssertEquals(t, new.V2Authorizations[0], extantAuthzs[tc.Identifier.Value])
} else { } else {
test.AssertNotEquals(t, new.V2Authorizations[0], extantAuthzs[tc.DnsName]) test.AssertNotEquals(t, new.V2Authorizations[0], extantAuthzs[tc.Identifier.Value])
} }
}) })
} }
@ -1754,7 +1704,6 @@ func TestNewOrder_AuthzReuse_NoPending(t *testing.T) {
// Create an initial order and two pending authzs. // Create an initial order and two pending authzs.
extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ extant, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a.com", "b.com"},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("a.com").ToProto(), identifier.NewDNS("a.com").ToProto(),
identifier.NewDNS("b.com").ToProto(), identifier.NewDNS("b.com").ToProto(),
@ -1766,7 +1715,6 @@ func TestNewOrder_AuthzReuse_NoPending(t *testing.T) {
// should not reuse the existing pending authz. // should not reuse the existing pending authz.
new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ new, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"a.com"},
Identifiers: []*corepb.Identifier{identifier.NewDNS("a.com").ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS("a.com").ToProto()},
}) })
test.AssertNotError(t, err, "creating test order") test.AssertNotError(t, err, "creating test order")
@ -1821,11 +1769,9 @@ func TestNewOrder_ValidationProfiles(t *testing.T) {
}, },
} { } {
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
domain := randomDomain()
order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{domain}, Identifiers: []*corepb.Identifier{identifier.NewDNS(randomDomain()).ToProto()},
Identifiers: []*corepb.Identifier{identifier.NewDNS(domain).ToProto()},
CertificateProfileName: tc.profile, CertificateProfileName: tc.profile,
}) })
if err != nil { if err != nil {
@ -1891,12 +1837,9 @@ func TestNewOrder_ProfileSelectionAllowList(t *testing.T) {
"test": &tc.profile, "test": &tc.profile,
} }
domain := randomDomain()
orderReq := &rapb.NewOrderRequest{ orderReq := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{domain}, Identifiers: []*corepb.Identifier{identifier.NewDNS(randomDomain()).ToProto()},
Identifiers: []*corepb.Identifier{identifier.NewDNS(domain).ToProto()},
CertificateProfileName: "test", CertificateProfileName: "test",
} }
_, err := ra.NewOrder(context.Background(), orderReq) _, err := ra.NewOrder(context.Background(), orderReq)
@ -1994,7 +1937,6 @@ func TestNewOrderAuthzReuseSafety(t *testing.T) {
defer cleanUp() defer cleanUp()
ctx := context.Background() ctx := context.Background()
names := []string{"*.zombo.com"}
idents := identifier.ACMEIdentifiers{identifier.NewDNS("*.zombo.com")} idents := identifier.ACMEIdentifiers{identifier.NewDNS("*.zombo.com")}
// Use a mock SA that always returns a valid HTTP-01 authz for the name // Use a mock SA that always returns a valid HTTP-01 authz for the name
@ -2054,7 +1996,6 @@ func TestNewOrderAuthzReuseSafety(t *testing.T) {
// Create an initial request with regA and names // Create an initial request with regA and names
orderReq := &rapb.NewOrderRequest{ orderReq := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: names,
Identifiers: idents.ToProtoSlice(), Identifiers: idents.ToProtoSlice(),
} }
@ -2071,14 +2012,12 @@ func TestNewOrderWildcard(t *testing.T) {
_, _, ra, _, _, cleanUp := initAuthorities(t) _, _, ra, _, _, cleanUp := initAuthorities(t)
defer cleanUp() defer cleanUp()
orderNames := []string{"example.com", "*.welcome.zombo.com"}
orderIdents := identifier.ACMEIdentifiers{ orderIdents := identifier.ACMEIdentifiers{
identifier.NewDNS("example.com"), identifier.NewDNS("example.com"),
identifier.NewDNS("*.welcome.zombo.com"), identifier.NewDNS("*.welcome.zombo.com"),
} }
wildcardOrderRequest := &rapb.NewOrderRequest{ wildcardOrderRequest := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: orderNames,
Identifiers: orderIdents.ToProtoSlice(), Identifiers: orderIdents.ToProtoSlice(),
} }
@ -2087,17 +2026,12 @@ func TestNewOrderWildcard(t *testing.T) {
// We expect the order to be pending // We expect the order to be pending
test.AssertEquals(t, order.Status, string(core.StatusPending)) test.AssertEquals(t, order.Status, string(core.StatusPending))
// We expect the order to have two names
test.AssertEquals(t, len(order.DnsNames), 2)
// We expect the order to have two identifiers // We expect the order to have two identifiers
test.AssertEquals(t, len(order.Identifiers), 2) test.AssertEquals(t, len(order.Identifiers), 2)
// We expect the order to have the identifiers we requested // We expect the order to have the identifiers we requested
test.AssertDeepEquals(t, test.AssertDeepEquals(t,
core.UniqueLowerNames(order.DnsNames), identifier.Normalize(identifier.FromProtoSlice(order.Identifiers)),
core.UniqueLowerNames(orderNames))
test.AssertDeepEquals(t,
identifier.Normalize(identifier.FromProtoSliceWithDefault(order)),
identifier.Normalize(orderIdents)) identifier.Normalize(orderIdents))
test.AssertEquals(t, numAuthorizations(order), 2) test.AssertEquals(t, numAuthorizations(order), 2)
@ -2132,14 +2066,12 @@ func TestNewOrderWildcard(t *testing.T) {
// An order for a base domain and a wildcard for the same base domain should // An order for a base domain and a wildcard for the same base domain should
// return just 2 authz's, one for the wildcard with a DNS-01 // return just 2 authz's, one for the wildcard with a DNS-01
// challenge and one for the base domain with the normal challenges. // challenge and one for the base domain with the normal challenges.
orderNames = []string{"zombo.com", "*.zombo.com"}
orderIdents = identifier.ACMEIdentifiers{ orderIdents = identifier.ACMEIdentifiers{
identifier.NewDNS("zombo.com"), identifier.NewDNS("zombo.com"),
identifier.NewDNS("*.zombo.com"), identifier.NewDNS("*.zombo.com"),
} }
wildcardOrderRequest = &rapb.NewOrderRequest{ wildcardOrderRequest = &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: orderNames,
Identifiers: orderIdents.ToProtoSlice(), Identifiers: orderIdents.ToProtoSlice(),
} }
order, err = ra.NewOrder(context.Background(), wildcardOrderRequest) order, err = ra.NewOrder(context.Background(), wildcardOrderRequest)
@ -2147,16 +2079,11 @@ func TestNewOrderWildcard(t *testing.T) {
// We expect the order to be pending // We expect the order to be pending
test.AssertEquals(t, order.Status, string(core.StatusPending)) test.AssertEquals(t, order.Status, string(core.StatusPending))
// We expect the order to have two names
test.AssertEquals(t, len(order.DnsNames), 2)
// We expect the order to have two identifiers // We expect the order to have two identifiers
test.AssertEquals(t, len(order.Identifiers), 2) test.AssertEquals(t, len(order.Identifiers), 2)
// We expect the order to have the identifiers we requested // We expect the order to have the identifiers we requested
test.AssertDeepEquals(t, test.AssertDeepEquals(t,
core.UniqueLowerNames(order.DnsNames), identifier.Normalize(identifier.FromProtoSlice(order.Identifiers)),
core.UniqueLowerNames(orderNames))
test.AssertDeepEquals(t,
identifier.Normalize(identifier.FromProtoSliceWithDefault(order)),
identifier.Normalize(orderIdents)) identifier.Normalize(orderIdents))
test.AssertEquals(t, numAuthorizations(order), 2) test.AssertEquals(t, numAuthorizations(order), 2)
@ -2189,7 +2116,6 @@ func TestNewOrderWildcard(t *testing.T) {
// pending authz for the domain // pending authz for the domain
normalOrderReq := &rapb.NewOrderRequest{ normalOrderReq := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"everything.is.possible.zombo.com"},
Identifiers: []*corepb.Identifier{identifier.NewDNS("everything.is.possible.zombo.com").ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS("everything.is.possible.zombo.com").ToProto()},
} }
normalOrder, err := ra.NewOrder(context.Background(), normalOrderReq) normalOrder, err := ra.NewOrder(context.Background(), normalOrderReq)
@ -2213,11 +2139,9 @@ func TestNewOrderWildcard(t *testing.T) {
// Now submit an order request for a wildcard of the domain we just created an // Now submit an order request for a wildcard of the domain we just created an
// order for. We should **NOT** reuse the authorization from the previous // order for. We should **NOT** reuse the authorization from the previous
// order since we now require a DNS-01 challenge for the `*.` prefixed name. // order since we now require a DNS-01 challenge for the `*.` prefixed name.
orderNames = []string{"*.everything.is.possible.zombo.com"}
orderIdents = identifier.ACMEIdentifiers{identifier.NewDNS("*.everything.is.possible.zombo.com")} orderIdents = identifier.ACMEIdentifiers{identifier.NewDNS("*.everything.is.possible.zombo.com")}
wildcardOrderRequest = &rapb.NewOrderRequest{ wildcardOrderRequest = &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: orderNames,
Identifiers: orderIdents.ToProtoSlice(), Identifiers: orderIdents.ToProtoSlice(),
} }
order, err = ra.NewOrder(context.Background(), wildcardOrderRequest) order, err = ra.NewOrder(context.Background(), wildcardOrderRequest)
@ -2260,7 +2184,6 @@ func TestNewOrderExpiry(t *testing.T) {
defer cleanUp() defer cleanUp()
ctx := context.Background() ctx := context.Background()
names := []string{"zombo.com"}
idents := identifier.ACMEIdentifiers{identifier.NewDNS("zombo.com")} idents := identifier.ACMEIdentifiers{identifier.NewDNS("zombo.com")}
// Set the order lifetime to 48 hours. // Set the order lifetime to 48 hours.
@ -2295,7 +2218,6 @@ func TestNewOrderExpiry(t *testing.T) {
// Create an initial request with regA and names // Create an initial request with regA and names
orderReq := &rapb.NewOrderRequest{ orderReq := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: names,
Identifiers: idents.ToProtoSlice(), Identifiers: idents.ToProtoSlice(),
} }
@ -2390,14 +2312,12 @@ func TestFinalizeOrder(t *testing.T) {
// Add a new order for the fake reg ID // Add a new order for the fake reg ID
fakeRegOrder, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ fakeRegOrder, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"001.example.com"},
Identifiers: []*corepb.Identifier{identifier.NewDNS("001.example.com").ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS("001.example.com").ToProto()},
}) })
test.AssertNotError(t, err, "Could not add test order for fake reg ID order ID") test.AssertNotError(t, err, "Could not add test order for fake reg ID order ID")
missingAuthzOrder, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ missingAuthzOrder, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"002.example.com"},
Identifiers: []*corepb.Identifier{identifier.NewDNS("002.example.com").ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS("002.example.com").ToProto()},
}) })
test.AssertNotError(t, err, "Could not add test order for missing authz order ID") test.AssertNotError(t, err, "Could not add test order for missing authz order ID")
@ -2779,11 +2699,9 @@ func TestFinalizeOrderWildcard(t *testing.T) {
// Create a new order for a wildcard domain // Create a new order for a wildcard domain
orderIdents := identifier.ACMEIdentifiers{identifier.NewDNS("*.zombo.com")} orderIdents := identifier.ACMEIdentifiers{identifier.NewDNS("*.zombo.com")}
orderNames, err := orderIdents.ToDNSSlice()
test.AssertNotError(t, err, "Converting identifiers to DNS names") test.AssertNotError(t, err, "Converting identifiers to DNS names")
wildcardOrderRequest := &rapb.NewOrderRequest{ wildcardOrderRequest := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: orderNames,
Identifiers: orderIdents.ToProtoSlice(), Identifiers: orderIdents.ToProtoSlice(),
} }
order, err := ra.NewOrder(context.Background(), wildcardOrderRequest) order, err := ra.NewOrder(context.Background(), wildcardOrderRequest)
@ -2854,7 +2772,6 @@ func TestFinalizeOrderDisabledChallenge(t *testing.T) {
// Create an order that reuses that authorization // Create an order that reuses that authorization
order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{domain},
Identifiers: []*corepb.Identifier{ident.ToProto()}, Identifiers: []*corepb.Identifier{ident.ToProto()},
}) })
test.AssertNotError(t, err, "creating test order") test.AssertNotError(t, err, "creating test order")
@ -2954,7 +2871,6 @@ func TestFinalizeWithMustStaple(t *testing.T) {
order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ order, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{domain},
Identifiers: []*corepb.Identifier{identifier.NewDNS(domain).ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS(domain).ToProto()},
}) })
test.AssertNotError(t, err, "creating test order") test.AssertNotError(t, err, "creating test order")
@ -3479,11 +3395,6 @@ func TestNewOrderMaxNames(t *testing.T) {
ra.profiles.def().maxNames = 2 ra.profiles.def().maxNames = 2
_, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{ _, err := ra.NewOrder(context.Background(), &rapb.NewOrderRequest{
RegistrationID: 1, RegistrationID: 1,
DnsNames: []string{
"a",
"b",
"c",
},
Identifiers: []*corepb.Identifier{ Identifiers: []*corepb.Identifier{
identifier.NewDNS("a").ToProto(), identifier.NewDNS("a").ToProto(),
identifier.NewDNS("b").ToProto(), identifier.NewDNS("b").ToProto(),
@ -4115,7 +4026,6 @@ func TestNewOrderReplacesSerialCarriesThroughToSA(t *testing.T) {
exampleOrder := &rapb.NewOrderRequest{ exampleOrder := &rapb.NewOrderRequest{
RegistrationID: Registration.Id, RegistrationID: Registration.Id,
DnsNames: []string{"example.com"},
Identifiers: []*corepb.Identifier{identifier.NewDNS("example.com").ToProto()}, Identifiers: []*corepb.Identifier{identifier.NewDNS("example.com").ToProto()},
ReplacesSerial: "1234", ReplacesSerial: "1234",
} }

View File

@ -2390,14 +2390,13 @@ func (wfe *WebFrontEndImpl) NewOrder(
order, err := wfe.ra.NewOrder(ctx, &rapb.NewOrderRequest{ order, err := wfe.ra.NewOrder(ctx, &rapb.NewOrderRequest{
RegistrationID: acct.ID, RegistrationID: acct.ID,
DnsNames: names,
Identifiers: idents.ToProtoSlice(), Identifiers: idents.ToProtoSlice(),
CertificateProfileName: newOrderRequest.Profile, CertificateProfileName: newOrderRequest.Profile,
Replaces: newOrderRequest.Replaces, Replaces: newOrderRequest.Replaces,
ReplacesSerial: replacesSerial, ReplacesSerial: replacesSerial,
}) })
if err != nil || core.IsAnyNilOrZero(order, order.Id, order.RegistrationID, identifier.FromProtoSliceWithDefault(order), order.Created, order.Expires) { if err != nil || core.IsAnyNilOrZero(order, order.Id, order.RegistrationID, order.Identifiers, order.Created, order.Expires) {
wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Error creating new order"), err) wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Error creating new order"), err)
return return
} }

View File

@ -307,7 +307,6 @@ func (ra *MockRegistrationAuthority) NewOrder(ctx context.Context, in *rapb.NewO
RegistrationID: in.RegistrationID, RegistrationID: in.RegistrationID,
Created: timestamppb.New(created), Created: timestamppb.New(created),
Expires: timestamppb.New(expires), Expires: timestamppb.New(expires),
DnsNames: in.DnsNames,
Identifiers: in.Identifiers, Identifiers: in.Identifiers,
Status: string(core.StatusPending), Status: string(core.StatusPending),
V2Authorizations: []int64{1}, V2Authorizations: []int64{1},