From d6f1f5894bc674005ba5ab84e740ce28a3c7356d Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Tue, 30 Jun 2026 12:07:31 -0400 Subject: [PATCH] Restore RFC schemas, prober XML, and OT&E route (#3120) In commit 17b851de422ae7b9178cb747fec2443b9614f63b (#2979), and related types were incorrectly removed from core/src/main/java/google/registry/xml/xsd/domain.xsd and rde-domain.xsd. Because those XSD schemas are published standards (RFC 5731 and RFC 5831), altering them caused JAXB unmarshaling to reject historical database records (HistoryEntry) containing elements during OT&E status checks. Restore to domain.xsd and rde-domain.xsd so all XSD schemas conform strictly to published EPP RFCs and historical contact elements unmarshal cleanly without throwing cvc-complex-type.2.4.a schema validation errors. Remove deprecated elements from prober creation payload (prober/.../create.xml) to match current flow rules where contact associations are forbidden. Remove trailing slash from ote-status route parameter in RegistrarDetailsComponent to prevent double-slash (/ote-status//) URL generation when checking OT&E status. BUG= http://b/529391412 --- .../registrar/registrarDetails.component.ts | 2 +- .../registry/model/domain/DomainCommand.java | 6 ++--- .../java/google/registry/xml/xsd/domain.xsd | 22 +++++++++++++++++++ .../google/registry/xml/xsd/rde-domain.xsd | 3 +++ .../flows/domain/DomainCreateFlowTest.java | 5 ++--- .../flows/domain/DomainUpdateFlowTest.java | 6 +++-- .../model/domain/DomainCommandTest.java | 12 +++++----- .../monitoring/blackbox/message/create.xml | 2 -- 8 files changed, 42 insertions(+), 16 deletions(-) diff --git a/console-webapp/src/app/registrar/registrarDetails.component.ts b/console-webapp/src/app/registrar/registrarDetails.component.ts index bd0689525..3221a238a 100644 --- a/console-webapp/src/app/registrar/registrarDetails.component.ts +++ b/console-webapp/src/app/registrar/registrarDetails.component.ts @@ -75,7 +75,7 @@ export class RegistrarDetailsComponent implements OnInit { } checkOteStatus() { - this.router.navigate(['ote-status/', this.registrarInEdit.registrarId], { + this.router.navigate(['ote-status', this.registrarInEdit.registrarId], { queryParamsHandling: 'merge', }); } diff --git a/core/src/main/java/google/registry/model/domain/DomainCommand.java b/core/src/main/java/google/registry/model/domain/DomainCommand.java index 9f59502ca..14b099c75 100644 --- a/core/src/main/java/google/registry/model/domain/DomainCommand.java +++ b/core/src/main/java/google/registry/model/domain/DomainCommand.java @@ -158,12 +158,12 @@ public class DomainCommand { throws InvalidReferencesException, ParameterValuePolicyErrorException { Create clone = clone(this); clone.nameservers = linkHosts(nullSafeImmutableCopy(clone.nameserverHostNames), now); - if (registrantContactId != null) { - throw new RegistrantProhibitedException(); - } if (!isNullOrEmpty(foreignKeyedDesignatedContacts)) { throw new ContactsProhibitedException(); } + if (registrantContactId != null) { + throw new RegistrantProhibitedException(); + } return clone; } diff --git a/core/src/main/java/google/registry/xml/xsd/domain.xsd b/core/src/main/java/google/registry/xml/xsd/domain.xsd index a6e5ebe9f..fb72f3341 100644 --- a/core/src/main/java/google/registry/xml/xsd/domain.xsd +++ b/core/src/main/java/google/registry/xml/xsd/domain.xsd @@ -47,6 +47,8 @@ Child elements of the command. minOccurs="0"/> + @@ -98,6 +100,22 @@ If attributes, addresses are optional and follow the structure defined in the host mapping. --> + + + + + + + + + + + + + + + + @@ -198,6 +216,8 @@ Data elements that can be added or removed. + @@ -299,6 +319,8 @@ Child response elements. minOccurs="0" maxOccurs="11"/> + + loadEppResourceCommand("domain_create_with_contacts.xml")); + ContactsProhibitedException.class, () -> create.cloneAndLinkReferences(fakeClock.now())); } @Test @@ -138,9 +139,10 @@ class DomainCommandTest extends ResourceCommandTestCase { void testUpdate_cloneAndLinkReferences_failsWithContacts() throws Exception { persistActiveHost("ns1.example.com"); persistActiveHost("ns2.example.com"); + DomainCommand.Update update = + (DomainCommand.Update) loadEppResourceCommand("domain_update_with_contacts.xml"); assertThrows( - FlowUtils.GenericXmlSyntaxErrorException.class, - () -> loadEppResourceCommand("domain_update_with_contacts.xml")); + ContactsProhibitedException.class, () -> update.cloneAndLinkReferences(fakeClock.now())); } @Test diff --git a/prober/src/main/resources/google/registry/monitoring/blackbox/message/create.xml b/prober/src/main/resources/google/registry/monitoring/blackbox/message/create.xml index 111344025..c0f6f6831 100644 --- a/prober/src/main/resources/google/registry/monitoring/blackbox/message/create.xml +++ b/prober/src/main/resources/google/registry/monitoring/blackbox/message/create.xml @@ -9,8 +9,6 @@ ns.fake-domain.tld google-mon - google-mon - google-mon insecure