Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions console-webapp/src/app/settings/contact/contact.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export interface Contact {
registrarId?: string;
faxNumber?: string;
types: Array<contactType>;
visibleInWhoisAsAdmin?: boolean;
visibleInWhoisAsTech?: boolean;
visibleInDomainWhoisAsAbuse?: boolean;
visibleInRdapAsAdmin?: boolean;
visibleInRdapAsTech?: boolean;
visibleInDomainRdapAsAbuse?: boolean;
}

export interface ViewReadyContact extends Contact {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,23 +111,23 @@ <h1>Contact Type</h1>
<h1>RDAP Preferences</h1>
<div>
<mat-checkbox
[(ngModel)]="contactService.contactInEdit.visibleInWhoisAsAdmin"
[(ngModel)]="contactService.contactInEdit.visibleInRdapAsAdmin"
[ngModelOptions]="{ standalone: true }"
>Show in Registrar RDAP record as admin contact</mat-checkbox
>
</div>

<div>
<mat-checkbox
[(ngModel)]="contactService.contactInEdit.visibleInWhoisAsTech"
[(ngModel)]="contactService.contactInEdit.visibleInRdapAsTech"
[ngModelOptions]="{ standalone: true }"
>Show in Registrar RDAP record as technical contact</mat-checkbox
>
</div>

<div>
<mat-checkbox
[(ngModel)]="contactService.contactInEdit.visibleInDomainWhoisAsAbuse"
[(ngModel)]="contactService.contactInEdit.visibleInDomainRdapAsAbuse"
[ngModelOptions]="{ standalone: true }"
>Show Phone and Email in Domain RDAP Record as registrar abuse contact
(per CL&D requirements)</mat-checkbox
Expand Down Expand Up @@ -189,24 +189,24 @@ <h2>Contact details</h2>
<mat-list-item role="listitem">
<h2>RDAP Preferences</h2>
</mat-list-item>
@if(contactService.contactInEdit.visibleInWhoisAsAdmin) {
@if(contactService.contactInEdit.visibleInRdapAsAdmin) {
<mat-divider></mat-divider>
<mat-list-item role="listitem">
<span class="console-app__list-value"
>Show in Registrar RDAP record as admin contact</span
>
</mat-list-item>
} @if(contactService.contactInEdit.visibleInWhoisAsTech) {
} @if(contactService.contactInEdit.visibleInRdapAsTech) {
<mat-divider></mat-divider>
<mat-list-item
role="listitem"
*ngIf="contactService.contactInEdit.visibleInWhoisAsTech"
*ngIf="contactService.contactInEdit.visibleInRdapAsTech"
>
<span class="console-app__list-value"
>Show in Registrar RDAP record as technical contact</span
>
</mat-list-item>
} @if(contactService.contactInEdit.visibleInDomainWhoisAsAbuse) {
} @if(contactService.contactInEdit.visibleInDomainRdapAsAbuse) {
<mat-divider></mat-divider>
<mat-list-item role="listitem">
<span class="console-app__list-value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1556,12 +1556,7 @@ public static String getGSuiteOutgoingEmailDisplayName() {
return CONFIG_SETTINGS.get().gSuite.outgoingEmailDisplayName;
}

/**
* Returns default WHOIS server to use when {@code Registrar#getWhoisServer()} is {@code null}.
*
* @see "google.registry.whois.DomainWhoisResponse"
* @see "google.registry.whois.RegistrarWhoisResponse"
*/
/** Returns default WHOIS server to use when {@code Registrar#getWhoisServer()} is null. */
public static String getDefaultRegistrarWhoisServer() {
return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarWhoisServer;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ public int compare(Registrar left, Registrar right) {
builder.put("billingContacts", convertContacts(contacts, byType(BILLING)));
builder.put(
"contactsMarkedAsWhoisAdmin",
convertContacts(contacts, RegistrarPoc::getVisibleInWhoisAsAdmin));
convertContacts(contacts, RegistrarPoc::getVisibleInRdapAsAdmin));
builder.put(
"contactsMarkedAsWhoisTech",
convertContacts(contacts, RegistrarPoc::getVisibleInWhoisAsTech));
convertContacts(contacts, RegistrarPoc::getVisibleInRdapAsTech));
builder.put("emailAddress", convert(registrar.getEmailAddress()));
builder.put("address.street", convert(address.getStreet()));
builder.put("address.city", convert(address.getCity()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public enum State {
immutableEnumSet(State.ACTIVE, State.SUSPENDED);

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

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

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

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

private ImmutableList<RegistrarPoc> getPocs(TransactionManager txnManager) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@
* A contact for a Registrar. Note, equality, hashCode and comparable have been overridden to only
* enable key equality.
*
* <p>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.
* <p>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)
public class RegistrarPoc extends ImmutableObject implements Jsonifiable, UnsafeSerializable {
/**
* Registrar contacts types for partner communication tracking.
*
* <p><b>Note:</b> These types only matter to the registry. They are not meant to be used for
* WHOIS or RDAP results.
* <p><b>Note:</b> These types only matter to the registry. They are not meant to be used for RDAP
* results.
*/
public enum Type {
ABUSE("abuse", true),
Expand Down Expand Up @@ -115,32 +115,23 @@ public boolean isRequired() {
@Expose
Set<Type> 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;

/**
* Whether this contact is publicly visible in WHOIS registrar query results as a Technical
* contact.
*/
@Column(nullable = false)
/** If this contact is publicly visible in RDAP registrar query results as a Technical contact */
@Column(nullable = false, name = "visibleInWhoisAsTech")
@Expose
boolean visibleInWhoisAsTech = false;
boolean visibleInRdapAsTech = 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
Expand Down Expand Up @@ -188,16 +179,16 @@ public ImmutableSortedSet<Type> getTypes() {
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() {
Expand All @@ -214,8 +205,8 @@ public Builder asBuilder() {
* 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
* }</pre>
Expand All @@ -232,18 +223,18 @@ public String toStringMultilinePlainText() {
}
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();
}
Expand All @@ -256,9 +247,9 @@ public Map<String, Object> toJsonMap() {
.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();
}
Expand Down Expand Up @@ -336,18 +327,18 @@ public Builder setTypes(Iterable<Type> types) {
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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static Optional<RdapRegistrarPocEntity> makeRdapJsonForRegistrarPoc(RegistrarPoc
}

/**
* 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.
*
* <p>Only POCs with a non-empty role list should be visible.
*
Expand All @@ -672,13 +672,13 @@ static Optional<RdapRegistrarPocEntity> makeRdapJsonForRegistrarPoc(RegistrarPoc
*/
private static ImmutableList<RdapEntity.Role> makeRdapRoleList(RegistrarPoc registrarPoc) {
ImmutableList.Builder<RdapEntity.Role> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void sendAlertEmail(String subject, String body) {

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(
Expand All @@ -235,7 +235,7 @@ private InternetAddress getEmailAddressForRegistrar(String registrarId)
String.format("Could not find registrar %s", registrarId)));
return new InternetAddress(
registrar
.getWhoisAbuseContact()
.getRdapAbuseContact()
.map(RegistrarPoc::getEmailAddress)
.orElse(registrar.getEmailAddress()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void checkModifyAllowedTlds(@Nullable Registrar oldRegistrar) {
"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.");
}

Expand Down
Loading