diff --git a/console-webapp/src/app/settings/contact/contact.service.ts b/console-webapp/src/app/settings/contact/contact.service.ts index 992718ea8..fc6677e53 100644 --- a/console-webapp/src/app/settings/contact/contact.service.ts +++ b/console-webapp/src/app/settings/contact/contact.service.ts @@ -47,9 +47,9 @@ export interface Contact { registrarId?: string; faxNumber?: string; types: Array; - visibleInWhoisAsAdmin?: boolean; - visibleInWhoisAsTech?: boolean; - visibleInDomainWhoisAsAbuse?: boolean; + visibleInRdapAsAdmin?: boolean; + visibleInRdapAsTech?: boolean; + visibleInDomainRdapAsAbuse?: boolean; } export interface ViewReadyContact extends Contact { diff --git a/console-webapp/src/app/settings/contact/contactDetails.component.html b/console-webapp/src/app/settings/contact/contactDetails.component.html index 8c5d1242d..da06f1f86 100644 --- a/console-webapp/src/app/settings/contact/contactDetails.component.html +++ b/console-webapp/src/app/settings/contact/contactDetails.component.html @@ -111,7 +111,7 @@

RDAP Preferences

Show in Registrar RDAP record as admin contact @@ -119,7 +119,7 @@
Show in Registrar RDAP record as technical contact @@ -127,7 +127,7 @@
Show Phone and Email in Domain RDAP Record as registrar abuse contact (per CL&D requirements)

RDAP Preferences

- @if(contactService.contactInEdit.visibleInWhoisAsAdmin) { + @if(contactService.contactInEdit.visibleInRdapAsAdmin) { Show in Registrar RDAP record as admin contact - } @if(contactService.contactInEdit.visibleInWhoisAsTech) { + } @if(contactService.contactInEdit.visibleInRdapAsTech) { Show in Registrar RDAP record as technical contact - } @if(contactService.contactInEdit.visibleInDomainWhoisAsAbuse) { + } @if(contactService.contactInEdit.visibleInDomainRdapAsAbuse) { getWhoisAbuseContact() { - return getContacts().stream().filter(RegistrarPoc::getVisibleInDomainWhoisAsAbuse).findFirst(); + public Optional getRdapAbuseContact() { + return getContacts().stream().filter(RegistrarPoc::getVisibleInDomainRdapAsAbuse).findFirst(); } private ImmutableList getPocs(TransactionManager txnManager) { diff --git a/core/src/main/java/google/registry/model/registrar/RegistrarPoc.java b/core/src/main/java/google/registry/model/registrar/RegistrarPoc.java index 6203c31c2..4979b57e6 100644 --- a/core/src/main/java/google/registry/model/registrar/RegistrarPoc.java +++ b/core/src/main/java/google/registry/model/registrar/RegistrarPoc.java @@ -48,9 +48,9 @@ import java.util.Set; * A contact for a Registrar. Note, equality, hashCode and comparable have been overridden to only * enable key equality. * - *

IMPORTANT NOTE: Any time that you change, update, or delete RegistrarContact entities, you - * *MUST* also modify the persisted Registrar entity with {@link Registrar#contactsRequireSyncing} - * set to true. + *

IMPORTANT NOTE: Any time that you change, update, or delete RegistrarPoc entities, you *MUST* + * also modify the persisted Registrar entity with {@link Registrar#contactsRequireSyncing} set to + * true. */ @Entity @IdClass(RegistrarPoc.RegistrarPocId.class) @@ -58,8 +58,8 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe /** * Registrar contacts types for partner communication tracking. * - *

Note: These types only matter to the registry. They are not meant to be used for - * WHOIS or RDAP results. + *

Note: These types only matter to the registry. They are not meant to be used for RDAP + * results. */ public enum Type { ABUSE("abuse", true), @@ -115,32 +115,23 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe @Expose Set types; - /** - * Whether this contact is publicly visible in WHOIS registrar query results as an Admin contact. - */ - @Column(nullable = false) + /** If this contact is publicly visible in RDAP registrar query results as an Admin contact */ + @Column(nullable = false, name = "visibleInWhoisAsAdmin") @Expose - boolean visibleInWhoisAsAdmin = false; + boolean visibleInRdapAsAdmin = false; + + /** If this contact is publicly visible in RDAP registrar query results as a Technical contact */ + @Column(nullable = false, name = "visibleInWhoisAsTech") + @Expose + boolean visibleInRdapAsTech = false; /** - * Whether this contact is publicly visible in WHOIS registrar query results as a Technical - * contact. - */ - @Column(nullable = false) - @Expose - boolean visibleInWhoisAsTech = false; - - /** - * Whether this contact's phone number and email address is publicly visible in WHOIS domain query + * If this contact's phone number and email address are publicly visible in RDAP domain query * results as registrar abuse contact info. */ - @Column(nullable = false) + @Column(nullable = false, name = "visibleInDomainWhoisAsAbuse") @Expose - boolean visibleInDomainWhoisAsAbuse = false; - - /** Legacy field, around until we can remove the non-null constraint and the column from SQL. */ - @Column(nullable = false) - boolean allowedToSetRegistryLockPassword = false; + boolean visibleInDomainRdapAsAbuse = false; /** * Helper to update the contacts associated with a Registrar. This requires querying for the @@ -188,16 +179,16 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe return nullToEmptyImmutableSortedCopy(types); } - public boolean getVisibleInWhoisAsAdmin() { - return visibleInWhoisAsAdmin; + public boolean getVisibleInRdapAsAdmin() { + return visibleInRdapAsAdmin; } - public boolean getVisibleInWhoisAsTech() { - return visibleInWhoisAsTech; + public boolean getVisibleInRdapAsTech() { + return visibleInRdapAsTech; } - public boolean getVisibleInDomainWhoisAsAbuse() { - return visibleInDomainWhoisAsAbuse; + public boolean getVisibleInDomainRdapAsAbuse() { + return visibleInDomainRdapAsAbuse; } public Builder asBuilder() { @@ -214,8 +205,8 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe * person@example.com * Tel: +1.2125650666 * Types: [ADMIN, WHOIS] - * Visible in WHOIS as Admin contact: Yes - * Visible in WHOIS as Technical contact: No + * Visible in RDAP as Admin contact: Yes + * Visible in RDAP as Technical contact: No * Registrar-Console access: Yes * Login Email Address: person@registry.example * } @@ -232,18 +223,18 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe } result.append("Types: ").append(getTypes()).append('\n'); result - .append("Visible in registrar WHOIS query as Admin contact: ") - .append(getVisibleInWhoisAsAdmin() ? "Yes" : "No") + .append("Visible in registrar RDAP query as Admin contact: ") + .append(getVisibleInRdapAsAdmin() ? "Yes" : "No") .append('\n'); result - .append("Visible in registrar WHOIS query as Technical contact: ") - .append(getVisibleInWhoisAsTech() ? "Yes" : "No") + .append("Visible in registrar RDAP query as Technical contact: ") + .append(getVisibleInRdapAsTech() ? "Yes" : "No") .append('\n'); result .append( - "Phone number and email visible in domain WHOIS query as " + "Phone number and email visible in domain RDAP query as " + "Registrar Abuse contact info: ") - .append(getVisibleInDomainWhoisAsAbuse() ? "Yes" : "No") + .append(getVisibleInDomainRdapAsAbuse() ? "Yes" : "No") .append('\n'); return result.toString(); } @@ -256,9 +247,9 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe .put("phoneNumber", phoneNumber) .put("faxNumber", faxNumber) .put("types", getTypes().stream().map(Object::toString).collect(joining(","))) - .put("visibleInWhoisAsAdmin", visibleInWhoisAsAdmin) - .put("visibleInWhoisAsTech", visibleInWhoisAsTech) - .put("visibleInDomainWhoisAsAbuse", visibleInDomainWhoisAsAbuse) + .put("visibleInRdapAsAdmin", visibleInRdapAsAdmin) + .put("visibleInRdapAsTech", visibleInRdapAsTech) + .put("visibleInDomainRdapAsAbuse", visibleInDomainRdapAsAbuse) .put("id", getId()) .build(); } @@ -336,18 +327,18 @@ public class RegistrarPoc extends ImmutableObject implements Jsonifiable, Unsafe return this; } - public Builder setVisibleInWhoisAsAdmin(boolean visible) { - getInstance().visibleInWhoisAsAdmin = visible; + public Builder setVisibleInRdapAsAdmin(boolean visible) { + getInstance().visibleInRdapAsAdmin = visible; return this; } - public Builder setVisibleInWhoisAsTech(boolean visible) { - getInstance().visibleInWhoisAsTech = visible; + public Builder setVisibleInRdapAsTech(boolean visible) { + getInstance().visibleInRdapAsTech = visible; return this; } - public Builder setVisibleInDomainWhoisAsAbuse(boolean visible) { - getInstance().visibleInDomainWhoisAsAbuse = visible; + public Builder setVisibleInDomainRdapAsAbuse(boolean visible) { + getInstance().visibleInDomainRdapAsAbuse = visible; return this; } } diff --git a/core/src/main/java/google/registry/rdap/RdapJsonFormatter.java b/core/src/main/java/google/registry/rdap/RdapJsonFormatter.java index 19095ea54..baec62dc0 100644 --- a/core/src/main/java/google/registry/rdap/RdapJsonFormatter.java +++ b/core/src/main/java/google/registry/rdap/RdapJsonFormatter.java @@ -658,7 +658,7 @@ public class RdapJsonFormatter { } /** - * Creates the list of RDAP roles for a registrar POC, using the visibleInWhoisAs* flags. + * Creates the list of RDAP roles for a registrar POC, using the visibleInRdapAs* flags. * *

Only POCs with a non-empty role list should be visible. * @@ -672,13 +672,13 @@ public class RdapJsonFormatter { */ private static ImmutableList makeRdapRoleList(RegistrarPoc registrarPoc) { ImmutableList.Builder rolesBuilder = new ImmutableList.Builder<>(); - if (registrarPoc.getVisibleInWhoisAsAdmin()) { + if (registrarPoc.getVisibleInRdapAsAdmin()) { rolesBuilder.add(RdapEntity.Role.ADMIN); } - if (registrarPoc.getVisibleInWhoisAsTech()) { + if (registrarPoc.getVisibleInRdapAsTech()) { rolesBuilder.add(RdapEntity.Role.TECH); } - if (registrarPoc.getVisibleInDomainWhoisAsAbuse()) { + if (registrarPoc.getVisibleInDomainRdapAsAbuse()) { rolesBuilder.add(RdapEntity.Role.ABUSE); } return rolesBuilder.build(); diff --git a/core/src/main/java/google/registry/reporting/spec11/Spec11EmailUtils.java b/core/src/main/java/google/registry/reporting/spec11/Spec11EmailUtils.java index 2df917c21..353e77fc3 100644 --- a/core/src/main/java/google/registry/reporting/spec11/Spec11EmailUtils.java +++ b/core/src/main/java/google/registry/reporting/spec11/Spec11EmailUtils.java @@ -226,7 +226,7 @@ public class Spec11EmailUtils { private InternetAddress getEmailAddressForRegistrar(String registrarId) throws MessagingException { - // Attempt to use the registrar's WHOIS abuse contact, then fall back to the regular address. + // Attempt to use the registrar's RDAP abuse contact, then fall back to the regular address. Registrar registrar = Registrar.loadByRegistrarIdCached(registrarId) .orElseThrow( @@ -235,7 +235,7 @@ public class Spec11EmailUtils { String.format("Could not find registrar %s", registrarId))); return new InternetAddress( registrar - .getWhoisAbuseContact() + .getRdapAbuseContact() .map(RegistrarPoc::getEmailAddress) .orElse(registrar.getEmailAddress())); } diff --git a/core/src/main/java/google/registry/tools/CreateRegistrarCommand.java b/core/src/main/java/google/registry/tools/CreateRegistrarCommand.java index e5c1cf885..b84fc929f 100644 --- a/core/src/main/java/google/registry/tools/CreateRegistrarCommand.java +++ b/core/src/main/java/google/registry/tools/CreateRegistrarCommand.java @@ -105,7 +105,7 @@ final class CreateRegistrarCommand extends CreateOrUpdateRegistrarCommand "Cannot add allowed TLDs when creating a REAL registrar in a production environment." + " Please create the registrar without allowed TLDs, then use `nomulus" + " registrar_contact` to create a registrar contact for it that is visible as the" - + " abuse contact in WHOIS. Then use `nomulus update_registrar` to add the allowed" + + " abuse contact in RDAP. Then use `nomulus update_registrar` to add the allowed" + " TLDs."); } diff --git a/core/src/main/java/google/registry/tools/RegistrarPocCommand.java b/core/src/main/java/google/registry/tools/RegistrarPocCommand.java index 4da9d4d41..ef61bfc41 100644 --- a/core/src/main/java/google/registry/tools/RegistrarPocCommand.java +++ b/core/src/main/java/google/registry/tools/RegistrarPocCommand.java @@ -103,28 +103,27 @@ final class RegistrarPocCommand extends MutatingCommand { @Nullable @Parameter( - names = "--visible_in_whois_as_admin", - description = " Whether this contact is publicly visible in WHOIS results as an " - + "Admin contact.", + names = "--visible_in_rdap_as_admin", + description = "If this contact is publicly visible in RDAP results as an " + "Admin contact.", arity = 1) - private Boolean visibleInWhoisAsAdmin; + private Boolean visibleInRdapAsAdmin; @Nullable @Parameter( - names = "--visible_in_whois_as_tech", - description = " Whether this contact is publicly visible in WHOIS results as a " - + "Tech contact.", + names = "--visible_in_rdap_as_tech", + description = "If this contact is publicly visible in RDAP results as a " + "Tech contact.", arity = 1) - private Boolean visibleInWhoisAsTech; + private Boolean visibleInRdapAsTech; @Nullable @Parameter( - names = "--visible_in_domain_whois_as_abuse", - description = " Whether this contact is publicly visible in WHOIS domain results as the " - + "registry abuse phone and email. If this flag is set, it will be cleared from all " - + "other contacts for the same registrar.", + names = "--visible_in_domain_rdap_as_abuse", + description = + " Whether this contact is publicly visible in RDAP domain results as the " + + "registry abuse phone and email. If this flag is set, it will be cleared from all " + + "other contacts for the same registrar.", arity = 1) - private Boolean visibleInDomainWhoisAsAbuse; + private Boolean visibleInDomainRdapAsAbuse; @Parameter( names = {"-o", "--output"}, @@ -166,8 +165,8 @@ final class RegistrarPocCommand extends MutatingCommand { case LIST -> listContacts(contacts); case CREATE -> { stageEntityChange(null, createContact(registrar)); - if (visibleInDomainWhoisAsAbuse != null && visibleInDomainWhoisAsAbuse) { - unsetOtherWhoisAbuseFlags(contacts, null); + if (visibleInDomainRdapAsAbuse != null && visibleInDomainRdapAsAbuse) { + unsetOtherRdapAbuseFlags(contacts, null); } } case UPDATE -> { @@ -178,13 +177,13 @@ final class RegistrarPocCommand extends MutatingCommand { email); RegistrarPoc newContact = updateContact(oldContact, registrar); checkArgument( - !oldContact.getVisibleInDomainWhoisAsAbuse() - || newContact.getVisibleInDomainWhoisAsAbuse(), - "Cannot clear visible_in_domain_whois_as_abuse flag, as that would leave no domain" - + " WHOIS abuse contacts; instead, set the flag on another contact"); + !oldContact.getVisibleInDomainRdapAsAbuse() + || newContact.getVisibleInDomainRdapAsAbuse(), + "Cannot clear visible_in_domain_rdap_as_abuse flag, as that would leave no domain" + + " RDAP abuse contacts; instead, set the flag on another contact"); stageEntityChange(oldContact, newContact); - if (visibleInDomainWhoisAsAbuse != null && visibleInDomainWhoisAsAbuse) { - unsetOtherWhoisAbuseFlags(contacts, oldContact.getEmailAddress()); + if (visibleInDomainRdapAsAbuse != null && visibleInDomainRdapAsAbuse) { + unsetOtherRdapAbuseFlags(contacts, oldContact.getEmailAddress()); } } case DELETE -> { @@ -194,8 +193,8 @@ final class RegistrarPocCommand extends MutatingCommand { "No contact with the given email: %s", email); checkArgument( - !oldContact.getVisibleInDomainWhoisAsAbuse(), - "Cannot delete the domain WHOIS abuse contact; set the flag on another contact first"); + !oldContact.getVisibleInDomainRdapAsAbuse(), + "Cannot delete the domain RDAP abuse contact; set the flag on another contact first"); stageEntityChange(oldContact, null); } default -> throw new AssertionError(); @@ -228,14 +227,14 @@ final class RegistrarPocCommand extends MutatingCommand { } builder.setTypes(nullToEmpty(contactTypes)); - if (visibleInWhoisAsAdmin != null) { - builder.setVisibleInWhoisAsAdmin(visibleInWhoisAsAdmin); + if (visibleInRdapAsAdmin != null) { + builder.setVisibleInRdapAsAdmin(visibleInRdapAsAdmin); } - if (visibleInWhoisAsTech != null) { - builder.setVisibleInWhoisAsTech(visibleInWhoisAsTech); + if (visibleInRdapAsTech != null) { + builder.setVisibleInRdapAsTech(visibleInRdapAsTech); } - if (visibleInDomainWhoisAsAbuse != null) { - builder.setVisibleInDomainWhoisAsAbuse(visibleInDomainWhoisAsAbuse); + if (visibleInDomainRdapAsAbuse != null) { + builder.setVisibleInDomainRdapAsAbuse(visibleInDomainRdapAsAbuse); } return builder.build(); } @@ -257,24 +256,24 @@ final class RegistrarPocCommand extends MutatingCommand { if (contactTypes != null) { builder.setTypes(contactTypes); } - if (visibleInWhoisAsAdmin != null) { - builder.setVisibleInWhoisAsAdmin(visibleInWhoisAsAdmin); + if (visibleInRdapAsAdmin != null) { + builder.setVisibleInRdapAsAdmin(visibleInRdapAsAdmin); } - if (visibleInWhoisAsTech != null) { - builder.setVisibleInWhoisAsTech(visibleInWhoisAsTech); + if (visibleInRdapAsTech != null) { + builder.setVisibleInRdapAsTech(visibleInRdapAsTech); } - if (visibleInDomainWhoisAsAbuse != null) { - builder.setVisibleInDomainWhoisAsAbuse(visibleInDomainWhoisAsAbuse); + if (visibleInDomainRdapAsAbuse != null) { + builder.setVisibleInDomainRdapAsAbuse(visibleInDomainRdapAsAbuse); } return builder.build(); } - private void unsetOtherWhoisAbuseFlags( + private void unsetOtherRdapAbuseFlags( ImmutableSet contacts, @Nullable String emailAddressNotToChange) { for (RegistrarPoc contact : contacts) { if (!contact.getEmailAddress().equals(emailAddressNotToChange) - && contact.getVisibleInDomainWhoisAsAbuse()) { - RegistrarPoc newContact = contact.asBuilder().setVisibleInDomainWhoisAsAbuse(false).build(); + && contact.getVisibleInDomainRdapAsAbuse()) { + RegistrarPoc newContact = contact.asBuilder().setVisibleInDomainRdapAsAbuse(false).build(); stageEntityChange(contact, newContact); } } diff --git a/core/src/main/java/google/registry/tools/UpdateRegistrarCommand.java b/core/src/main/java/google/registry/tools/UpdateRegistrarCommand.java index ab4c0cbf7..fd0fa80db 100644 --- a/core/src/main/java/google/registry/tools/UpdateRegistrarCommand.java +++ b/core/src/main/java/google/registry/tools/UpdateRegistrarCommand.java @@ -35,7 +35,7 @@ final class UpdateRegistrarCommand extends CreateOrUpdateRegistrarCommand { @Override void checkModifyAllowedTlds(@Nullable Registrar oldRegistrar) { // Only allow modifying allowed TLDs if we're in a non-PRODUCTION environment, if the registrar - // is not REAL, or the registrar has a WHOIS abuse contact set. + // is not REAL, or the registrar has an RDAP abuse contact set. checkArgumentNotNull(oldRegistrar, "Old registrar was not present during modification"); boolean isRealRegistrar = @@ -43,9 +43,9 @@ final class UpdateRegistrarCommand extends CreateOrUpdateRegistrarCommand { || (Registrar.Type.REAL.equals(oldRegistrar.getType()) && registrarType == null); if (RegistryEnvironment.PRODUCTION.equals(RegistryEnvironment.get()) && isRealRegistrar) { checkArgumentPresent( - oldRegistrar.getWhoisAbuseContact(), - "Cannot modify allowed TLDs if there is no WHOIS abuse contact set. Please use the" - + " \"nomulus registrar_contact\" command on this registrar to set a WHOIS abuse" + oldRegistrar.getRdapAbuseContact(), + "Cannot modify allowed TLDs if there is no RDAP abuse contact set. Please use the" + + " \"nomulus registrar_contact\" command on this registrar to set an RDAP abuse" + " contact."); } } diff --git a/core/src/main/java/google/registry/ui/server/console/ConsoleUpdateRegistrarAction.java b/core/src/main/java/google/registry/ui/server/console/ConsoleUpdateRegistrarAction.java index 22d7c7185..7bd0c8a56 100644 --- a/core/src/main/java/google/registry/ui/server/console/ConsoleUpdateRegistrarAction.java +++ b/core/src/main/java/google/registry/ui/server/console/ConsoleUpdateRegistrarAction.java @@ -79,17 +79,17 @@ public class ConsoleUpdateRegistrarAction extends ConsoleApiAction { registrarParam.getRegistrarId()); // Only allow modifying allowed TLDs if we're in a non-PRODUCTION environment, if the - // registrar is not REAL, or the registrar has a WHOIS abuse contact set. + // registrar is not REAL, or the registrar has a RDAP abuse contact set. if (!registrarParam.getAllowedTlds().isEmpty()) { boolean isRealRegistrar = Registrar.Type.REAL.equals(existingRegistrar.get().getType()); if (RegistryEnvironment.PRODUCTION.equals(RegistryEnvironment.get()) && isRealRegistrar) { checkArgumentPresent( - existingRegistrar.get().getWhoisAbuseContact(), - "Cannot modify allowed TLDs if there is no WHOIS abuse contact set. Please" + existingRegistrar.get().getRdapAbuseContact(), + "Cannot modify allowed TLDs if there is no RDAP abuse contact set. Please" + " use the \"nomulus registrar_contact\" command on this registrar to" - + " set a WHOIS abuse contact."); + + " set a RDAP abuse contact."); } } diff --git a/core/src/main/java/google/registry/ui/server/console/settings/ContactAction.java b/core/src/main/java/google/registry/ui/server/console/settings/ContactAction.java index 05f2aba52..72b29db82 100644 --- a/core/src/main/java/google/registry/ui/server/console/settings/ContactAction.java +++ b/core/src/main/java/google/registry/ui/server/console/settings/ContactAction.java @@ -106,9 +106,9 @@ public class ContactAction extends ConsoleApiAction { new RegistrarPoc() .asBuilder() .setTypes(newContact.getTypes()) - .setVisibleInWhoisAsTech(newContact.getVisibleInWhoisAsTech()) - .setVisibleInWhoisAsAdmin(newContact.getVisibleInWhoisAsAdmin()) - .setVisibleInDomainWhoisAsAbuse(newContact.getVisibleInDomainWhoisAsAbuse()) + .setVisibleInRdapAsTech(newContact.getVisibleInRdapAsTech()) + .setVisibleInRdapAsAdmin(newContact.getVisibleInRdapAsAdmin()) + .setVisibleInDomainRdapAsAbuse(newContact.getVisibleInDomainRdapAsAbuse()) .setFaxNumber(newContact.getFaxNumber()) .setName(newContact.getName()) .setEmailAddress(newContact.getEmailAddress()) @@ -133,10 +133,10 @@ public class ContactAction extends ConsoleApiAction { ? oldContact .asBuilder() .setTypes(updatedContact.getTypes()) - .setVisibleInWhoisAsTech(updatedContact.getVisibleInWhoisAsTech()) - .setVisibleInWhoisAsAdmin(updatedContact.getVisibleInWhoisAsAdmin()) - .setVisibleInDomainWhoisAsAbuse( - updatedContact.getVisibleInDomainWhoisAsAbuse()) + .setVisibleInRdapAsTech(updatedContact.getVisibleInRdapAsTech()) + .setVisibleInRdapAsAdmin(updatedContact.getVisibleInRdapAsAdmin()) + .setVisibleInDomainRdapAsAbuse( + updatedContact.getVisibleInDomainRdapAsAbuse()) .setFaxNumber(updatedContact.getFaxNumber()) .setName(updatedContact.getName()) .setEmailAddress(updatedContact.getEmailAddress()) @@ -231,19 +231,19 @@ public class ContactAction extends ConsoleApiAction { enforcePrimaryContactRestrictions(oldContactsByType, newContactsByType); ensurePhoneNumberNotRemovedForContactTypes(oldContactsByType, newContactsByType, Type.TECH); - Optional domainWhoisAbuseContact = - getDomainWhoisVisibleAbuseContact(updatedContacts); - // If the new set has a domain WHOIS abuse contact, it must have a phone number. - if (domainWhoisAbuseContact.isPresent() - && domainWhoisAbuseContact.get().getPhoneNumber() == null) { + Optional domainRdapAbuseContact = + getDomainRdapVisibleAbuseContact(updatedContacts); + // If the new set has a domain RDAP abuse contact, it must have a phone number. + if (domainRdapAbuseContact.isPresent() + && domainRdapAbuseContact.get().getPhoneNumber() == null) { throw new ContactRequirementException( - "The abuse contact visible in domain WHOIS query must have a phone number"); + "The abuse contact visible in domain RDAP query must have a phone number"); } - // If there was a domain WHOIS abuse contact in the old set, the new set must have one. - if (getDomainWhoisVisibleAbuseContact(existingContacts).isPresent() - && domainWhoisAbuseContact.isEmpty()) { + // If there was a domain RDAP abuse contact in the old set, the new set must have one. + if (getDomainRdapVisibleAbuseContact(existingContacts).isPresent() + && domainRdapAbuseContact.isEmpty()) { throw new ContactRequirementException( - "An abuse contact visible in domain WHOIS query must be designated"); + "An abuse contact visible in domain RDAP query must be designated"); } } @@ -265,17 +265,17 @@ public class ContactAction extends ConsoleApiAction { } /** - * Retrieves the registrar contact whose phone number and email address is visible in domain WHOIS + * Retrieves the registrar contact whose phone number and email address is visible in domain RDAP * query as abuse contact (if any). * - *

Frontend processing ensures that only one contact can be set as abuse contact in domain - * WHOIS record. + *

Frontend processing ensures that only one contact can be set as abuse contact in domain RDAP + * record. * *

Therefore, it is possible to return inside the loop once one such contact is found. */ - private static Optional getDomainWhoisVisibleAbuseContact( + private static Optional getDomainRdapVisibleAbuseContact( Set contacts) { - return contacts.stream().filter(RegistrarPoc::getVisibleInDomainWhoisAsAbuse).findFirst(); + return contacts.stream().filter(RegistrarPoc::getVisibleInDomainRdapAsAbuse).findFirst(); } /** diff --git a/core/src/test/java/google/registry/batch/SendExpiringCertificateNotificationEmailActionTest.java b/core/src/test/java/google/registry/batch/SendExpiringCertificateNotificationEmailActionTest.java index de5ff3f2d..d944a3e09 100644 --- a/core/src/test/java/google/registry/batch/SendExpiringCertificateNotificationEmailActionTest.java +++ b/core/src/test/java/google/registry/batch/SendExpiringCertificateNotificationEmailActionTest.java @@ -221,8 +221,8 @@ class SendExpiringCertificateNotificationEmailActionTest { .setPhoneNumber("+1.3105551213") .setFaxNumber("+1.3105551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .build()); persistResources(contacts); RuntimeException thrown = @@ -511,8 +511,8 @@ class SendExpiringCertificateNotificationEmailActionTest { .setPhoneNumber("+1.3105551213") .setFaxNumber("+1.3105551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -529,8 +529,8 @@ class SendExpiringCertificateNotificationEmailActionTest { .setPhoneNumber("+1.3105551213") .setFaxNumber("+1.3105551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -547,7 +547,7 @@ class SendExpiringCertificateNotificationEmailActionTest { .setPhoneNumber("+1.3105551215") .setFaxNumber("+1.3105551216") .setTypes(ImmutableSet.of(RegistrarPoc.Type.ADMIN)) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsTech(true) .build()); persistResources(contacts); assertThat(action.getEmailAddresses(registrar, Type.TECH)) diff --git a/core/src/test/java/google/registry/export/sheet/SyncRegistrarsSheetTest.java b/core/src/test/java/google/registry/export/sheet/SyncRegistrarsSheetTest.java index 0fa6d6c72..49333048d 100644 --- a/core/src/test/java/google/registry/export/sheet/SyncRegistrarsSheetTest.java +++ b/core/src/test/java/google/registry/export/sheet/SyncRegistrarsSheetTest.java @@ -168,8 +168,8 @@ public class SyncRegistrarsSheetTest { .setTypes(ImmutableSet.of(RegistrarPoc.Type.ADMIN)) // Purposely flip the internal/external admin/tech // distinction to make sure we're not relying on it. Sigh. - .setVisibleInWhoisAsAdmin(false) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsAdmin(false) + .setVisibleInRdapAsTech(true) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -201,9 +201,9 @@ public class SyncRegistrarsSheetTest { contact@example.com Tel: +1.1234567890 Types: [ADMIN, BILLING] - Visible in registrar WHOIS query as Admin contact: No - Visible in registrar WHOIS query as Technical contact: No - Phone number and email visible in domain WHOIS query as Registrar Abuse contact\ + Visible in registrar RDAP query as Admin contact: No + Visible in registrar RDAP query as Technical contact: No + Phone number and email visible in domain RDAP query as Registrar Abuse contact\ info: No John Doe @@ -211,9 +211,9 @@ public class SyncRegistrarsSheetTest { Tel: +1.1234567890 Fax: +1.1234567891 Types: [ADMIN] - Visible in registrar WHOIS query as Admin contact: No - Visible in registrar WHOIS query as Technical contact: Yes - Phone number and email visible in domain WHOIS query as Registrar Abuse contact\ + Visible in registrar RDAP query as Admin contact: No + Visible in registrar RDAP query as Technical contact: Yes + Phone number and email visible in domain RDAP query as Registrar Abuse contact\ info: No """); assertThat(row) @@ -223,9 +223,9 @@ public class SyncRegistrarsSheetTest { Jane Smith pride@example.net Types: [TECH] - Visible in registrar WHOIS query as Admin contact: No - Visible in registrar WHOIS query as Technical contact: No - Phone number and email visible in domain WHOIS query as Registrar Abuse contact\ + Visible in registrar RDAP query as Admin contact: No + Visible in registrar RDAP query as Technical contact: No + Phone number and email visible in domain RDAP query as Registrar Abuse contact\ info: No """); assertThat(row).containsEntry("marketingContacts", ""); @@ -240,9 +240,9 @@ public class SyncRegistrarsSheetTest { contact@example.com Tel: +1.1234567890 Types: [ADMIN, BILLING] - Visible in registrar WHOIS query as Admin contact: No - Visible in registrar WHOIS query as Technical contact: No - Phone number and email visible in domain WHOIS query as Registrar Abuse contact\ + Visible in registrar RDAP query as Admin contact: No + Visible in registrar RDAP query as Technical contact: No + Phone number and email visible in domain RDAP query as Registrar Abuse contact\ info: No """); assertThat(row).containsEntry("contactsMarkedAsWhoisAdmin", ""); @@ -255,9 +255,9 @@ public class SyncRegistrarsSheetTest { Tel: +1.1234567890 Fax: +1.1234567891 Types: [ADMIN] - Visible in registrar WHOIS query as Admin contact: No - Visible in registrar WHOIS query as Technical contact: Yes - Phone number and email visible in domain WHOIS query as Registrar Abuse contact\ + Visible in registrar RDAP query as Admin contact: No + Visible in registrar RDAP query as Technical contact: Yes + Phone number and email visible in domain RDAP query as Registrar Abuse contact\ info: No """); assertThat(row).containsEntry("emailAddress", "nowhere@example.org"); diff --git a/core/src/test/java/google/registry/model/registrar/RegistrarTest.java b/core/src/test/java/google/registry/model/registrar/RegistrarTest.java index 1a0fd51f9..902ca256e 100644 --- a/core/src/test/java/google/registry/model/registrar/RegistrarTest.java +++ b/core/src/test/java/google/registry/model/registrar/RegistrarTest.java @@ -126,8 +126,8 @@ class RegistrarTest extends EntityTestCase { .setRegistrar(registrar) .setName("John Abused") .setEmailAddress("johnabuse@example.com") - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .setPhoneNumber("+1.2125551213") .setFaxNumber("+1.2125551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.ABUSE, RegistrarPoc.Type.ADMIN)) @@ -323,8 +323,8 @@ class RegistrarTest extends EntityTestCase { .setRegistrar(registrar) .setName("Jake Tech") .setEmailAddress("jaketech@example.com") - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) .setPhoneNumber("+1.2125551213") .setFaxNumber("+1.2125551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH)) @@ -335,8 +335,8 @@ class RegistrarTest extends EntityTestCase { .setRegistrar(registrar) .setName("Jim Tech-Abuse") .setEmailAddress("jimtechAbuse@example.com") - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) .setPhoneNumber("+1.2125551213") .setFaxNumber("+1.2125551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH, RegistrarPoc.Type.ABUSE)) diff --git a/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerExtension.java b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerExtension.java index 0b7ccdfaa..94afac9a7 100644 --- a/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerExtension.java +++ b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerExtension.java @@ -407,8 +407,8 @@ public abstract class JpaTransactionManagerExtension return new RegistrarPoc.Builder() .setRegistrar(makeRegistrar1()) .setName("Jane Doe") - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .setEmailAddress("janedoe@theregistrar.com") .setPhoneNumber("+1.1234567890") .setTypes(ImmutableSet.of(RegistrarPoc.Type.ADMIN)) diff --git a/core/src/test/java/google/registry/rdap/RdapJsonFormatterTest.java b/core/src/test/java/google/registry/rdap/RdapJsonFormatterTest.java index f4670d8b6..896e0befe 100644 --- a/core/src/test/java/google/registry/rdap/RdapJsonFormatterTest.java +++ b/core/src/test/java/google/registry/rdap/RdapJsonFormatterTest.java @@ -198,8 +198,8 @@ class RdapJsonFormatterTest { .setPhoneNumber("+1.2125551217") .setFaxNumber("+1.2125551218") .setTypes(ImmutableSet.of(RegistrarPoc.Type.ADMIN)) - .setVisibleInWhoisAsAdmin(false) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(false) + .setVisibleInRdapAsTech(false) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -207,8 +207,8 @@ class RdapJsonFormatterTest { .setEmailAddress("johndoe@example.com") .setFaxNumber("+1.2125551213") .setTypes(ImmutableSet.of(RegistrarPoc.Type.ADMIN)) - .setVisibleInWhoisAsAdmin(false) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsAdmin(false) + .setVisibleInRdapAsTech(true) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -216,8 +216,8 @@ class RdapJsonFormatterTest { .setEmailAddress("janedoe@example.com") .setPhoneNumber("+1.2125551215") .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH, RegistrarPoc.Type.ADMIN)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -226,8 +226,8 @@ class RdapJsonFormatterTest { .setPhoneNumber("+1.2125551217") .setFaxNumber("+1.2125551218") .setTypes(ImmutableSet.of(RegistrarPoc.Type.BILLING)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) .build()); } diff --git a/core/src/test/java/google/registry/reporting/spec11/Spec11EmailUtilsTest.java b/core/src/test/java/google/registry/reporting/spec11/Spec11EmailUtilsTest.java index 7546ead7d..3363fb4ef 100644 --- a/core/src/test/java/google/registry/reporting/spec11/Spec11EmailUtilsTest.java +++ b/core/src/test/java/google/registry/reporting/spec11/Spec11EmailUtilsTest.java @@ -354,13 +354,13 @@ class Spec11EmailUtilsTest { } @Test - void testSuccess_useWhoisAbuseEmailIfAvailable() throws Exception { - // if John Doe is the whois abuse contact, email them instead of the regular email + void testSuccess_useRdapAbuseEmailIfAvailable() throws Exception { + // if John Doe is the RDAP abuse contact, email them instead of the regular email persistResource( makeRegistrarContact2() .asBuilder() .setEmailAddress("johndoe@theregistrar.com") - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); emailUtils.emailSpec11Reports( date, diff --git a/core/src/test/java/google/registry/schema/registrar/RegistrarPocTest.java b/core/src/test/java/google/registry/schema/registrar/RegistrarPocTest.java index 27283080d..e886c4264 100644 --- a/core/src/test/java/google/registry/schema/registrar/RegistrarPocTest.java +++ b/core/src/test/java/google/registry/schema/registrar/RegistrarPocTest.java @@ -53,9 +53,9 @@ class RegistrarPocTest { .setPhoneNumber("+1.2125650000") .setFaxNumber("+1.2125650001") .setTypes(ImmutableSet.of(WHOIS)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) - .setVisibleInDomainWhoisAsAbuse(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) + .setVisibleInDomainRdapAsAbuse(false) .build(); } diff --git a/core/src/test/java/google/registry/testing/FullFieldsTestEntityHelper.java b/core/src/test/java/google/registry/testing/FullFieldsTestEntityHelper.java index 88f04bf18..eaadf9cee 100644 --- a/core/src/test/java/google/registry/testing/FullFieldsTestEntityHelper.java +++ b/core/src/test/java/google/registry/testing/FullFieldsTestEntityHelper.java @@ -48,7 +48,7 @@ import java.util.Optional; import javax.annotation.Nullable; import org.joda.time.DateTime; -/** Test helper methods for the rdap and whois packages. */ +/** Test helper methods for the RDAP package. */ public final class FullFieldsTestEntityHelper { public static Registrar makeRegistrar( @@ -100,8 +100,8 @@ public final class FullFieldsTestEntityHelper { .setTypes(ImmutableSet.of(RegistrarPoc.Type.ADMIN)) // Purposely flip the internal/external admin/tech // distinction to make sure we're not relying on it. Sigh. - .setVisibleInWhoisAsAdmin(false) - .setVisibleInWhoisAsTech(true) + .setVisibleInRdapAsAdmin(false) + .setVisibleInRdapAsTech(true) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -112,8 +112,8 @@ public final class FullFieldsTestEntityHelper { .setTypes(ImmutableSet.of(RegistrarPoc.Type.TECH)) // Purposely flip the internal/external admin/tech // distinction to make sure we're not relying on it. Sigh. - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) .build(), new RegistrarPoc.Builder() .setRegistrar(registrar) @@ -121,7 +121,7 @@ public final class FullFieldsTestEntityHelper { .setEmailAddress("jakedoe@example.com") .setPhoneNumber("+1.2125551216") .setFaxNumber("+1.2125551216") - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); } diff --git a/core/src/test/java/google/registry/tools/RegistrarPocCommandTest.java b/core/src/test/java/google/registry/tools/RegistrarPocCommandTest.java index 01e578c28..5afacdbe3 100644 --- a/core/src/test/java/google/registry/tools/RegistrarPocCommandTest.java +++ b/core/src/test/java/google/registry/tools/RegistrarPocCommandTest.java @@ -59,7 +59,7 @@ class RegistrarPocCommandTest extends CommandTestCase { .setName("John Doe") .setEmailAddress("john.doe@example.com") .setTypes(ImmutableSet.of(ADMIN)) - .setVisibleInWhoisAsAdmin(true) + .setVisibleInRdapAsAdmin(true) .build()))); runCommandForced("--mode=LIST", "--output=" + output, "NewRegistrar"); assertThat(Files.readAllLines(Paths.get(output), UTF_8)) @@ -67,9 +67,9 @@ class RegistrarPocCommandTest extends CommandTestCase { "John Doe", "john.doe@example.com", "Types: [ADMIN]", - "Visible in registrar WHOIS query as Admin contact: Yes", - "Visible in registrar WHOIS query as Technical contact: No", - "Phone number and email visible in domain WHOIS query as " + "Visible in registrar RDAP query as Admin contact: Yes", + "Visible in registrar RDAP query as Technical contact: No", + "Phone number and email visible in domain RDAP query as " + "Registrar Abuse contact info: No"); } @@ -83,9 +83,9 @@ class RegistrarPocCommandTest extends CommandTestCase { .setName("Judith Doe") .setEmailAddress("judith.doe@example.com") .setTypes(ImmutableSet.of(WHOIS)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) - .setVisibleInDomainWhoisAsAbuse(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) + .setVisibleInDomainRdapAsAbuse(false) .build()); persistResources(contacts); runCommandForced( @@ -95,9 +95,9 @@ class RegistrarPocCommandTest extends CommandTestCase { "--phone=+1.2125650000", "--fax=+1.2125650001", "--contact_type=WHOIS", - "--visible_in_whois_as_admin=true", - "--visible_in_whois_as_tech=false", - "--visible_in_domain_whois_as_abuse=false", + "--visible_in_rdap_as_admin=true", + "--visible_in_rdap_as_tech=false", + "--visible_in_domain_rdap_as_abuse=false", "NewRegistrar"); RegistrarPoc registrarPoc = loadRegistrar("NewRegistrar").getContacts().asList().get(1); assertAboutImmutableObjects() @@ -110,15 +110,15 @@ class RegistrarPocCommandTest extends CommandTestCase { .setPhoneNumber("+1.2125650000") .setFaxNumber("+1.2125650001") .setTypes(ImmutableSet.of(WHOIS)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) - .setVisibleInDomainWhoisAsAbuse(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) + .setVisibleInDomainRdapAsAbuse(false) .build(), "id"); } @Test - void testUpdate_unsetOtherWhoisAbuseFlags() throws Exception { + void testUpdate_unsetOtherRdapAbuseFlags() throws Exception { Registrar registrar = loadRegistrar("NewRegistrar"); persistResource( new RegistrarPoc.Builder() @@ -131,33 +131,33 @@ class RegistrarPocCommandTest extends CommandTestCase { .setRegistrar(registrar) .setName("Johnna Doe") .setEmailAddress("johnna.doe@example.com") - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); runCommandForced( "--mode=UPDATE", "--email=john.doe@example.com", - "--visible_in_domain_whois_as_abuse=true", + "--visible_in_domain_rdap_as_abuse=true", "NewRegistrar"); ImmutableList registrarPocs = loadRegistrar("NewRegistrar").getContacts().asList(); for (RegistrarPoc registrarPoc : registrarPocs) { if ("John Doe".equals(registrarPoc.getName())) { - assertThat(registrarPoc.getVisibleInDomainWhoisAsAbuse()).isTrue(); + assertThat(registrarPoc.getVisibleInDomainRdapAsAbuse()).isTrue(); } else { - assertThat(registrarPoc.getVisibleInDomainWhoisAsAbuse()).isFalse(); + assertThat(registrarPoc.getVisibleInDomainRdapAsAbuse()).isFalse(); } } } @Test - void testUpdate_cannotUnsetOnlyWhoisAbuseContact() { + void testUpdate_cannotUnsetOnlyRdapAbuseContact() { Registrar registrar = loadRegistrar("NewRegistrar"); persistResource( new RegistrarPoc.Builder() .setRegistrar(registrar) .setName("John Doe") .setEmailAddress("john.doe@example.com") - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); IllegalArgumentException thrown = assertThrows( @@ -166,13 +166,13 @@ class RegistrarPocCommandTest extends CommandTestCase { runCommandForced( "--mode=UPDATE", "--email=john.doe@example.com", - "--visible_in_domain_whois_as_abuse=false", + "--visible_in_domain_rdap_as_abuse=false", "NewRegistrar")); assertThat(thrown) .hasMessageThat() - .contains("Cannot clear visible_in_domain_whois_as_abuse flag"); + .contains("Cannot clear visible_in_domain_rdap_as_abuse flag"); RegistrarPoc registrarPoc = loadRegistrar("NewRegistrar").getContacts().asList().get(1); - assertThat(registrarPoc.getVisibleInDomainWhoisAsAbuse()).isTrue(); + assertThat(registrarPoc.getVisibleInDomainRdapAsAbuse()).isTrue(); } @Test @@ -187,9 +187,9 @@ class RegistrarPocCommandTest extends CommandTestCase { .setPhoneNumber("123-456-7890") .setFaxNumber("123-456-7890") .setTypes(ImmutableSet.of(ADMIN, ABUSE)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); runCommandForced("--mode=UPDATE", "--email=john.doe@example.com", "NewRegistrar"); RegistrarPoc registrarPoc = loadRegistrar("NewRegistrar").getContacts().asList().get(1); @@ -198,12 +198,12 @@ class RegistrarPocCommandTest extends CommandTestCase { assertThat(registrarPoc.getPhoneNumber()).isEqualTo(existingContact.getPhoneNumber()); assertThat(registrarPoc.getFaxNumber()).isEqualTo(existingContact.getFaxNumber()); assertThat(registrarPoc.getTypes()).isEqualTo(existingContact.getTypes()); - assertThat(registrarPoc.getVisibleInWhoisAsAdmin()) - .isEqualTo(existingContact.getVisibleInWhoisAsAdmin()); - assertThat(registrarPoc.getVisibleInWhoisAsTech()) - .isEqualTo(existingContact.getVisibleInWhoisAsTech()); - assertThat(registrarPoc.getVisibleInDomainWhoisAsAbuse()) - .isEqualTo(existingContact.getVisibleInDomainWhoisAsAbuse()); + assertThat(registrarPoc.getVisibleInRdapAsAdmin()) + .isEqualTo(existingContact.getVisibleInRdapAsAdmin()); + assertThat(registrarPoc.getVisibleInRdapAsTech()) + .isEqualTo(existingContact.getVisibleInRdapAsTech()); + assertThat(registrarPoc.getVisibleInDomainRdapAsAbuse()) + .isEqualTo(existingContact.getVisibleInDomainRdapAsAbuse()); } @Test @@ -217,9 +217,9 @@ class RegistrarPocCommandTest extends CommandTestCase { .setPhoneNumber("123-456-7890") .setFaxNumber("123-456-7890") .setTypes(ImmutableSet.of(ADMIN, ABUSE)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); runCommandForced( "--mode=UPDATE", @@ -254,9 +254,9 @@ class RegistrarPocCommandTest extends CommandTestCase { "--name=Jim Doe", "--email=jim.doe@example.com", "--contact_type=ADMIN,ABUSE", - "--visible_in_whois_as_admin=true", - "--visible_in_whois_as_tech=false", - "--visible_in_domain_whois_as_abuse=true", + "--visible_in_rdap_as_admin=true", + "--visible_in_rdap_as_tech=false", + "--visible_in_domain_rdap_as_abuse=true", "NewRegistrar"); RegistrarPoc registrarPoc = loadRegistrar("NewRegistrar").getContacts().asList().get(1); assertAboutImmutableObjects() @@ -267,9 +267,9 @@ class RegistrarPocCommandTest extends CommandTestCase { .setName("Jim Doe") .setEmailAddress("jim.doe@example.com") .setTypes(ImmutableSet.of(ADMIN, ABUSE)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) + .setVisibleInDomainRdapAsAbuse(true) .build(), "id"); } @@ -282,16 +282,16 @@ class RegistrarPocCommandTest extends CommandTestCase { } @Test - void testDelete_failsOnDomainWhoisAbuseContact() { + void testDelete_failsOnDomainRdapAbuseContact() { RegistrarPoc registrarPoc = loadRegistrar("NewRegistrar").getContacts().asList().getFirst(); - persistResource(registrarPoc.asBuilder().setVisibleInDomainWhoisAsAbuse(true).build()); + persistResource(registrarPoc.asBuilder().setVisibleInDomainRdapAsAbuse(true).build()); IllegalArgumentException thrown = assertThrows( IllegalArgumentException.class, () -> runCommandForced( "--mode=DELETE", "--email=janedoe@theregistrar.com", "NewRegistrar")); - assertThat(thrown).hasMessageThat().contains("Cannot delete the domain WHOIS abuse contact"); + assertThat(thrown).hasMessageThat().contains("Cannot delete the domain RDAP abuse contact"); assertThat(loadRegistrar("NewRegistrar").getContacts()).isNotEmpty(); } diff --git a/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java b/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java index fc4fa3f37..9f7265306 100644 --- a/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java +++ b/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java @@ -108,7 +108,7 @@ class UpdateRegistrarCommandTest extends CommandTestCase @Test void testSuccess_allowedTlds() throws Exception { - persistWhoisAbuseContact(); + persistRdapAbuseContact(); createTlds("xn--q9jyb4c", "foobar"); persistResource( loadRegistrar("NewRegistrar") @@ -126,7 +126,7 @@ class UpdateRegistrarCommandTest extends CommandTestCase @Test void testSuccess_addAllowedTlds() throws Exception { - persistWhoisAbuseContact(); + persistRdapAbuseContact(); createTlds("xn--q9jyb4c", "foo", "bar"); persistResource( loadRegistrar("NewRegistrar") @@ -144,7 +144,7 @@ class UpdateRegistrarCommandTest extends CommandTestCase @Test void testSuccess_addAllowedTldsWithDupes() throws Exception { - persistWhoisAbuseContact(); + persistRdapAbuseContact(); createTlds("xn--q9jyb4c", "foo", "bar"); persistResource( loadRegistrar("NewRegistrar") @@ -968,11 +968,11 @@ class UpdateRegistrarCommandTest extends CommandTestCase .isEqualTo("Provided email lolcat is not a valid email address"); } - private void persistWhoisAbuseContact() { + private void persistRdapAbuseContact() { persistResource( JpaTransactionManagerExtension.makeRegistrarContact1() .asBuilder() - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInDomainRdapAsAbuse(true) .build()); } } diff --git a/core/src/test/java/google/registry/ui/server/console/ConsoleUpdateRegistrarActionTest.java b/core/src/test/java/google/registry/ui/server/console/ConsoleUpdateRegistrarActionTest.java index 7f8d15e1f..7f6223c7d 100644 --- a/core/src/test/java/google/registry/ui/server/console/ConsoleUpdateRegistrarActionTest.java +++ b/core/src/test/java/google/registry/ui/server/console/ConsoleUpdateRegistrarActionTest.java @@ -135,7 +135,7 @@ class ConsoleUpdateRegistrarActionTest extends ConsoleActionBaseTestCase { } @Test - void testFails_missingWhoisContact() throws IOException { + void testFails_missingRdapContact() throws IOException { RegistryEnvironment.PRODUCTION.setup(systemPropertyExtension); var action = createAction( @@ -148,11 +148,11 @@ class ConsoleUpdateRegistrarActionTest extends ConsoleActionBaseTestCase { action.run(); assertThat(response.getStatus()).isEqualTo(SC_BAD_REQUEST); assertThat((String) response.getPayload()) - .contains("Cannot modify allowed TLDs if there is no WHOIS abuse contact set"); + .contains("Cannot modify allowed TLDs if there is no RDAP abuse contact set"); } @Test - void testSuccess_presentWhoisContact() throws IOException { + void testSuccess_presentRdapContact() throws IOException { RegistryEnvironment.PRODUCTION.setup(systemPropertyExtension); RegistrarPoc contact = new RegistrarPoc.Builder() @@ -162,9 +162,9 @@ class ConsoleUpdateRegistrarActionTest extends ConsoleActionBaseTestCase { .setPhoneNumber("+1.9999999999") .setFaxNumber("+1.9999999991") .setTypes(ImmutableSet.of(WHOIS)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(true) - .setVisibleInDomainWhoisAsAbuse(true) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(true) + .setVisibleInDomainRdapAsAbuse(true) .build(); persistResource(contact); var action = diff --git a/core/src/test/java/google/registry/ui/server/console/settings/ContactActionTest.java b/core/src/test/java/google/registry/ui/server/console/settings/ContactActionTest.java index c1b19c7ad..169d36b5d 100644 --- a/core/src/test/java/google/registry/ui/server/console/settings/ContactActionTest.java +++ b/core/src/test/java/google/registry/ui/server/console/settings/ContactActionTest.java @@ -14,7 +14,6 @@ package google.registry.ui.server.console.settings; -import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.registrar.RegistrarPoc.Type.ABUSE; import static google.registry.model.registrar.RegistrarPoc.Type.ADMIN; @@ -63,8 +62,8 @@ class ContactActionTest extends ConsoleActionBaseTestCase { + "\"emailAddress\":\"test.registrar1@example.com\"," + "\"registrarId\":\"registrarId\"," + "\"phoneNumber\":\"+1.9999999999\",\"faxNumber\":\"+1.9999999991\"," - + "\"types\":[\"ADMIN\"],\"visibleInWhoisAsAdmin\":true," - + "\"visibleInWhoisAsTech\":false,\"visibleInDomainWhoisAsAbuse\":false}"; + + "\"types\":[\"ADMIN\"],\"visibleInRdapAsAdmin\":true," + + "\"visibleInRdapAsTech\":false,\"visibleInDomainRdapAsAbuse\":false}"; private Registrar testRegistrar; private RegistrarPoc adminPoc; @@ -83,17 +82,17 @@ class ContactActionTest extends ConsoleActionBaseTestCase { .setPhoneNumber("+1.9999999999") .setFaxNumber("+1.9999999991") .setTypes(ImmutableSet.of(ADMIN)) - .setVisibleInWhoisAsAdmin(true) - .setVisibleInWhoisAsTech(false) - .setVisibleInDomainWhoisAsAbuse(false) + .setVisibleInRdapAsAdmin(true) + .setVisibleInRdapAsTech(false) + .setVisibleInDomainRdapAsAbuse(false) .build()); techPoc = adminPoc .asBuilder() .setName("Test Registrar 2") .setTypes(ImmutableSet.of(TECH)) - .setVisibleInWhoisAsTech(true) - .setVisibleInWhoisAsAdmin(false) + .setVisibleInRdapAsTech(true) + .setVisibleInRdapAsAdmin(false) .setEmailAddress("test.registrar2@example.com") .setPhoneNumber("+1.1234567890") .setFaxNumber("+1.1234567891") @@ -103,7 +102,7 @@ class ContactActionTest extends ConsoleActionBaseTestCase { .asBuilder() .setName("Test Registrar 3") .setTypes(ImmutableSet.of(MARKETING)) - .setVisibleInWhoisAsAdmin(false) + .setVisibleInRdapAsAdmin(false) .setEmailAddress("test.registrar3@example.com") .setPhoneNumber("+1.1238675309") .setFaxNumber("+1.1238675309") @@ -137,8 +136,7 @@ class ContactActionTest extends ConsoleActionBaseTestCase { assertThat( loadAllOf(RegistrarPoc.class).stream() .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId())) - .map(r -> r.getName()) - .collect(toImmutableList())) + .map(r -> r.getName())) .containsExactly("Test Registrar 1", "Test Registrar 2"); } @@ -183,8 +181,7 @@ class ContactActionTest extends ConsoleActionBaseTestCase { assertThat( loadAllOf(RegistrarPoc.class).stream() .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId())) - .map(r -> r.getName()) - .collect(toImmutableList())) + .map(r -> r.getName())) .containsExactly("Test Registrar 1", "Test Registrar 2"); } @@ -201,8 +198,7 @@ class ContactActionTest extends ConsoleActionBaseTestCase { assertThat(response.getPayload()).isEqualTo("Must have at least one primary contact"); assertThat( loadAllOf(RegistrarPoc.class).stream() - .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId())) - .collect(toImmutableList())) + .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId()))) .containsExactly(adminPoc); } @@ -225,42 +221,40 @@ class ContactActionTest extends ConsoleActionBaseTestCase { .isEqualTo("Please provide a phone number for at least one technical contact"); assertThat( loadAllOf(RegistrarPoc.class).stream() - .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId())) - .collect(toImmutableList())) + .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId()))) .containsExactly(adminPoc); } @Test - void testFailure_postUpdateContactInfo_whoisContactMissingPhoneNumber() throws IOException { + void testFailure_postUpdateContactInfo_rdapContactMissingPhoneNumber() throws IOException { ContactAction action = createAction( Action.Method.POST, fteUser, testRegistrar.getRegistrarId(), - techPoc.asBuilder().setPhoneNumber(null).setVisibleInDomainWhoisAsAbuse(true).build()); + techPoc.asBuilder().setPhoneNumber(null).setVisibleInDomainRdapAsAbuse(true).build()); action.run(); assertThat(response.getStatus()).isEqualTo(SC_BAD_REQUEST); assertThat(response.getPayload()) - .isEqualTo("The abuse contact visible in domain WHOIS query must have a phone number"); + .isEqualTo("The abuse contact visible in domain RDAP query must have a phone number"); } @Test - void testFailure_postUpdateContactInfo_whoisContactPhoneNumberRemoved() throws IOException { - adminPoc = persistResource(adminPoc.asBuilder().setVisibleInDomainWhoisAsAbuse(true).build()); + void testFailure_postUpdateContactInfo_rdapContactPhoneNumberRemoved() throws IOException { + adminPoc = persistResource(adminPoc.asBuilder().setVisibleInDomainRdapAsAbuse(true).build()); ContactAction action = createAction( Action.Method.PUT, fteUser, testRegistrar.getRegistrarId(), - adminPoc.asBuilder().setVisibleInDomainWhoisAsAbuse(false).build()); + adminPoc.asBuilder().setVisibleInDomainRdapAsAbuse(false).build()); action.run(); assertThat(response.getStatus()).isEqualTo(SC_BAD_REQUEST); assertThat(response.getPayload()) - .isEqualTo("An abuse contact visible in domain WHOIS query must be designated"); + .isEqualTo("An abuse contact visible in domain RDAP query must be designated"); assertThat( loadAllOf(RegistrarPoc.class).stream() - .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId())) - .collect(toImmutableList())) + .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId()))) .containsExactly(adminPoc); } @@ -291,19 +285,16 @@ by admin fte@email.tld: contacts: ADDED: {id=5, name=Test Registrar 2, emailAddress=incorrect@example.com, registrarId=registrarId, \ -phoneNumber=+1.1234567890, faxNumber=+1.1234567891, types=[TECH], visibleInWhoisAsAdmin=false, \ -visibleInWhoisAsTech=true, visibleInDomainWhoisAsAbuse=false, \ -allowedToSetRegistryLockPassword=false} +phoneNumber=+1.1234567890, faxNumber=+1.1234567891, types=[TECH], visibleInRdapAsAdmin=false, \ +visibleInRdapAsTech=true, visibleInDomainRdapAsAbuse=false} REMOVED: {id=5, name=Test Registrar 2, emailAddress=test.registrar2@example.com, \ registrarId=registrarId, phoneNumber=+1.1234567890, faxNumber=+1.1234567891, types=[TECH], \ -visibleInWhoisAsAdmin=false, visibleInWhoisAsTech=true, visibleInDomainWhoisAsAbuse=false, \ -allowedToSetRegistryLockPassword=false} +visibleInRdapAsAdmin=false, visibleInRdapAsTech=true, visibleInDomainRdapAsAbuse=false} FINAL CONTENTS: {id=5, name=Test Registrar 2, emailAddress=incorrect@example.com, registrarId=registrarId, \ -phoneNumber=+1.1234567890, faxNumber=+1.1234567891, types=[TECH], visibleInWhoisAsAdmin=false, \ -visibleInWhoisAsTech=true, visibleInDomainWhoisAsAbuse=false, \ -allowedToSetRegistryLockPassword=false} +phoneNumber=+1.1234567890, faxNumber=+1.1234567891, types=[TECH], visibleInRdapAsAdmin=false, \ +visibleInRdapAsTech=true, visibleInDomainRdapAsAbuse=false} """) .setRecipients(ImmutableList.of(new InternetAddress("notification@test.example"))) .build()); @@ -319,8 +310,7 @@ allowedToSetRegistryLockPassword=false} assertThat( loadAllOf(RegistrarPoc.class).stream() .filter(r -> r.registrarId.equals(testRegistrar.getRegistrarId())) - .map(r -> r.getName()) - .collect(toImmutableList())) + .map(r -> r.getName())) .containsExactly("Test Registrar 1", "Test Registrar 2"); } diff --git a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html index a4837be05..fa225f68f 100644 --- a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html @@ -261,7 +261,7 @@ td.section { generated on - 2025-10-27 19:43:48 + 2025-10-28 16:31:44 last flyway file @@ -273,7 +273,7 @@ td.section {

 

- SchemaCrawler_Diagram generated by SchemaCrawler 16.27.1 generated on 2025-10-27 19:43:48 + SchemaCrawler_Diagram generated by SchemaCrawler 16.27.1 generated on 2025-10-28 16:31:44 allocationtoken_a08ccbef public."AllocationToken" [table] token text not null domain_name text redemption_domain_repo_id text token_type text diff --git a/db/src/main/resources/sql/er_diagram/full_er_diagram.html b/db/src/main/resources/sql/er_diagram/full_er_diagram.html index 68e0afb8f..54eb836cf 100644 --- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html @@ -261,7 +261,7 @@ td.section {
generated on - 2025-10-27 19:43:45 + 2025-10-28 16:31:41
last flyway file @@ -273,7 +273,7 @@ td.section {

 

- SchemaCrawler_Diagram generated by SchemaCrawler 16.27.1 generated on 2025-10-27 19:43:45 + SchemaCrawler_Diagram generated by SchemaCrawler 16.27.1 generated on 2025-10-28 16:31:41 allocationtoken_a08ccbef public."AllocationToken" [table] token text not null update_timestamp timestamptz allowed_registrar_ids _text allowed_tlds _text creation_time timestamptz not null discount_fraction float8(17, 17) not null discount_premiums bool not null discount_years int4 not null domain_name text redemption_domain_repo_id text token_status_transitions hstore token_type text redemption_domain_history_id int8 renewal_price_behavior text not null registration_behavior text not null allowed_epp_actions _text renewal_price_amount numeric(19, 2) renewal_price_currency text discount_price_amount numeric(19, 2) discount_price_currency text diff --git a/db/src/main/resources/sql/schema/db-schema.sql.generated b/db/src/main/resources/sql/schema/db-schema.sql.generated index d959327a0..b2110ff2b 100644 --- a/db/src/main/resources/sql/schema/db-schema.sql.generated +++ b/db/src/main/resources/sql/schema/db-schema.sql.generated @@ -683,7 +683,6 @@ create table "RegistrarPoc" ( email_address text not null, registrar_id text not null, - allowed_to_set_registry_lock_password boolean not null, fax_number text, id bigint, name text,