mirror of
https://github.com/google/nomulus
synced 2026-05-23 16:21:55 +00:00
Compare commits
8 Commits
nomulus-20
...
proxy-2023
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd0d8af7b3 | ||
|
|
2da8ea0185 | ||
|
|
7a84844000 | ||
|
|
1580555d30 | ||
|
|
4fb8a1b50b | ||
|
|
e07f25000d | ||
|
|
cc1777af0c | ||
|
|
87e54c001f |
@@ -37,7 +37,7 @@
|
||||
background-color: transparent;
|
||||
}
|
||||
.active {
|
||||
background: #eae1e1;
|
||||
background-color: var(--secondary);
|
||||
}
|
||||
}
|
||||
&__content-wrapper {
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
<p>
|
||||
<p class="console-app__header">
|
||||
<mat-toolbar color="primary">
|
||||
<button mat-icon-button aria-label="Open menu" (click)="toggleNavPane()">
|
||||
<mat-icon>menu</mat-icon>
|
||||
</button>
|
||||
<span>
|
||||
<a
|
||||
[routerLink]="'/home'"
|
||||
routerLinkActive="active"
|
||||
class="console-app__logo"
|
||||
>
|
||||
Google Registry
|
||||
</a>
|
||||
</span>
|
||||
<a
|
||||
[routerLink]="'/home'"
|
||||
routerLinkActive="active"
|
||||
class="console-app__logo"
|
||||
>
|
||||
Google Registry
|
||||
</a>
|
||||
<span class="spacer"></span>
|
||||
<app-registrar-selector />
|
||||
<button mat-icon-button aria-label="Open FAQ">
|
||||
<mat-icon>question_mark</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button aria-label="Open user info">
|
||||
<button
|
||||
mat-icon-button
|
||||
[matMenuTriggerFor]="menu"
|
||||
#menuTrigger
|
||||
aria-label="Open user info"
|
||||
>
|
||||
<mat-icon>person</mat-icon>
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item (click)="logOut()">Log out</button>
|
||||
</mat-menu>
|
||||
</mat-toolbar>
|
||||
</p>
|
||||
|
||||
@@ -17,6 +17,21 @@
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
&__header {
|
||||
@media (max-width: 599px) {
|
||||
.mat-toolbar {
|
||||
padding: 0;
|
||||
}
|
||||
.console-app__logo {
|
||||
font-size: 16px;
|
||||
}
|
||||
button {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
width: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.spacer {
|
||||
flex: 1;
|
||||
|
||||
@@ -28,4 +28,8 @@ export class HeaderComponent {
|
||||
this.isNavOpen = !this.isNavOpen;
|
||||
this.toggleNavOpen.emit(this.isNavOpen);
|
||||
}
|
||||
|
||||
logOut() {
|
||||
window.open('/console?gcp-iap-mode=CLEAR_LOGIN_COOKIE', '_self');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,4 +29,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 510px) {
|
||||
.console-app__widget-wrapper__wide {
|
||||
grid-column: initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
white-space: nowrap;
|
||||
|
||||
&-icon {
|
||||
transform: scale(3);
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<div class="console-app__registrar">
|
||||
<div>
|
||||
<button
|
||||
mat-button
|
||||
[routerLink]="'/settings/registrars'"
|
||||
routerLinkActive="active"
|
||||
*ngIf="isMobile; else desktop"
|
||||
>
|
||||
{{ registrarService.activeRegistrarId || "Select registrar" }}
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</button>
|
||||
<ng-template #desktop>
|
||||
<mat-form-field class="mat-form-field-density-5" appearance="fill">
|
||||
<mat-label>Registrar</mat-label>
|
||||
<mat-select
|
||||
@@ -14,5 +23,5 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
@@ -12,14 +12,35 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { RegistrarService } from './registrar.service';
|
||||
import { BreakpointObserver } from '@angular/cdk/layout';
|
||||
import { distinctUntilChanged } from 'rxjs';
|
||||
|
||||
const MOBILE_LAYOUT_BREAKPOINT = '(max-width: 599px)';
|
||||
|
||||
@Component({
|
||||
selector: 'app-registrar-selector',
|
||||
templateUrl: './registrar-selector.component.html',
|
||||
styleUrls: ['./registrar-selector.component.scss'],
|
||||
})
|
||||
export class RegistrarSelectorComponent {
|
||||
constructor(protected registrarService: RegistrarService) {}
|
||||
export class RegistrarSelectorComponent implements OnInit {
|
||||
protected isMobile: boolean = false;
|
||||
|
||||
readonly breakpoint$ = this.breakpointObserver
|
||||
.observe([MOBILE_LAYOUT_BREAKPOINT])
|
||||
.pipe(distinctUntilChanged());
|
||||
|
||||
constructor(
|
||||
protected registrarService: RegistrarService,
|
||||
protected breakpointObserver: BreakpointObserver
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.breakpoint$.subscribe(() => this.breakpointChanged());
|
||||
}
|
||||
|
||||
private breakpointChanged() {
|
||||
this.isMobile = this.breakpointObserver.isMatched(MOBILE_LAYOUT_BREAKPOINT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
<div class="console-app__registrars">
|
||||
<table
|
||||
mat-table
|
||||
[dataSource]="registrarService.registrars"
|
||||
<mat-table
|
||||
[dataSource]="dataSource"
|
||||
class="mat-elevation-z8"
|
||||
class="console-app__registrars-table"
|
||||
matSort
|
||||
>
|
||||
<ng-container
|
||||
*ngFor="let column of columns"
|
||||
[matColumnDef]="column.columnDef"
|
||||
>
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
{{ column.header }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row" [innerHTML]="column.cell(row)"></td>
|
||||
<mat-header-cell *matHeaderCellDef> {{ column.header }} </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" [innerHTML]="column.cell(row)"></mat-cell>
|
||||
</ng-container>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
<mat-paginator
|
||||
class="mat-elevation-z8"
|
||||
[pageSizeOptions]="[5, 10, 20]"
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
.console-app {
|
||||
$min-width: 756px;
|
||||
|
||||
&__registrars {
|
||||
margin-top: 1.5rem;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
&__registrars-table {
|
||||
min-width: $min-width !important;
|
||||
}
|
||||
|
||||
.mat-mdc-paginator {
|
||||
min-width: $min-width !important;
|
||||
}
|
||||
|
||||
.mat-column {
|
||||
&-driveId {
|
||||
min-width: 200px;
|
||||
word-break: break-all;
|
||||
}
|
||||
&-registryLockAllowed {
|
||||
max-width: 80px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,16 +12,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { Registrar, RegistrarService } from './registrar.service';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
|
||||
@Component({
|
||||
selector: 'app-registrar',
|
||||
templateUrl: './registrarsTable.component.html',
|
||||
styleUrls: ['./registrarsTable.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class RegistrarComponent {
|
||||
public static PATH = 'registrars';
|
||||
dataSource: MatTableDataSource<Registrar>;
|
||||
columns = [
|
||||
{
|
||||
columnDef: 'registrarId',
|
||||
@@ -72,5 +77,18 @@ export class RegistrarComponent {
|
||||
},
|
||||
];
|
||||
displayedColumns = this.columns.map((c) => c.columnDef);
|
||||
constructor(protected registrarService: RegistrarService) {}
|
||||
|
||||
@ViewChild(MatPaginator) paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) sort!: MatSort;
|
||||
|
||||
constructor(protected registrarService: RegistrarService) {
|
||||
this.dataSource = new MatTableDataSource<Registrar>(
|
||||
registrarService.registrars
|
||||
);
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h3 mat-dialog-title>Contact details</h3>
|
||||
<div mat-dialog-content>
|
||||
<form (ngSubmit)="saveAndClose($event)">
|
||||
<div>
|
||||
<p>
|
||||
<mat-form-field class="contact-details__input">
|
||||
<mat-label>Name: </mat-label>
|
||||
<input
|
||||
@@ -11,9 +11,9 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
<mat-form-field class="contact-details__input">
|
||||
<mat-label>Primary account email: </mat-label>
|
||||
<input
|
||||
@@ -25,9 +25,9 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
<mat-form-field class="contact-details__input">
|
||||
<mat-label>Phone: </mat-label>
|
||||
<input
|
||||
@@ -36,9 +36,9 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
<mat-form-field class="contact-details__input">
|
||||
<mat-label>Fax: </mat-label>
|
||||
<input
|
||||
@@ -47,7 +47,7 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div class="contact-details__group">
|
||||
<label>Contact type:</label>
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
.console-settings {
|
||||
.mdc-tab {
|
||||
&.active-link {
|
||||
border-bottom: 2px solid #673ab7;
|
||||
border-bottom: 2px solid var(--primary);
|
||||
.mdc-tab__text-label {
|
||||
color: #673ab7;
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ export class BackendService {
|
||||
|
||||
getUserData(): Observable<UserData> {
|
||||
return this.http
|
||||
.get<UserData>(`/console-api/userdata`)
|
||||
.get<UserData>('/console-api/userdata')
|
||||
.pipe(catchError((err) => this.errorCatcher<UserData>(err)));
|
||||
}
|
||||
|
||||
|
||||
@@ -44,13 +44,15 @@ body {
|
||||
&-link {
|
||||
padding: 0 !important;
|
||||
text-align: left;
|
||||
height: 20px !important;
|
||||
min-width: auto !important;
|
||||
height: min-content !important;
|
||||
}
|
||||
&-title {
|
||||
color: var(--primary) !important;
|
||||
text-align: center;
|
||||
}
|
||||
&-icon {
|
||||
color: var(--text);
|
||||
font-size: 5rem;
|
||||
line-height: 5rem;
|
||||
height: 5rem !important;
|
||||
|
||||
@@ -17,20 +17,9 @@ $theme-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
// The warn palette is optional (defaults to red).
|
||||
$theme-warn: mat.define-palette(mat.$red-palette);
|
||||
|
||||
// Create the theme object. A theme consists of configurations for individual
|
||||
// theming systems such as "color" or "typography".
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $theme-primary,
|
||||
accent: $theme-accent,
|
||||
warn: $theme-warn,
|
||||
),
|
||||
density: 0,
|
||||
)
|
||||
);
|
||||
|
||||
/** Application specific section **/
|
||||
/**
|
||||
** Application specific section - Global styles and mixins
|
||||
**/
|
||||
|
||||
@mixin form-field-density($density) {
|
||||
$field-typography: mat.define-typography-config(
|
||||
@@ -46,19 +35,6 @@ $theme: mat.define-light-theme(
|
||||
@include form-field-density(-5);
|
||||
}
|
||||
|
||||
$foreground: map.merge($theme, mat.$light-theme-foreground-palette);
|
||||
|
||||
// Access and define a class with secondary color exposed
|
||||
.secondary-text {
|
||||
color: map.get($foreground, "secondary-text");
|
||||
}
|
||||
|
||||
:root {
|
||||
--primary: #{mat.get-color-from-palette($theme-primary, 500)};
|
||||
--secondary: #{map.get($foreground, "secondary-text")};
|
||||
}
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@import "@angular/material/theming";
|
||||
|
||||
// Define application specific typography settings, font-family, etc
|
||||
@@ -67,3 +43,61 @@ $typography-configuration: mat-typography-config(
|
||||
);
|
||||
|
||||
@include angular-material-typography($typography-configuration);
|
||||
|
||||
/**
|
||||
** Light theme
|
||||
**/
|
||||
$light-theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $theme-primary,
|
||||
accent: $theme-accent,
|
||||
warn: $theme-warn,
|
||||
),
|
||||
density: 0,
|
||||
)
|
||||
);
|
||||
|
||||
// Access and define a class with secondary color exposed
|
||||
.secondary-text {
|
||||
color: map.get(mat.$light-theme-foreground-palette, "secondary-text");
|
||||
}
|
||||
|
||||
:root {
|
||||
--text: #{map.get(mat.$light-theme-foreground-palette, "base")};
|
||||
--primary: #{mat.get-color-from-palette($theme-primary, 500)};
|
||||
--secondary: #{map.get(mat.$light-theme-foreground-palette, "secondary-text")};
|
||||
}
|
||||
|
||||
@include mat.all-component-themes($light-theme);
|
||||
|
||||
/**
|
||||
** Dark theme
|
||||
**/
|
||||
$dark-theme: mat.define-dark-theme(
|
||||
(
|
||||
color: (
|
||||
primary: mat.define-palette(mat.$pink-palette),
|
||||
accent: mat.define-palette(mat.$blue-grey-palette),
|
||||
),
|
||||
density: 0,
|
||||
)
|
||||
);
|
||||
|
||||
@mixin _apply-dark-mode-colors() {
|
||||
@include mat.all-component-colors($dark-theme);
|
||||
|
||||
.secondary-text {
|
||||
color: map.get(mat.$dark-theme-foreground-palette, "secondary-text");
|
||||
}
|
||||
|
||||
:root {
|
||||
--text: #{map.get(mat.$dark-theme-foreground-palette, "base")};
|
||||
--primary: #{mat.get-color-from-palette(mat.$pink-palette, 500)};
|
||||
--secondary: #{map.get(mat.$dark-theme-background-palette, "secondary-text")};
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@include _apply-dark-mode-colors();
|
||||
}
|
||||
|
||||
@@ -879,6 +879,17 @@ public final class RegistryConfig {
|
||||
return Optional.ofNullable(config.misc.sheetExportId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the desired delay between outgoing emails when sending in bulk.
|
||||
*
|
||||
* <p>Gmail apparently has unpublished limits on peak throughput over short period.
|
||||
*/
|
||||
@Provides
|
||||
@Config("emailThrottleDuration")
|
||||
public static Duration provideEmailThrottleSeconds(RegistryConfigSettings config) {
|
||||
return Duration.standardSeconds(config.misc.emailThrottleSeconds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the email address we send various alert e-mails to.
|
||||
*
|
||||
|
||||
@@ -208,6 +208,7 @@ public class RegistryConfigSettings {
|
||||
public static class Misc {
|
||||
public String sheetExportId;
|
||||
public boolean isEmailSendingEnabled;
|
||||
public int emailThrottleSeconds;
|
||||
public String alertRecipientEmailAddress;
|
||||
// TODO(b/279671974): remove below field after migration
|
||||
public String newAlertRecipientEmailAddress;
|
||||
|
||||
@@ -443,6 +443,9 @@ misc:
|
||||
# Whether emails may be sent. For Prod and Sandbox this should be true.
|
||||
isEmailSendingEnabled: false
|
||||
|
||||
# Delay between bulk messages to avoid triggering Gmail fraud checks
|
||||
emailThrottleSeconds: 30
|
||||
|
||||
# Address we send alert summary emails to.
|
||||
alertRecipientEmailAddress: email@example.com
|
||||
|
||||
|
||||
@@ -58,13 +58,13 @@ public class EntityYamlUtils {
|
||||
SimpleModule module = new SimpleModule();
|
||||
module.addSerializer(Money.class, new MoneySerializer());
|
||||
module.addDeserializer(Money.class, new MoneyDeserializer());
|
||||
module.addSerializer(Duration.class, new DurationSerializer());
|
||||
ObjectMapper mapper =
|
||||
JsonMapper.builder(new YAMLFactory().disable(Feature.WRITE_DOC_START_MARKER))
|
||||
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||
.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)
|
||||
.build()
|
||||
.registerModule(module);
|
||||
mapper.findAndRegisterModules();
|
||||
.build();
|
||||
mapper.findAndRegisterModules().registerModule(module);
|
||||
return mapper;
|
||||
}
|
||||
|
||||
@@ -201,6 +201,24 @@ public class EntityYamlUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/** A custom JSON serializer for a {@link Duration} object. */
|
||||
public static class DurationSerializer extends StdSerializer<Duration> {
|
||||
|
||||
public DurationSerializer() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public DurationSerializer(Class<Duration> t) {
|
||||
super(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(Duration value, JsonGenerator gen, SerializerProvider provider)
|
||||
throws IOException {
|
||||
gen.writeString(value.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/** A custom JSON serializer for an Optional of a {@link Duration} object. */
|
||||
public static class OptionalDurationSerializer extends StdSerializer<Optional<Duration>> {
|
||||
|
||||
@@ -216,7 +234,7 @@ public class EntityYamlUtils {
|
||||
public void serialize(Optional<Duration> value, JsonGenerator gen, SerializerProvider provider)
|
||||
throws IOException {
|
||||
if (value.isPresent()) {
|
||||
gen.writeNumber(value.get().getMillis());
|
||||
gen.writeString(value.get().toString());
|
||||
} else {
|
||||
gen.writeNull();
|
||||
}
|
||||
|
||||
@@ -35,21 +35,16 @@ import javax.persistence.Table;
|
||||
|
||||
/** A console user, either a registry employee or a registrar partner. */
|
||||
@Entity
|
||||
@Table(
|
||||
indexes = {
|
||||
@Index(columnList = "gaiaId", name = "user_gaia_id_idx"),
|
||||
@Index(columnList = "emailAddress", name = "user_email_address_idx")
|
||||
})
|
||||
@Table(indexes = {@Index(columnList = "emailAddress", name = "user_email_address_idx")})
|
||||
public class User extends UpdateAutoTimestampEntity implements Buildable {
|
||||
|
||||
private static final long serialVersionUID = 6936728603828566721L;
|
||||
|
||||
/** Autogenerated unique ID of this user. */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/** GAIA ID associated with the user in question. */
|
||||
private String gaiaId;
|
||||
|
||||
/** Email address of the user in question. */
|
||||
@Column(nullable = false)
|
||||
private String emailAddress;
|
||||
@@ -71,10 +66,6 @@ public class User extends UpdateAutoTimestampEntity implements Buildable {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getGaiaId() {
|
||||
return gaiaId;
|
||||
}
|
||||
|
||||
public String getEmailAddress() {
|
||||
return emailAddress;
|
||||
}
|
||||
@@ -139,12 +130,6 @@ public class User extends UpdateAutoTimestampEntity implements Buildable {
|
||||
return super.build();
|
||||
}
|
||||
|
||||
public Builder setGaiaId(String gaiaId) {
|
||||
checkArgument(!isNullOrEmpty(gaiaId), "Gaia ID cannot be null or empty");
|
||||
getInstance().gaiaId = gaiaId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEmailAddress(String emailAddress) {
|
||||
getInstance().emailAddress = checkValidEmail(emailAddress);
|
||||
return this;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class BillingEmailUtils {
|
||||
GmailClient gmailClient,
|
||||
YearMonth yearMonth,
|
||||
@Config("gSuiteOutgoingEmailAddress") InternetAddress outgoingEmailAddress,
|
||||
@Config("alertRecipientEmailAddress") InternetAddress alertRecipientAddress,
|
||||
@Config("newAlertRecipientEmailAddress") InternetAddress alertRecipientAddress,
|
||||
@Config("invoiceEmailRecipients") ImmutableList<InternetAddress> invoiceEmailRecipients,
|
||||
@Config("invoiceReplyToEmailAddress") Optional<InternetAddress> replyToEmailAddress,
|
||||
@Config("billingBucket") String billingBucket,
|
||||
|
||||
@@ -37,11 +37,13 @@ import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registrar.RegistrarPoc;
|
||||
import google.registry.reporting.spec11.soy.Spec11EmailSoyInfo;
|
||||
import google.registry.util.EmailMessage;
|
||||
import google.registry.util.Sleeper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import org.joda.time.Duration;
|
||||
import org.joda.time.LocalDate;
|
||||
|
||||
/** Provides e-mail functionality for Spec11 tasks, such as sending Spec11 reports to registrars. */
|
||||
@@ -57,6 +59,8 @@ public class Spec11EmailUtils {
|
||||
.build()
|
||||
.compileToTofu();
|
||||
private final GmailClient gmailClient;
|
||||
private final Sleeper sleeper;
|
||||
private final Duration emailThrottleDuration;
|
||||
private final InternetAddress outgoingEmailAddress;
|
||||
private final ImmutableList<InternetAddress> spec11BccEmailAddresses;
|
||||
private final InternetAddress alertRecipientAddress;
|
||||
@@ -66,12 +70,16 @@ public class Spec11EmailUtils {
|
||||
@Inject
|
||||
Spec11EmailUtils(
|
||||
GmailClient gmailClient,
|
||||
Sleeper sleeper,
|
||||
@Config("emailThrottleDuration") Duration emailThrottleDuration,
|
||||
@Config("newAlertRecipientEmailAddress") InternetAddress alertRecipientAddress,
|
||||
@Config("spec11OutgoingEmailAddress") InternetAddress spec11OutgoingEmailAddress,
|
||||
@Config("spec11BccEmailAddresses") ImmutableList<InternetAddress> spec11BccEmailAddresses,
|
||||
@Config("spec11WebResources") ImmutableList<String> spec11WebResources,
|
||||
@Config("registryName") String registryName) {
|
||||
this.gmailClient = gmailClient;
|
||||
this.sleeper = sleeper;
|
||||
this.emailThrottleDuration = emailThrottleDuration;
|
||||
this.outgoingEmailAddress = spec11OutgoingEmailAddress;
|
||||
this.spec11BccEmailAddresses = spec11BccEmailAddresses;
|
||||
this.alertRecipientAddress = alertRecipientAddress;
|
||||
@@ -94,6 +102,13 @@ public class Spec11EmailUtils {
|
||||
for (RegistrarThreatMatches registrarThreatMatches : registrarThreatMatchesSet) {
|
||||
RegistrarThreatMatches filteredMatches = filterOutNonPublishedMatches(registrarThreatMatches);
|
||||
if (!filteredMatches.threatMatches().isEmpty()) {
|
||||
if (numRegistrarsEmailed > 0) {
|
||||
try {
|
||||
sleeper.sleep(emailThrottleDuration);
|
||||
} catch (InterruptedException ie) {
|
||||
throw new RuntimeException(ie);
|
||||
}
|
||||
}
|
||||
try {
|
||||
// Handle exceptions individually per registrar so that one failed email doesn't prevent
|
||||
// the rest from being sent.
|
||||
@@ -156,7 +171,7 @@ public class Spec11EmailUtils {
|
||||
gmailClient.sendEmail(
|
||||
EmailMessage.newBuilder()
|
||||
.setSubject(subject)
|
||||
.setBody(getContent(date, soyTemplateInfo, registrarThreatMatches))
|
||||
.setBody(getEmailBody(date, soyTemplateInfo, registrarThreatMatches))
|
||||
.setContentType(MediaType.HTML_UTF_8)
|
||||
.setFrom(outgoingEmailAddress)
|
||||
.addRecipient(getEmailAddressForRegistrar(registrarThreatMatches.clientId()))
|
||||
@@ -164,7 +179,7 @@ public class Spec11EmailUtils {
|
||||
.build());
|
||||
}
|
||||
|
||||
private String getContent(
|
||||
private String getEmailBody(
|
||||
LocalDate date,
|
||||
SoyTemplateInfo soyTemplateInfo,
|
||||
RegistrarThreatMatches registrarThreatMatches) {
|
||||
@@ -175,7 +190,7 @@ public class Spec11EmailUtils {
|
||||
.map(
|
||||
threatMatch ->
|
||||
ImmutableMap.of(
|
||||
"domainName", threatMatch.domainName(),
|
||||
"domainName", toEmailSafeString(threatMatch.domainName()),
|
||||
"threatType", threatMatch.threatType()))
|
||||
.collect(toImmutableList());
|
||||
|
||||
@@ -190,6 +205,12 @@ public class Spec11EmailUtils {
|
||||
return renderer.render();
|
||||
}
|
||||
|
||||
// Mutates a known bad domain to pass spam checks by Email sender and clients, as suggested by
|
||||
// the Gmail abuse-detection team.
|
||||
private String toEmailSafeString(String knownUnsafeDomain) {
|
||||
return knownUnsafeDomain.replace(".", "[.]");
|
||||
}
|
||||
|
||||
/** Sends an e-mail indicating the state of the spec11 pipeline, with a given subject and body. */
|
||||
void sendAlertEmail(String subject, String body) {
|
||||
try {
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.google.api.client.http.HttpTransport;
|
||||
import com.google.api.client.http.LowLevelHttpRequest;
|
||||
import com.google.api.client.http.LowLevelHttpResponse;
|
||||
import com.google.api.client.json.Json;
|
||||
import com.google.api.client.json.jackson2.JacksonFactory;
|
||||
import com.google.api.client.json.gson.GsonFactory;
|
||||
import com.google.api.client.testing.http.HttpTesting;
|
||||
import com.google.api.client.testing.http.MockHttpTransport;
|
||||
import com.google.api.client.testing.http.MockLowLevelHttpRequest;
|
||||
@@ -300,6 +300,6 @@ class DirectoryGroupsConnectionTest {
|
||||
HttpRequest request = transport.createRequestFactory()
|
||||
.buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL)
|
||||
.setThrowExceptionOnExecuteError(false);
|
||||
return GoogleJsonResponseException.from(new JacksonFactory(), request.execute());
|
||||
return GoogleJsonResponseException.from(new GsonFactory(), request.execute());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,13 +30,11 @@ public class UserDaoTest extends EntityTestCase {
|
||||
User user1 =
|
||||
new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.SUPPORT_AGENT).build())
|
||||
.build();
|
||||
User user2 =
|
||||
new User.Builder()
|
||||
.setEmailAddress("foo@bar.com")
|
||||
.setGaiaId("otherId")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.SUPPORT_AGENT).build())
|
||||
.build();
|
||||
UserDao.saveUser(user1);
|
||||
@@ -54,7 +52,6 @@ public class UserDaoTest extends EntityTestCase {
|
||||
User user =
|
||||
new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.SUPPORT_AGENT).build())
|
||||
.build();
|
||||
UserDao.saveUser(user);
|
||||
@@ -71,13 +68,11 @@ public class UserDaoTest extends EntityTestCase {
|
||||
User user1 =
|
||||
new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.SUPPORT_AGENT).build())
|
||||
.build();
|
||||
User user2 =
|
||||
new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("otherId")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.SUPPORT_AGENT).build())
|
||||
.build();
|
||||
UserDao.saveUser(user1);
|
||||
|
||||
@@ -30,10 +30,9 @@ public class UserTest extends EntityTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPersistence_lookupByGaiaId() {
|
||||
void testPersistence_lookupByEmail() {
|
||||
User user =
|
||||
new User.Builder()
|
||||
.setGaiaId("gaiaId")
|
||||
.setEmailAddress("email@email.com")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder().setGlobalRole(GlobalRole.FTE).setIsAdmin(true).build())
|
||||
@@ -43,10 +42,11 @@ public class UserTest extends EntityTestCase {
|
||||
() -> {
|
||||
assertAboutImmutableObjects()
|
||||
.that(
|
||||
tm().query("FROM User WHERE gaiaId = 'gaiaId'", User.class).getSingleResult())
|
||||
tm().query("FROM User WHERE emailAddress = 'email@email.com'", User.class)
|
||||
.getSingleResult())
|
||||
.isEqualExceptFields(user, "id", "updateTimestamp");
|
||||
assertThat(
|
||||
tm().query("FROM User WHERE gaiaId = 'badGaiaId'", User.class)
|
||||
tm().query("FROM User WHERE emailAddress = 'nobody@email.com'", User.class)
|
||||
.getResultList())
|
||||
.isEmpty();
|
||||
});
|
||||
@@ -55,9 +55,6 @@ public class UserTest extends EntityTestCase {
|
||||
@Test
|
||||
void testFailure_badInputs() {
|
||||
User.Builder builder = new User.Builder();
|
||||
assertThat(assertThrows(IllegalArgumentException.class, () -> builder.setGaiaId(null)))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Gaia ID cannot be null or empty");
|
||||
assertThat(assertThrows(IllegalArgumentException.class, () -> builder.setEmailAddress("")))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Provided email is not a valid email address");
|
||||
@@ -72,7 +69,7 @@ public class UserTest extends EntityTestCase {
|
||||
assertThat(assertThrows(IllegalArgumentException.class, () -> builder.setUserRoles(null)))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("User roles cannot be null");
|
||||
|
||||
|
||||
assertThat(assertThrows(IllegalArgumentException.class, builder::build))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Email address cannot be null");
|
||||
@@ -99,7 +96,6 @@ public class UserTest extends EntityTestCase {
|
||||
|
||||
User user =
|
||||
new User.Builder()
|
||||
.setGaiaId("gaiaId")
|
||||
.setEmailAddress("email@email.com")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.FTE).build())
|
||||
.build();
|
||||
|
||||
@@ -26,6 +26,8 @@ import static google.registry.testing.DatabaseHelper.loadByEntity;
|
||||
import static google.registry.testing.DatabaseHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.same;
|
||||
import static org.mockito.Mockito.doThrow;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@@ -41,11 +43,13 @@ import google.registry.persistence.transaction.JpaTestExtensions.JpaIntegrationT
|
||||
import google.registry.reporting.spec11.soy.Spec11EmailSoyInfo;
|
||||
import google.registry.testing.DatabaseHelper;
|
||||
import google.registry.util.EmailMessage;
|
||||
import google.registry.util.Sleeper;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import org.joda.time.Duration;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -101,6 +105,8 @@ class Spec11EmailUtilsTest {
|
||||
new JpaTestExtensions.Builder().buildIntegrationTestExtension();
|
||||
|
||||
@Mock private GmailClient gmailClient;
|
||||
@Mock private Sleeper sleeper;
|
||||
private Duration emailThrottleDuration = Duration.millis(1);
|
||||
private Spec11EmailUtils emailUtils;
|
||||
private ArgumentCaptor<EmailMessage> contentCaptor;
|
||||
private final LocalDate date = new LocalDate(2018, 7, 15);
|
||||
@@ -114,6 +120,8 @@ class Spec11EmailUtilsTest {
|
||||
emailUtils =
|
||||
new Spec11EmailUtils(
|
||||
gmailClient,
|
||||
sleeper,
|
||||
emailThrottleDuration,
|
||||
new InternetAddress("my-receiver@test.com"),
|
||||
new InternetAddress("abuse@test.com"),
|
||||
ImmutableList.of(
|
||||
@@ -128,6 +136,19 @@ class Spec11EmailUtilsTest {
|
||||
persistDomainWithHost("c.com", host);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_sleepsBetweenSending() throws Exception {
|
||||
emailUtils.emailSpec11Reports(
|
||||
date,
|
||||
Spec11EmailSoyInfo.MONTHLY_SPEC_11_EMAIL,
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
sampleThreatMatches());
|
||||
// We inspect individual parameters because Message doesn't implement equals().
|
||||
verify(gmailClient, times(3)).sendEmail(any(EmailMessage.class));
|
||||
// Sleep once between two reports sent in a tight loop. No sleep before the final alert message.
|
||||
verify(sleeper, times(1)).sleep(same(emailThrottleDuration));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_emailMonthlySpec11Reports() throws Exception {
|
||||
emailUtils.emailSpec11Reports(
|
||||
@@ -144,7 +165,7 @@ class Spec11EmailUtilsTest {
|
||||
"the.registrar@example.com",
|
||||
ImmutableList.of("abuse@test.com", "bcc@test.com"),
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>a.com</td><td>MALWARE</td></tr>"),
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>a[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedContents.get(1),
|
||||
@@ -154,7 +175,7 @@ class Spec11EmailUtilsTest {
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(
|
||||
MONTHLY_EMAIL_FORMAT,
|
||||
"<tr><td>b.com</td><td>MALWARE</td></tr><tr><td>c.com</td><td>MALWARE</td></tr>"),
|
||||
"<tr><td>b[.]com</td><td>MALWARE</td></tr><tr><td>c[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedContents.get(2),
|
||||
@@ -182,7 +203,7 @@ class Spec11EmailUtilsTest {
|
||||
"the.registrar@example.com",
|
||||
ImmutableList.of("abuse@test.com", "bcc@test.com"),
|
||||
"Super Cool Registry Daily Threat Detector [2018-07-15]",
|
||||
String.format(DAILY_EMAIL_FORMAT, "<tr><td>a.com</td><td>MALWARE</td></tr>"),
|
||||
String.format(DAILY_EMAIL_FORMAT, "<tr><td>a[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedMessages.get(1),
|
||||
@@ -192,7 +213,7 @@ class Spec11EmailUtilsTest {
|
||||
"Super Cool Registry Daily Threat Detector [2018-07-15]",
|
||||
String.format(
|
||||
DAILY_EMAIL_FORMAT,
|
||||
"<tr><td>b.com</td><td>MALWARE</td></tr><tr><td>c.com</td><td>MALWARE</td></tr>"),
|
||||
"<tr><td>b[.]com</td><td>MALWARE</td></tr><tr><td>c[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedMessages.get(2),
|
||||
@@ -223,7 +244,7 @@ class Spec11EmailUtilsTest {
|
||||
"new.registrar@example.com",
|
||||
ImmutableList.of("abuse@test.com", "bcc@test.com"),
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>c.com</td><td>MALWARE</td></tr>"),
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>c[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedContents.get(1),
|
||||
@@ -256,7 +277,7 @@ class Spec11EmailUtilsTest {
|
||||
"the.registrar@example.com",
|
||||
ImmutableList.of("abuse@test.com", "bcc@test.com"),
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>a.com</td><td>MALWARE</td></tr>"),
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>a[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedContents.get(1),
|
||||
@@ -266,7 +287,7 @@ class Spec11EmailUtilsTest {
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(
|
||||
MONTHLY_EMAIL_FORMAT,
|
||||
"<tr><td>b.com</td><td>MALWARE</td></tr><tr><td>c.com</td><td>MALWARE</td></tr>"),
|
||||
"<tr><td>b[.]com</td><td>MALWARE</td></tr><tr><td>c[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedContents.get(2),
|
||||
@@ -311,7 +332,7 @@ class Spec11EmailUtilsTest {
|
||||
"the.registrar@example.com",
|
||||
ImmutableList.of("abuse@test.com", "bcc@test.com"),
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>a.com</td><td>MALWARE</td></tr>"),
|
||||
String.format(MONTHLY_EMAIL_FORMAT, "<tr><td>a[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedMessages.get(1),
|
||||
@@ -321,7 +342,7 @@ class Spec11EmailUtilsTest {
|
||||
"Super Cool Registry Monthly Threat Detector [2018-07-15]",
|
||||
String.format(
|
||||
MONTHLY_EMAIL_FORMAT,
|
||||
"<tr><td>b.com</td><td>MALWARE</td></tr><tr><td>c.com</td><td>MALWARE</td></tr>"),
|
||||
"<tr><td>b[.]com</td><td>MALWARE</td></tr><tr><td>c[.]com</td><td>MALWARE</td></tr>"),
|
||||
Optional.of(MediaType.HTML_UTF_8));
|
||||
validateMessage(
|
||||
capturedMessages.get(2),
|
||||
|
||||
@@ -417,7 +417,6 @@ class AuthenticatedRegistrarAccessorTest {
|
||||
void testConsoleUser_admin() {
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setGaiaId("gaiaId")
|
||||
.setEmailAddress("email@email.com")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder().setIsAdmin(true).setGlobalRole(GlobalRole.FTE).build())
|
||||
@@ -444,7 +443,6 @@ class AuthenticatedRegistrarAccessorTest {
|
||||
// not admins
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setGaiaId("gaiaId")
|
||||
.setEmailAddress("email@email.com")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.SUPPORT_AGENT).build())
|
||||
.build();
|
||||
@@ -462,7 +460,6 @@ class AuthenticatedRegistrarAccessorTest {
|
||||
// Registrar employees should have OWNER access to their registrars
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setGaiaId("gaiaId")
|
||||
.setEmailAddress("email@email.com")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder()
|
||||
|
||||
@@ -61,7 +61,6 @@ public class OidcTokenAuthenticationMechanismTest {
|
||||
private final User user =
|
||||
new User.Builder()
|
||||
.setEmailAddress(email)
|
||||
.setGaiaId(gaiaId)
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder().setIsAdmin(true).setGlobalRole(GlobalRole.FTE).build())
|
||||
.build();
|
||||
@@ -141,7 +140,6 @@ public class OidcTokenAuthenticationMechanismTest {
|
||||
User serviceUser =
|
||||
new User.Builder()
|
||||
.setEmailAddress("service@email.test")
|
||||
.setGaiaId("service-gaia-id")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder().setIsAdmin(true).setGlobalRole(GlobalRole.FTE).build())
|
||||
.build();
|
||||
|
||||
@@ -61,7 +61,7 @@ import org.junit.runner.RunWith;
|
||||
* and have at least one test method that persists a JPA entity declared in persistence.xml.
|
||||
*
|
||||
* <p>Note that with {@link JpaIntegrationWithCoverageExtension}, each method starts with an empty
|
||||
* database. Therefore this is not the right place for verifying backwards data compatibility in
|
||||
* database. Therefore, this is not the right place for verifying backwards data compatibility in
|
||||
* end-to-end functional tests.
|
||||
*
|
||||
* <p>As of April 2020, none of the before/after annotations ({@code BeforeClass} and {@code
|
||||
@@ -107,7 +107,9 @@ import org.junit.runner.RunWith;
|
||||
// AfterSuiteTest must be the last entry. See class javadoc for details.
|
||||
AfterSuiteTest.class
|
||||
})
|
||||
public class SqlIntegrationTestSuite {
|
||||
public final class SqlIntegrationTestSuite {
|
||||
|
||||
private SqlIntegrationTestSuite() {}
|
||||
|
||||
@BeforeAll // Not yet supported in JUnit 5. Called through BeforeSuiteTest.
|
||||
public static void initJpaEntityCoverage() {
|
||||
|
||||
@@ -144,7 +144,6 @@ public final class RegistryTestServerMain {
|
||||
User user =
|
||||
new User.Builder()
|
||||
.setEmailAddress(loginEmail)
|
||||
.setGaiaId("123457890")
|
||||
.setUserRoles(userRoles)
|
||||
.setRegistryLockPassword("registryLockPassword")
|
||||
.build();
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets;
|
||||
import com.google.api.client.http.GenericUrl;
|
||||
import com.google.api.client.http.HttpRequest;
|
||||
import com.google.api.client.http.javanet.NetHttpTransport;
|
||||
import com.google.api.client.json.jackson2.JacksonFactory;
|
||||
import com.google.api.client.json.gson.GsonFactory;
|
||||
import com.google.api.client.util.store.AbstractDataStoreFactory;
|
||||
import com.google.api.client.util.store.DataStore;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@@ -74,7 +74,7 @@ class AuthModuleTest {
|
||||
// We need to set the following fields because they are checked when
|
||||
// Credential#setRefreshToken is called. However they are not actually persisted in the
|
||||
// DataStore and not actually used in tests.
|
||||
.setJsonFactory(new JacksonFactory())
|
||||
.setJsonFactory(new GsonFactory())
|
||||
.setTransport(new NetHttpTransport())
|
||||
.setTokenServerUrl(new GenericUrl("https://accounts.google.com/o/oauth2/token"))
|
||||
.setClientAuthentication(new ClientParametersAuthentication(CLIENT_ID, CLIENT_SECRET))
|
||||
@@ -146,7 +146,7 @@ class AuthModuleTest {
|
||||
private Credential getCredential() {
|
||||
// Reconstruct the entire dependency graph, injecting FakeDataStoreFactory and credential
|
||||
// parameters.
|
||||
JacksonFactory jsonFactory = new JacksonFactory();
|
||||
GsonFactory jsonFactory = new GsonFactory();
|
||||
GoogleClientSecrets clientSecrets = getSecrets();
|
||||
ImmutableList<String> scopes = ImmutableList.of("scope1");
|
||||
return AuthModule.provideCredential(
|
||||
|
||||
@@ -45,7 +45,7 @@ class GetTldCommandTest extends CommandTestCase<GetTldCommand> {
|
||||
PremiumList premiumList = persistPremiumList("test", USD, "silver,USD 50", "gold,USD 80");
|
||||
persistResource(
|
||||
tld.asBuilder()
|
||||
.setDnsAPlusAaaaTtl(Duration.millis(900))
|
||||
.setDnsAPlusAaaaTtl(Duration.standardMinutes(15))
|
||||
.setDriveFolderId("driveFolder")
|
||||
.setCreateBillingCost(Money.of(USD, 25))
|
||||
.setPremiumList(premiumList)
|
||||
|
||||
@@ -128,7 +128,6 @@ public class ConsoleDomainGetActionTest {
|
||||
private User createUser(UserRoles userRoles) {
|
||||
return new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(userRoles)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -15,14 +15,12 @@
|
||||
package google.registry.ui.server.console;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import com.google.api.client.http.HttpStatusCodes;
|
||||
import com.google.gson.Gson;
|
||||
import google.registry.model.console.GlobalRole;
|
||||
import google.registry.model.console.User;
|
||||
import google.registry.model.console.UserRoles;
|
||||
import google.registry.model.registrar.RegistrarPoc;
|
||||
import google.registry.persistence.transaction.JpaTestExtensions;
|
||||
import google.registry.request.RequestModule;
|
||||
import google.registry.request.auth.AuthResult;
|
||||
@@ -31,15 +29,12 @@ import google.registry.request.auth.UserAuthInfo;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Tests for {@link google.registry.ui.server.console.ConsoleUserDataAction}. */
|
||||
class ConsoleUserDataActionTest {
|
||||
|
||||
private final HttpServletRequest request = mock(HttpServletRequest.class);
|
||||
private RegistrarPoc testRegistrarPoc;
|
||||
private static final Gson GSON = RequestModule.provideGson();
|
||||
private FakeResponse response = new FakeResponse();
|
||||
|
||||
@@ -52,7 +47,6 @@ class ConsoleUserDataActionTest {
|
||||
User user =
|
||||
new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(new UserRoles.Builder().setGlobalRole(GlobalRole.FTE).build())
|
||||
.build();
|
||||
|
||||
|
||||
@@ -232,7 +232,6 @@ class RegistrarsActionTest {
|
||||
private User createUser(UserRoles userRoles) {
|
||||
return new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(userRoles)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -226,7 +226,6 @@ class ContactActionTest {
|
||||
private User createUser(UserRoles userRoles) {
|
||||
return new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(userRoles)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -109,7 +109,6 @@ class SecurityActionTest {
|
||||
private User createUser(UserRoles userRoles) {
|
||||
return new User.Builder()
|
||||
.setEmailAddress("email@email.com")
|
||||
.setGaiaId("TestUserId")
|
||||
.setUserRoles(userRoles)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -101,7 +101,6 @@ final class RegistryLockGetActionTest {
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setEmailAddress("johndoe@theregistrar.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder()
|
||||
.setRegistrarRoles(
|
||||
|
||||
@@ -231,7 +231,6 @@ final class RegistryLockPostActionTest {
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setEmailAddress("johndoe@theregistrar.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder()
|
||||
.setRegistrarRoles(
|
||||
@@ -252,7 +251,6 @@ final class RegistryLockPostActionTest {
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setEmailAddress("johndoe@theregistrar.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(new UserRoles.Builder().setIsAdmin(true).build())
|
||||
.build();
|
||||
AuthResult consoleAuthResult =
|
||||
@@ -447,7 +445,6 @@ final class RegistryLockPostActionTest {
|
||||
google.registry.model.console.User consoleUser =
|
||||
new google.registry.model.console.User.Builder()
|
||||
.setEmailAddress("johndoe@theregistrar.com")
|
||||
.setGaiaId("gaiaId")
|
||||
.setUserRoles(
|
||||
new UserRoles.Builder()
|
||||
.setRegistrarRoles(
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames:
|
||||
- "foo"
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -13,7 +13,7 @@ creationTime: "1970-01-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens:
|
||||
- "bbbbb"
|
||||
dnsAPlusAaaaTtl: 3600000
|
||||
dnsAPlusAaaaTtl: "PT3600S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -38,10 +38,10 @@ idnTables:
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT432000S"
|
||||
premiumListName: "tld"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -49,7 +49,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT432000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -63,4 +63,4 @@ tldStateTransitions:
|
||||
tldStr: "tld"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "tld"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT432000S"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -11,7 +11,7 @@ createBillingCost:
|
||||
creationTime: "2022-09-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens: []
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -27,10 +27,10 @@ idnTables: []
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
premiumListName: "test"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -38,7 +38,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -52,4 +52,4 @@ tldStateTransitions:
|
||||
tldStr: "1tld"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "1tld"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -11,7 +11,7 @@ createBillingCost:
|
||||
creationTime: "2022-09-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens: []
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -28,10 +28,10 @@ idnTables:
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
premiumListName: "test"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -39,7 +39,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -53,4 +53,4 @@ tldStateTransitions:
|
||||
tldStr: "badidn"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "badidn"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -11,7 +11,7 @@ createBillingCost:
|
||||
creationTime: "2022-09-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens: []
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -27,10 +27,10 @@ idnTables: []
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
premiumListName: "test"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -38,7 +38,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -52,4 +52,4 @@ tldStateTransitions:
|
||||
tldStr: "badunicode"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "tld"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -11,7 +11,7 @@ createBillingCost:
|
||||
creationTime: "2022-09-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens: []
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -27,10 +27,10 @@ idnTables: []
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
premiumListName: "test"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -38,7 +38,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -52,5 +52,5 @@ tldStateTransitions:
|
||||
tldStr: "extrafield"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "extrafield"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
extraField: "hello"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames:
|
||||
- "beta"
|
||||
- "zeta"
|
||||
- "alpha"
|
||||
- "gamma"
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -34,10 +34,10 @@ idnTables:
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT432000S"
|
||||
premiumListName: "idns"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -45,7 +45,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT432000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -59,4 +59,4 @@ tldStateTransitions:
|
||||
tldStr: "idns"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "idns"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT432000S"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
automaticTransferLength: 432000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -25,9 +25,9 @@ escrowEnabled: false
|
||||
idnTables: []
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -35,7 +35,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -47,4 +47,4 @@ serverStatusChangeBillingCost:
|
||||
tldStr: "missingnullablefields"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "missingnullablefields"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
|
||||
@@ -18,14 +18,14 @@ reservedListNames: null
|
||||
premiumListName: null
|
||||
escrowEnabled: false
|
||||
dnsPaused: false
|
||||
addGracePeriodLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
renewGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: 432000000
|
||||
automaticTransferLength: 432000000
|
||||
pendingDeleteLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
currency: "USD"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
|
||||
@@ -5,13 +5,13 @@ reservedListNames: []
|
||||
dnsPaused: false
|
||||
tldType: "REAL"
|
||||
escrowEnabled: false
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
dnsNsTtl: null
|
||||
tldStr: "outoforderfields"
|
||||
roidSuffix: "TLD"
|
||||
dnsWriters:
|
||||
- "VoidDnsWriter"
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
tldUnicode: "outoforderfields"
|
||||
driveFolderId: "driveFolder"
|
||||
@@ -19,13 +19,13 @@ invoicingEnabled: false
|
||||
tldStateTransitions:
|
||||
"1970-01-01T00:00:00.000Z": "GENERAL_AVAILABILITY"
|
||||
premiumListName: "test"
|
||||
addGracePeriodLength: 432000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
renewGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: 432000000
|
||||
automaticTransferLength: 432000000
|
||||
pendingDeleteLength: 432000000
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
renewGracePeriodLength: "PT2592000S"
|
||||
transferGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
pendingDeleteLength: "PT2592000S"
|
||||
currency: "USD"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -11,7 +11,7 @@ createBillingCost:
|
||||
creationTime: "2022-09-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens: []
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -27,10 +27,10 @@ idnTables: []
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT432000S"
|
||||
premiumListName: "test"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -38,7 +38,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT432000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -52,4 +52,4 @@ tldStateTransitions:
|
||||
tldStr: "tld"
|
||||
tldType: "REAL"
|
||||
tldUnicode: "tld"
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT432000S"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
addGracePeriodLength: 432000000
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: 2592000000
|
||||
autoRenewGracePeriodLength: 3888000000
|
||||
automaticTransferLength: 432000000
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
createBillingCost:
|
||||
currency: "USD"
|
||||
@@ -11,7 +11,7 @@ createBillingCost:
|
||||
creationTime: "2022-09-01T00:00:00.000Z"
|
||||
currency: "USD"
|
||||
defaultPromoTokens: []
|
||||
dnsAPlusAaaaTtl: 900
|
||||
dnsAPlusAaaaTtl: "PT900S"
|
||||
dnsDsTtl: null
|
||||
dnsNsTtl: null
|
||||
dnsPaused: false
|
||||
@@ -27,10 +27,10 @@ idnTables: []
|
||||
invoicingEnabled: false
|
||||
lordnUsername: null
|
||||
numDnsPublishLocks: 1
|
||||
pendingDeleteLength: 432000000
|
||||
pendingDeleteLength: "PT432000S"
|
||||
premiumListName: "test"
|
||||
pricingEngineClassName: "google.registry.model.pricing.StaticPremiumListPricingEngine"
|
||||
redemptionGracePeriodLength: 2592000000
|
||||
redemptionGracePeriodLength: "PT2592000S"
|
||||
registryLockOrUnlockBillingCost:
|
||||
currency: "USD"
|
||||
amount: 0.00
|
||||
@@ -38,7 +38,7 @@ renewBillingCostTransitions:
|
||||
"1970-01-01T00:00:00.000Z":
|
||||
currency: "USD"
|
||||
amount: 11.00
|
||||
renewGracePeriodLength: 432000000
|
||||
renewGracePeriodLength: "PT432000S"
|
||||
reservedListNames: []
|
||||
restoreBillingCost:
|
||||
currency: "USD"
|
||||
@@ -52,4 +52,4 @@ tldStateTransitions:
|
||||
tldStr: %TLDSTR%
|
||||
tldType: "REAL"
|
||||
tldUnicode: %TLDUNICODE%
|
||||
transferGracePeriodLength: 432000000
|
||||
transferGracePeriodLength: "PT432000S"
|
||||
|
||||
@@ -756,7 +756,6 @@
|
||||
id bigserial not null,
|
||||
update_timestamp timestamptz,
|
||||
email_address text not null,
|
||||
gaia_id text,
|
||||
registry_lock_password_hash text,
|
||||
registry_lock_password_salt text,
|
||||
global_role text not null,
|
||||
@@ -852,7 +851,6 @@ create index reservedlist_name_idx on "ReservedList" (name);
|
||||
create index spec11threatmatch_registrar_id_idx on "Spec11ThreatMatch" (registrar_id);
|
||||
create index spec11threatmatch_tld_idx on "Spec11ThreatMatch" (tld);
|
||||
create index spec11threatmatch_check_date_idx on "Spec11ThreatMatch" (check_date);
|
||||
create index user_gaia_id_idx on "User" (gaia_id);
|
||||
create index user_email_address_idx on "User" (email_address);
|
||||
|
||||
alter table if exists "DelegationSignerData"
|
||||
|
||||
Reference in New Issue
Block a user