Skip to content

Commit dee132d

Browse files
authored
Rename visibleInWhois fields to visibleInRdap (#2863)
Still part of b/454947209, removing references to WHOIS where we can. We keep the registrar type and the column names (at least for now) because changing those is much more complicated.
1 parent 847ef12 commit dee132d

28 files changed

+269
-295
lines changed

console-webapp/src/app/settings/contact/contact.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export interface Contact {
4747
registrarId?: string;
4848
faxNumber?: string;
4949
types: Array<contactType>;
50-
visibleInWhoisAsAdmin?: boolean;
51-
visibleInWhoisAsTech?: boolean;
52-
visibleInDomainWhoisAsAbuse?: boolean;
50+
visibleInRdapAsAdmin?: boolean;
51+
visibleInRdapAsTech?: boolean;
52+
visibleInDomainRdapAsAbuse?: boolean;
5353
}
5454

5555
export interface ViewReadyContact extends Contact {

console-webapp/src/app/settings/contact/contactDetails.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,23 @@ <h1>Contact Type</h1>
111111
<h1>RDAP Preferences</h1>
112112
<div>
113113
<mat-checkbox
114-
[(ngModel)]="contactService.contactInEdit.visibleInWhoisAsAdmin"
114+
[(ngModel)]="contactService.contactInEdit.visibleInRdapAsAdmin"
115115
[ngModelOptions]="{ standalone: true }"
116116
>Show in Registrar RDAP record as admin contact</mat-checkbox
117117
>
118118
</div>
119119

120120
<div>
121121
<mat-checkbox
122-
[(ngModel)]="contactService.contactInEdit.visibleInWhoisAsTech"
122+
[(ngModel)]="contactService.contactInEdit.visibleInRdapAsTech"
123123
[ngModelOptions]="{ standalone: true }"
124124
>Show in Registrar RDAP record as technical contact</mat-checkbox
125125
>
126126
</div>
127127

128128
<div>
129129
<mat-checkbox
130-
[(ngModel)]="contactService.contactInEdit.visibleInDomainWhoisAsAbuse"
130+
[(ngModel)]="contactService.contactInEdit.visibleInDomainRdapAsAbuse"
131131
[ngModelOptions]="{ standalone: true }"
132132
>Show Phone and Email in Domain RDAP Record as registrar abuse contact
133133
(per CL&D requirements)</mat-checkbox
@@ -189,24 +189,24 @@ <h2>Contact details</h2>
189189
<mat-list-item role="listitem">
190190
<h2>RDAP Preferences</h2>
191191
</mat-list-item>
192-
@if(contactService.contactInEdit.visibleInWhoisAsAdmin) {
192+
@if(contactService.contactInEdit.visibleInRdapAsAdmin) {
193193
<mat-divider></mat-divider>
194194
<mat-list-item role="listitem">
195195
<span class="console-app__list-value"
196196
>Show in Registrar RDAP record as admin contact</span
197197
>
198198
</mat-list-item>
199-
} @if(contactService.contactInEdit.visibleInWhoisAsTech) {
199+
} @if(contactService.contactInEdit.visibleInRdapAsTech) {
200200
<mat-divider></mat-divider>
201201
<mat-list-item
202202
role="listitem"
203-
*ngIf="contactService.contactInEdit.visibleInWhoisAsTech"
203+
*ngIf="contactService.contactInEdit.visibleInRdapAsTech"
204204
>
205205
<span class="console-app__list-value"
206206
>Show in Registrar RDAP record as technical contact</span
207207
>
208208
</mat-list-item>
209-
} @if(contactService.contactInEdit.visibleInDomainWhoisAsAbuse) {
209+
} @if(contactService.contactInEdit.visibleInDomainRdapAsAbuse) {
210210
<mat-divider></mat-divider>
211211
<mat-list-item role="listitem">
212212
<span class="console-app__list-value"

core/src/main/java/google/registry/config/RegistryConfig.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,12 +1556,7 @@ public static String getGSuiteOutgoingEmailDisplayName() {
15561556
return CONFIG_SETTINGS.get().gSuite.outgoingEmailDisplayName;
15571557
}
15581558

1559-
/**
1560-
* Returns default WHOIS server to use when {@code Registrar#getWhoisServer()} is {@code null}.
1561-
*
1562-
* @see "google.registry.whois.DomainWhoisResponse"
1563-
* @see "google.registry.whois.RegistrarWhoisResponse"
1564-
*/
1559+
/** Returns default WHOIS server to use when {@code Registrar#getWhoisServer()} is null. */
15651560
public static String getDefaultRegistrarWhoisServer() {
15661561
return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarWhoisServer;
15671562
}

core/src/main/java/google/registry/export/sheet/SyncRegistrarsSheet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ public int compare(Registrar left, Registrar right) {
128128
builder.put("billingContacts", convertContacts(contacts, byType(BILLING)));
129129
builder.put(
130130
"contactsMarkedAsWhoisAdmin",
131-
convertContacts(contacts, RegistrarPoc::getVisibleInWhoisAsAdmin));
131+
convertContacts(contacts, RegistrarPoc::getVisibleInRdapAsAdmin));
132132
builder.put(
133133
"contactsMarkedAsWhoisTech",
134-
convertContacts(contacts, RegistrarPoc::getVisibleInWhoisAsTech));
134+
convertContacts(contacts, RegistrarPoc::getVisibleInRdapAsTech));
135135
builder.put("emailAddress", convert(registrar.getEmailAddress()));
136136
builder.put("address.street", convert(address.getStreet()));
137137
builder.put("address.city", convert(address.getCity()));

core/src/main/java/google/registry/model/registrar/Registrar.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public enum State {
192192
immutableEnumSet(State.ACTIVE, State.SUSPENDED);
193193

194194
/**
195-
* The types for which a {@link Registrar} should be included in WHOIS and RDAP output. We exclude
195+
* The types for which a {@link Registrar} should be included in RDAP output. We exclude
196196
* registrars of type TEST. We considered excluding INTERNAL as well, but decided that
197197
* troubleshooting would be easier with INTERNAL registrars visible. Before removing other types
198198
* from view, carefully consider the effect on things like prober monitoring and OT&E.
@@ -416,13 +416,13 @@ public enum State {
416416
String phonePasscode;
417417

418418
/**
419-
* A dirty bit for whether RegistrarContact changes have been made that haven't been synced to
420-
* Google Groups yet. When creating a new instance, contacts require syncing by default.
419+
* A dirty bit for whether RegistrarPoc changes have been made that haven't been synced to Google
420+
* Groups yet. When creating a new instance, contacts require syncing by default.
421421
*/
422422
@Column(nullable = false)
423423
boolean contactsRequireSyncing = true;
424424

425-
/** Whether or not registry lock is allowed for this registrar. */
425+
/** Whether registry lock is allowed for this registrar. */
426426
@Column(nullable = false)
427427
@Expose
428428
boolean registryLockAllowed = false;
@@ -612,11 +612,11 @@ public ImmutableSortedSet<RegistrarPoc> getPocsOfType(final RegistrarPoc.Type ty
612612
}
613613

614614
/**
615-
* Returns the {@link RegistrarPoc} that is the WHOIS abuse contact for this registrar, or empty
616-
* if one does not exist.
615+
* Returns the {@link RegistrarPoc} that is the RDAP abuse contact for this registrar, or empty if
616+
* one does not exist.
617617
*/
618-
public Optional<RegistrarPoc> getWhoisAbuseContact() {
619-
return getContacts().stream().filter(RegistrarPoc::getVisibleInDomainWhoisAsAbuse).findFirst();
618+
public Optional<RegistrarPoc> getRdapAbuseContact() {
619+
return getContacts().stream().filter(RegistrarPoc::getVisibleInDomainRdapAsAbuse).findFirst();
620620
}
621621

622622
private ImmutableList<RegistrarPoc> getPocs(TransactionManager txnManager) {

core/src/main/java/google/registry/model/registrar/RegistrarPoc.java

Lines changed: 37 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@
4848
* A contact for a Registrar. Note, equality, hashCode and comparable have been overridden to only
4949
* enable key equality.
5050
*
51-
* <p>IMPORTANT NOTE: Any time that you change, update, or delete RegistrarContact entities, you
52-
* *MUST* also modify the persisted Registrar entity with {@link Registrar#contactsRequireSyncing}
53-
* set to true.
51+
* <p>IMPORTANT NOTE: Any time that you change, update, or delete RegistrarPoc entities, you *MUST*
52+
* also modify the persisted Registrar entity with {@link Registrar#contactsRequireSyncing} set to
53+
* true.
5454
*/
5555
@Entity
5656
@IdClass(RegistrarPoc.RegistrarPocId.class)
5757
public class RegistrarPoc extends ImmutableObject implements Jsonifiable, UnsafeSerializable {
5858
/**
5959
* Registrar contacts types for partner communication tracking.
6060
*
61-
* <p><b>Note:</b> These types only matter to the registry. They are not meant to be used for
62-
* WHOIS or RDAP results.
61+
* <p><b>Note:</b> These types only matter to the registry. They are not meant to be used for RDAP
62+
* results.
6363
*/
6464
public enum Type {
6565
ABUSE("abuse", true),
@@ -115,32 +115,23 @@ public boolean isRequired() {
115115
@Expose
116116
Set<Type> types;
117117

118-
/**
119-
* Whether this contact is publicly visible in WHOIS registrar query results as an Admin contact.
120-
*/
121-
@Column(nullable = false)
118+
/** If this contact is publicly visible in RDAP registrar query results as an Admin contact */
119+
@Column(nullable = false, name = "visibleInWhoisAsAdmin")
122120
@Expose
123-
boolean visibleInWhoisAsAdmin = false;
121+
boolean visibleInRdapAsAdmin = false;
124122

125-
/**
126-
* Whether this contact is publicly visible in WHOIS registrar query results as a Technical
127-
* contact.
128-
*/
129-
@Column(nullable = false)
123+
/** If this contact is publicly visible in RDAP registrar query results as a Technical contact */
124+
@Column(nullable = false, name = "visibleInWhoisAsTech")
130125
@Expose
131-
boolean visibleInWhoisAsTech = false;
126+
boolean visibleInRdapAsTech = false;
132127

133128
/**
134-
* Whether this contact's phone number and email address is publicly visible in WHOIS domain query
129+
* If this contact's phone number and email address are publicly visible in RDAP domain query
135130
* results as registrar abuse contact info.
136131
*/
137-
@Column(nullable = false)
132+
@Column(nullable = false, name = "visibleInDomainWhoisAsAbuse")
138133
@Expose
139-
boolean visibleInDomainWhoisAsAbuse = false;
140-
141-
/** Legacy field, around until we can remove the non-null constraint and the column from SQL. */
142-
@Column(nullable = false)
143-
boolean allowedToSetRegistryLockPassword = false;
134+
boolean visibleInDomainRdapAsAbuse = false;
144135

145136
/**
146137
* Helper to update the contacts associated with a Registrar. This requires querying for the
@@ -188,16 +179,16 @@ public ImmutableSortedSet<Type> getTypes() {
188179
return nullToEmptyImmutableSortedCopy(types);
189180
}
190181

191-
public boolean getVisibleInWhoisAsAdmin() {
192-
return visibleInWhoisAsAdmin;
182+
public boolean getVisibleInRdapAsAdmin() {
183+
return visibleInRdapAsAdmin;
193184
}
194185

195-
public boolean getVisibleInWhoisAsTech() {
196-
return visibleInWhoisAsTech;
186+
public boolean getVisibleInRdapAsTech() {
187+
return visibleInRdapAsTech;
197188
}
198189

199-
public boolean getVisibleInDomainWhoisAsAbuse() {
200-
return visibleInDomainWhoisAsAbuse;
190+
public boolean getVisibleInDomainRdapAsAbuse() {
191+
return visibleInDomainRdapAsAbuse;
201192
}
202193

203194
public Builder asBuilder() {
@@ -214,8 +205,8 @@ public Builder asBuilder() {
214205
215206
* Tel: +1.2125650666
216207
* Types: [ADMIN, WHOIS]
217-
* Visible in WHOIS as Admin contact: Yes
218-
* Visible in WHOIS as Technical contact: No
208+
* Visible in RDAP as Admin contact: Yes
209+
* Visible in RDAP as Technical contact: No
219210
* Registrar-Console access: Yes
220211
* Login Email Address: [email protected]
221212
* }</pre>
@@ -232,18 +223,18 @@ public String toStringMultilinePlainText() {
232223
}
233224
result.append("Types: ").append(getTypes()).append('\n');
234225
result
235-
.append("Visible in registrar WHOIS query as Admin contact: ")
236-
.append(getVisibleInWhoisAsAdmin() ? "Yes" : "No")
226+
.append("Visible in registrar RDAP query as Admin contact: ")
227+
.append(getVisibleInRdapAsAdmin() ? "Yes" : "No")
237228
.append('\n');
238229
result
239-
.append("Visible in registrar WHOIS query as Technical contact: ")
240-
.append(getVisibleInWhoisAsTech() ? "Yes" : "No")
230+
.append("Visible in registrar RDAP query as Technical contact: ")
231+
.append(getVisibleInRdapAsTech() ? "Yes" : "No")
241232
.append('\n');
242233
result
243234
.append(
244-
"Phone number and email visible in domain WHOIS query as "
235+
"Phone number and email visible in domain RDAP query as "
245236
+ "Registrar Abuse contact info: ")
246-
.append(getVisibleInDomainWhoisAsAbuse() ? "Yes" : "No")
237+
.append(getVisibleInDomainRdapAsAbuse() ? "Yes" : "No")
247238
.append('\n');
248239
return result.toString();
249240
}
@@ -256,9 +247,9 @@ public Map<String, Object> toJsonMap() {
256247
.put("phoneNumber", phoneNumber)
257248
.put("faxNumber", faxNumber)
258249
.put("types", getTypes().stream().map(Object::toString).collect(joining(",")))
259-
.put("visibleInWhoisAsAdmin", visibleInWhoisAsAdmin)
260-
.put("visibleInWhoisAsTech", visibleInWhoisAsTech)
261-
.put("visibleInDomainWhoisAsAbuse", visibleInDomainWhoisAsAbuse)
250+
.put("visibleInRdapAsAdmin", visibleInRdapAsAdmin)
251+
.put("visibleInRdapAsTech", visibleInRdapAsTech)
252+
.put("visibleInDomainRdapAsAbuse", visibleInDomainRdapAsAbuse)
262253
.put("id", getId())
263254
.build();
264255
}
@@ -336,18 +327,18 @@ public Builder setTypes(Iterable<Type> types) {
336327
return this;
337328
}
338329

339-
public Builder setVisibleInWhoisAsAdmin(boolean visible) {
340-
getInstance().visibleInWhoisAsAdmin = visible;
330+
public Builder setVisibleInRdapAsAdmin(boolean visible) {
331+
getInstance().visibleInRdapAsAdmin = visible;
341332
return this;
342333
}
343334

344-
public Builder setVisibleInWhoisAsTech(boolean visible) {
345-
getInstance().visibleInWhoisAsTech = visible;
335+
public Builder setVisibleInRdapAsTech(boolean visible) {
336+
getInstance().visibleInRdapAsTech = visible;
346337
return this;
347338
}
348339

349-
public Builder setVisibleInDomainWhoisAsAbuse(boolean visible) {
350-
getInstance().visibleInDomainWhoisAsAbuse = visible;
340+
public Builder setVisibleInDomainRdapAsAbuse(boolean visible) {
341+
getInstance().visibleInDomainRdapAsAbuse = visible;
351342
return this;
352343
}
353344
}

core/src/main/java/google/registry/rdap/RdapJsonFormatter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static Optional<RdapRegistrarPocEntity> makeRdapJsonForRegistrarPoc(RegistrarPoc
658658
}
659659

660660
/**
661-
* Creates the list of RDAP roles for a registrar POC, using the visibleInWhoisAs* flags.
661+
* Creates the list of RDAP roles for a registrar POC, using the visibleInRdapAs* flags.
662662
*
663663
* <p>Only POCs with a non-empty role list should be visible.
664664
*
@@ -672,13 +672,13 @@ static Optional<RdapRegistrarPocEntity> makeRdapJsonForRegistrarPoc(RegistrarPoc
672672
*/
673673
private static ImmutableList<RdapEntity.Role> makeRdapRoleList(RegistrarPoc registrarPoc) {
674674
ImmutableList.Builder<RdapEntity.Role> rolesBuilder = new ImmutableList.Builder<>();
675-
if (registrarPoc.getVisibleInWhoisAsAdmin()) {
675+
if (registrarPoc.getVisibleInRdapAsAdmin()) {
676676
rolesBuilder.add(RdapEntity.Role.ADMIN);
677677
}
678-
if (registrarPoc.getVisibleInWhoisAsTech()) {
678+
if (registrarPoc.getVisibleInRdapAsTech()) {
679679
rolesBuilder.add(RdapEntity.Role.TECH);
680680
}
681-
if (registrarPoc.getVisibleInDomainWhoisAsAbuse()) {
681+
if (registrarPoc.getVisibleInDomainRdapAsAbuse()) {
682682
rolesBuilder.add(RdapEntity.Role.ABUSE);
683683
}
684684
return rolesBuilder.build();

core/src/main/java/google/registry/reporting/spec11/Spec11EmailUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void sendAlertEmail(String subject, String body) {
226226

227227
private InternetAddress getEmailAddressForRegistrar(String registrarId)
228228
throws MessagingException {
229-
// Attempt to use the registrar's WHOIS abuse contact, then fall back to the regular address.
229+
// Attempt to use the registrar's RDAP abuse contact, then fall back to the regular address.
230230
Registrar registrar =
231231
Registrar.loadByRegistrarIdCached(registrarId)
232232
.orElseThrow(
@@ -235,7 +235,7 @@ private InternetAddress getEmailAddressForRegistrar(String registrarId)
235235
String.format("Could not find registrar %s", registrarId)));
236236
return new InternetAddress(
237237
registrar
238-
.getWhoisAbuseContact()
238+
.getRdapAbuseContact()
239239
.map(RegistrarPoc::getEmailAddress)
240240
.orElse(registrar.getEmailAddress()));
241241
}

core/src/main/java/google/registry/tools/CreateRegistrarCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void checkModifyAllowedTlds(@Nullable Registrar oldRegistrar) {
105105
"Cannot add allowed TLDs when creating a REAL registrar in a production environment."
106106
+ " Please create the registrar without allowed TLDs, then use `nomulus"
107107
+ " registrar_contact` to create a registrar contact for it that is visible as the"
108-
+ " abuse contact in WHOIS. Then use `nomulus update_registrar` to add the allowed"
108+
+ " abuse contact in RDAP. Then use `nomulus update_registrar` to add the allowed"
109109
+ " TLDs.");
110110
}
111111

0 commit comments

Comments
 (0)