mirror of
https://github.com/google/nomulus
synced 2026-02-01 02:22:21 +00:00
Compare commits
30 Commits
nomulus-20
...
nomulus-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c2856e3e2 | ||
|
|
86e1fb85b6 | ||
|
|
301ab54fb4 | ||
|
|
2c6d71f04c | ||
|
|
ee4e6ace2a | ||
|
|
c4721121eb | ||
|
|
37b9999cfc | ||
|
|
5f62f91cd5 | ||
|
|
6f87fc115f | ||
|
|
aaca6651c8 | ||
|
|
03bbb2c057 | ||
|
|
d00ade8ae0 | ||
|
|
5e61adb396 | ||
|
|
6fe9cced3e | ||
|
|
6a3bd9418f | ||
|
|
3106958f18 | ||
|
|
7da94c90dc | ||
|
|
dbb4092680 | ||
|
|
af3223d086 | ||
|
|
2d7f80baaf | ||
|
|
d4d5d6a570 | ||
|
|
53c0be6537 | ||
|
|
63bb2dd79b | ||
|
|
8278b5409e | ||
|
|
f98b0f8739 | ||
|
|
128fde16c3 | ||
|
|
45f7c89efd | ||
|
|
13dc758747 | ||
|
|
85c11ca889 | ||
|
|
340bf40642 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -98,7 +98,6 @@ nomulus.iws
|
||||
.gradle/
|
||||
**/build
|
||||
node_modules/**
|
||||
!node_modules/soyutils_usegoog.js
|
||||
/repos/
|
||||
|
||||
# Compiled JS/CSS code
|
||||
|
||||
@@ -16,7 +16,7 @@ com.jcraft:jsch:0.1.54
|
||||
com.jcraft:jzlib:1.1.1
|
||||
com.netflix.nebula:gradle-lint-plugin:10.4.2
|
||||
com.netflix.nebula:nebula-gradle-interop:1.0.11
|
||||
com.netflix.nebula:nebula-test:7.3.0
|
||||
com.netflix.nebula:nebula-test:7.4.0
|
||||
commons-codec:commons-codec:1.9
|
||||
commons-io:commons-io:2.5
|
||||
commons-lang:commons-lang:2.6
|
||||
@@ -41,7 +41,7 @@ org.apache.maven:maven-builder-support:3.6.2
|
||||
org.apache.maven:maven-model-builder:3.6.2
|
||||
org.apache.maven:maven-model:3.6.2
|
||||
org.codehaus.gpars:gpars:1.2.1
|
||||
org.codehaus.groovy:groovy-all:2.4.9
|
||||
org.codehaus.groovy:groovy-all:2.4.15
|
||||
org.codehaus.groovy:groovy-ant:2.1.8
|
||||
org.codehaus.groovy:groovy-groovydoc:2.1.8
|
||||
org.codehaus.groovy:groovy-templates:2.1.8
|
||||
@@ -65,4 +65,4 @@ org.multiverse:multiverse-core:0.7.0
|
||||
org.objenesis:objenesis:2.4
|
||||
org.ow2.asm:asm:7.0
|
||||
org.slf4j:slf4j-api:1.7.2
|
||||
org.spockframework:spock-core:1.1-groovy-2.4-rc-4
|
||||
org.spockframework:spock-core:1.3-groovy-2.4
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableSetMultimap;
|
||||
import com.google.template.soy.SoyFileSet;
|
||||
import com.google.template.soy.tofu.SoyTofu;
|
||||
import google.registry.gradle.plugin.ProjectData.TaskData;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.function.Supplier;
|
||||
@@ -148,10 +149,14 @@ final class CoverPageGenerator {
|
||||
|
||||
/** returns a soy-friendly version of the given task data. */
|
||||
static ImmutableMap<String, Object> taskDataToSoy(TaskData task) {
|
||||
// Note that all instances of File.separator are replaced with forward slashes so that we can
|
||||
// generate a valid href on Windows.
|
||||
return new ImmutableMap.Builder<String, Object>()
|
||||
.put("uniqueName", task.uniqueName())
|
||||
.put("description", task.description())
|
||||
.put("log", task.log().isPresent() ? getLogPath(task).toString() : "")
|
||||
.put(
|
||||
"log",
|
||||
task.log().isPresent() ? getLogPath(task).toString().replace(File.separator, "/") : "")
|
||||
.put(
|
||||
"reports",
|
||||
task.reports().entrySet().stream()
|
||||
@@ -161,7 +166,11 @@ final class CoverPageGenerator {
|
||||
entry ->
|
||||
entry.getValue().files().isEmpty()
|
||||
? ""
|
||||
: entry.getValue().entryPoint().toString())))
|
||||
: entry
|
||||
.getValue()
|
||||
.entryPoint()
|
||||
.toString()
|
||||
.replace(File.separator, "/"))))
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -188,8 +197,10 @@ final class CoverPageGenerator {
|
||||
}
|
||||
|
||||
private static Path getLogPath(TaskData task) {
|
||||
// TODO(guyben):escape uniqueName to guarantee legal file name.
|
||||
return Paths.get("logs", task.uniqueName() + ".log");
|
||||
// We replace colons with dashes so that the resulting filename is always valid, even in
|
||||
// Windows. As a dash is not a valid character in Java identifies, a task name cannot include
|
||||
// it, so the uniqueness of the name is perserved.
|
||||
return Paths.get("logs", task.uniqueName().replace(":", "-") + ".log");
|
||||
}
|
||||
|
||||
private static Supplier<byte[]> resourceLoader(Path path) {
|
||||
|
||||
@@ -64,7 +64,8 @@ final class GcsPluginUtils {
|
||||
|
||||
static void uploadFileToGcs(
|
||||
Storage storage, String bucket, Path path, Supplier<byte[]> dataSupplier) {
|
||||
String filename = path.toString();
|
||||
// Replace Windows file separators with forward slashes.
|
||||
String filename = path.toString().replace(File.separator, "/");
|
||||
storage.create(
|
||||
BlobInfo.newBuilder(bucket, filename).setContentType(getContentType(filename)).build(),
|
||||
dataSupplier.get());
|
||||
|
||||
@@ -20,9 +20,11 @@ import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.gradle.plugin.GcsPluginUtils.toByteArraySupplier;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import google.registry.gradle.plugin.ProjectData.TaskData;
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -63,6 +65,8 @@ public final class CoverPageGeneratorTest {
|
||||
.setState(TaskData.State.UP_TO_DATE)
|
||||
.build();
|
||||
|
||||
private static final Joiner filenameJoiner = Joiner.on(File.separator);
|
||||
|
||||
private ImmutableMap<String, String> getGeneratedFiles(ProjectData project) {
|
||||
CoverPageGenerator coverPageGenerator = new CoverPageGenerator(project);
|
||||
FilesWithEntryPoint files = coverPageGenerator.getFilesToUpload();
|
||||
@@ -172,8 +176,8 @@ public final class CoverPageGeneratorTest {
|
||||
@Test
|
||||
public void testGetFilesToUpload_containsCssFile() {
|
||||
ImmutableMap<String, String> files = getGeneratedFiles(EMPTY_PROJECT);
|
||||
assertThat(files).containsKey("css/style.css");
|
||||
assertThat(files.get("css/style.css")).contains("body {");
|
||||
assertThat(files).containsKey(filenameJoiner.join("css", "style.css"));
|
||||
assertThat(files.get(filenameJoiner.join("css", "style.css"))).contains("body {");
|
||||
assertThat(files.get("index.html"))
|
||||
.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/style.css\">");
|
||||
}
|
||||
@@ -191,8 +195,8 @@ public final class CoverPageGeneratorTest {
|
||||
.setLog(toByteArraySupplier("my log data"))
|
||||
.build())
|
||||
.build());
|
||||
assertThat(files).containsEntry("logs/my:name.log", "my log data");
|
||||
assertThat(files.get("index.html")).contains("<a href=\"logs/my:name.log\">[log]</a>");
|
||||
assertThat(files).containsEntry(filenameJoiner.join("logs", "my-name.log"), "my log data");
|
||||
assertThat(files.get("index.html")).contains("<a href=\"logs/my-name.log\">[log]</a>");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -203,7 +207,7 @@ public final class CoverPageGeneratorTest {
|
||||
.toBuilder()
|
||||
.addTask(EMPTY_TASK_SUCCESS.toBuilder().setUniqueName("my:name").build())
|
||||
.build());
|
||||
assertThat(files).doesNotContainKey("logs/my:name.log");
|
||||
assertThat(files).doesNotContainKey("logs/my-name.log");
|
||||
assertThat(files.get("index.html")).contains("<span class=\"report_link_broken\">[log]</span>");
|
||||
}
|
||||
|
||||
@@ -225,7 +229,7 @@ public final class CoverPageGeneratorTest {
|
||||
Paths.get("path", "report.txt")))
|
||||
.build())
|
||||
.build());
|
||||
assertThat(files).containsEntry("path/report.txt", "report content");
|
||||
assertThat(files).containsEntry(filenameJoiner.join("path", "report.txt"), "report content");
|
||||
assertThat(files.get("index.html")).contains("<a href=\"path/report.txt\">[someReport]</a>");
|
||||
}
|
||||
|
||||
@@ -244,7 +248,7 @@ public final class CoverPageGeneratorTest {
|
||||
ImmutableMap.of(), Paths.get("path", "report.txt")))
|
||||
.build())
|
||||
.build());
|
||||
assertThat(files).doesNotContainKey("path/report.txt");
|
||||
assertThat(files).doesNotContainKey(filenameJoiner.join("path", "report.txt"));
|
||||
assertThat(files.get("index.html"))
|
||||
.contains("<span class=\"report_link_broken\">[someReport]</span>");
|
||||
}
|
||||
@@ -275,12 +279,15 @@ public final class CoverPageGeneratorTest {
|
||||
ImmutableMap.of(), Paths.get("path-empty", "report.txt")))
|
||||
.build())
|
||||
.build());
|
||||
assertThat(files).containsEntry("path-filled/report.txt", "report content");
|
||||
assertThat(files).containsEntry("path-filled/other/file.txt", "some other content");
|
||||
assertThat(files).containsEntry("logs/my:name.log", "log data");
|
||||
assertThat(files)
|
||||
.containsEntry(filenameJoiner.join("path-filled", "report.txt"), "report content");
|
||||
assertThat(files)
|
||||
.containsEntry(
|
||||
filenameJoiner.join("path-filled", "other", "file.txt"), "some other content");
|
||||
assertThat(files).containsEntry(filenameJoiner.join("logs", "my-name.log"), "log data");
|
||||
assertThat(files.get("index.html"))
|
||||
.contains("<a href=\"path-filled/report.txt\">[filledReport]</a>");
|
||||
assertThat(files.get("index.html")).contains("<a href=\"logs/my:name.log\">[log]</a>");
|
||||
assertThat(files.get("index.html")).contains("<a href=\"logs/my-name.log\">[log]</a>");
|
||||
assertThat(files.get("index.html"))
|
||||
.contains("<span class=\"report_link_broken\">[emptyReport]</span>");
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
||||
import com.google.cloud.storage.BlobInfo;
|
||||
import com.google.cloud.storage.Storage;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
@@ -45,6 +46,8 @@ import org.junit.runners.JUnit4;
|
||||
@RunWith(JUnit4.class)
|
||||
public final class GcsPluginUtilsTest {
|
||||
|
||||
private static final Joiner filenameJoiner = Joiner.on(File.separator);
|
||||
|
||||
@Rule public final TemporaryFolder folder = new TemporaryFolder();
|
||||
|
||||
@Test
|
||||
@@ -155,8 +158,10 @@ public final class GcsPluginUtilsTest {
|
||||
FilesWithEntryPoint files =
|
||||
readFilesWithEntryPoint(destination, Optional.of(ignoredHint), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("some/path/file.txt");
|
||||
assertThat(readAllFiles(files)).containsExactly("some/path/file.txt", "some data");
|
||||
assertThat(files.entryPoint().toString())
|
||||
.isEqualTo(filenameJoiner.join("some", "path", "file.txt"));
|
||||
assertThat(readAllFiles(files))
|
||||
.containsExactly(filenameJoiner.join("some", "path", "file.txt"), "some data");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -171,7 +176,7 @@ public final class GcsPluginUtilsTest {
|
||||
FilesWithEntryPoint files =
|
||||
readFilesWithEntryPoint(destination, Optional.of(ignoredHint), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("non/existing.txt");
|
||||
assertThat(files.entryPoint().toString()).isEqualTo(filenameJoiner.join("non", "existing.txt"));
|
||||
assertThat(files.files()).isEmpty();
|
||||
}
|
||||
|
||||
@@ -187,7 +192,7 @@ public final class GcsPluginUtilsTest {
|
||||
FilesWithEntryPoint files =
|
||||
readFilesWithEntryPoint(destination, Optional.of(ignoredHint), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("some/path");
|
||||
assertThat(files.entryPoint().toString()).isEqualTo(filenameJoiner.join("some", "path"));
|
||||
assertThat(files.files()).isEmpty();
|
||||
}
|
||||
|
||||
@@ -205,8 +210,10 @@ public final class GcsPluginUtilsTest {
|
||||
FilesWithEntryPoint files =
|
||||
readFilesWithEntryPoint(destination, Optional.of(ignoredHint), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("some/path/a/file.txt");
|
||||
assertThat(readAllFiles(files)).containsExactly("some/path/a/file.txt", "some data");
|
||||
assertThat(files.entryPoint().toString())
|
||||
.isEqualTo(filenameJoiner.join("some", "path", "a", "file.txt"));
|
||||
assertThat(readAllFiles(files))
|
||||
.containsExactly(filenameJoiner.join("some", "path", "a", "file.txt"), "some data");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,8 +239,10 @@ public final class GcsPluginUtilsTest {
|
||||
|
||||
FilesWithEntryPoint files = readFilesWithEntryPoint(destination, Optional.empty(), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("some/path/path.zip");
|
||||
assertThat(readAllFiles(files).keySet()).containsExactly("some/path/path.zip");
|
||||
assertThat(files.entryPoint().toString())
|
||||
.isEqualTo(filenameJoiner.join("some", "path", "path.zip"));
|
||||
assertThat(readAllFiles(files).keySet())
|
||||
.containsExactly(filenameJoiner.join("some", "path", "path.zip"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -261,8 +270,10 @@ public final class GcsPluginUtilsTest {
|
||||
FilesWithEntryPoint files =
|
||||
readFilesWithEntryPoint(destination, Optional.of(badEntryPoint), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("some/path/path.zip");
|
||||
assertThat(readAllFiles(files).keySet()).containsExactly("some/path/path.zip");
|
||||
assertThat(files.entryPoint().toString())
|
||||
.isEqualTo(filenameJoiner.join("some", "path", "path.zip"));
|
||||
assertThat(readAllFiles(files).keySet())
|
||||
.containsExactly(filenameJoiner.join("some", "path", "path.zip"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -285,12 +296,13 @@ public final class GcsPluginUtilsTest {
|
||||
FilesWithEntryPoint files =
|
||||
readFilesWithEntryPoint(destination, Optional.of(goodEntryPoint), root);
|
||||
|
||||
assertThat(files.entryPoint().toString()).isEqualTo("some/path/index.html");
|
||||
assertThat(files.entryPoint().toString())
|
||||
.isEqualTo(filenameJoiner.join("some", "path", "index.html"));
|
||||
assertThat(readAllFiles(files))
|
||||
.containsExactly(
|
||||
"some/path/index.html", "some data",
|
||||
"some/path/a/index.html", "wrong index",
|
||||
"some/path/c/style.css", "css file",
|
||||
"some/path/my_image.png", "images");
|
||||
filenameJoiner.join("some", "path", "index.html"), "some data",
|
||||
filenameJoiner.join("some", "path", "a", "index.html"), "wrong index",
|
||||
filenameJoiner.join("some", "path", "c", "style.css"), "css file",
|
||||
filenameJoiner.join("some", "path", "my_image.png"), "images");
|
||||
}
|
||||
}
|
||||
|
||||
16
config/dependency-license/README.md
Normal file
16
config/dependency-license/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
## Summary
|
||||
|
||||
This folder contains configuration files for the gradle-license-report plugin:
|
||||
|
||||
* allowed_licenses.json declares the acceptable licenses. A license may have
|
||||
multiple entries in this file, since the 'moduleLicense' property value must
|
||||
match exactly the phrases found in pom or manifest files.
|
||||
* license_normalizer_bundle.json configures normalization rules for license
|
||||
reporting.
|
||||
|
||||
## Notes About Adding New Licenses
|
||||
|
||||
* The WTFPL license is not allowed.
|
||||
|
||||
* Each 'Public Domain' license entry must include a specific 'moduleName'. Do
|
||||
not omit moduleName or use wildcards.
|
||||
@@ -3,6 +3,9 @@
|
||||
{
|
||||
"moduleLicense": "Apache Software License, Version 1.1"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "Apache Software License, version 1.1"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "Apache 2"
|
||||
},
|
||||
@@ -90,6 +93,9 @@
|
||||
{
|
||||
"moduleLicense": "The BSD License"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "The New BSD License"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "The PostgreSQL License"
|
||||
},
|
||||
@@ -198,6 +204,9 @@
|
||||
{
|
||||
"moduleLicense": "The MIT license"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "The MIT License (MIT)"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "The PostgreSQL License"
|
||||
},
|
||||
@@ -205,10 +214,12 @@
|
||||
"moduleLicense": "Mozilla Public License Version 2.0"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "Public Domain"
|
||||
"moduleLicense": "Public Domain",
|
||||
"moduleName": "aopalliance:aopalliance"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "PUBLIC DOMAIN"
|
||||
"moduleLicense": "Public Domain",
|
||||
"moduleName": "org.tukaani:xz"
|
||||
},
|
||||
{
|
||||
"moduleLicense": "The W3C Software License"
|
||||
|
||||
@@ -80,7 +80,7 @@ PRESUBMITS = {
|
||||
".git", "/build/", "/generated/", "node_modules/",
|
||||
"JUnitBackports.java", "registrar_bin.", "registrar_dbg.",
|
||||
"google-java-format-diff.py",
|
||||
"nomulus.golden.sql"
|
||||
"nomulus.golden.sql", "soyutils_usegoog.js"
|
||||
}, REQUIRED):
|
||||
"File did not include the license header.",
|
||||
|
||||
|
||||
@@ -76,9 +76,9 @@ sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs += generatedDir
|
||||
// Javadoc API is deprecated and removed in Java 12.
|
||||
// Javadoc API is deprecated in Java 11 and removed in Java 12.
|
||||
// TODO(jianglai): re-enable after migrating to the new Javadoc API
|
||||
if ((JavaVersion.current().majorVersion as Integer) > 11) {
|
||||
if ((JavaVersion.current().majorVersion as Integer) >= 11) {
|
||||
exclude 'google/registry/documentation/**'
|
||||
}
|
||||
}
|
||||
@@ -88,9 +88,9 @@ sourceSets {
|
||||
}
|
||||
test {
|
||||
java {
|
||||
// Javadoc API is deprecated and removed in Java 12.
|
||||
// Javadoc API is deprecated in Java 11 and removed in Java 12.
|
||||
// TODO(jianglai): re-enable after migrating to the new Javadoc API
|
||||
if ((JavaVersion.current().majorVersion as Integer) > 11) {
|
||||
if ((JavaVersion.current().majorVersion as Integer) >= 11) {
|
||||
exclude 'google/registry/documentation/**'
|
||||
}
|
||||
}
|
||||
@@ -192,7 +192,7 @@ dependencies {
|
||||
compile deps['com.jcraft:jsch']
|
||||
testCompile deps['com.thoughtworks.qdox:qdox']
|
||||
compile deps['dnsjava:dnsjava']
|
||||
runtime deps['org.glassfish.jaxb:jaxb-runtime']
|
||||
testCompile deps['io.github.classgraph:classgraph']
|
||||
testCompile deps['javax.annotation:jsr250-api']
|
||||
compile deps['javax.inject:javax.inject']
|
||||
compile deps['javax.mail:mail']
|
||||
@@ -218,6 +218,7 @@ dependencies {
|
||||
compile deps['org.bouncycastle:bcpg-jdk15on']
|
||||
testCompile deps['org.bouncycastle:bcpkix-jdk15on']
|
||||
compile deps['org.bouncycastle:bcprov-jdk15on']
|
||||
runtime deps['org.glassfish.jaxb:jaxb-runtime']
|
||||
compile deps['org.joda:joda-money']
|
||||
compile deps['org.json:json']
|
||||
testCompile deps['org.mortbay.jetty:jetty']
|
||||
@@ -289,12 +290,12 @@ dependencies {
|
||||
task jaxbToJava {
|
||||
def xsdFilesDir = "${javaDir}/google/registry/xml/xsd"
|
||||
def bindingsFile = "${javaDir}/google/registry/xjc/bindings.xjb"
|
||||
def pkgInfoGenerator = "${javaDir}/google/registry/xjc/make_pkginfo.sh"
|
||||
def pkgInfoTemplate = "${javaDir}/google/registry/xjc/package-info.java.in"
|
||||
def pkgInfoMap = "${javaDir}/google/registry/xjc/package-info.map"
|
||||
def outputDir = "${generatedDir}/google/registry/xjc"
|
||||
|
||||
inputs.dir xsdFilesDir
|
||||
inputs.files bindingsFile, pkgInfoTemplate, pkgInfoGenerator
|
||||
inputs.files bindingsFile, pkgInfoTemplate, pkgInfoMap
|
||||
outputs.dir outputDir
|
||||
|
||||
doLast {
|
||||
@@ -332,11 +333,17 @@ task jaxbToJava {
|
||||
// below.
|
||||
arg(line: '-npa -quiet -extension')
|
||||
}
|
||||
exec {
|
||||
workingDir "${generatedDir}"
|
||||
|
||||
executable pkgInfoGenerator
|
||||
args pkgInfoTemplate, outputDir
|
||||
new File(pkgInfoMap).eachLine { line ->
|
||||
def (packageName, namespace) = line.split()
|
||||
ant.copy(
|
||||
tofile: "${outputDir}/${packageName}/package-info.java",
|
||||
overwrite: true,
|
||||
file: "${pkgInfoTemplate}") {
|
||||
filterSet() {
|
||||
filter(token: 'PACKAGE', value: packageName)
|
||||
filter(token: 'NAMESPACE', value: namespace)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,8 +419,10 @@ task soyToJS {
|
||||
"--allowExternalCalls", "false",
|
||||
"--srcs", "${soyFiles.join(',')}",
|
||||
"--shouldProvideRequireSoyNamespaces", "true",
|
||||
"--compileTimeGlobalsFile", "${resourcesSourceDir}/google/registry/ui/globals.txt",
|
||||
"--deps", "${deps.join(',')}"
|
||||
"--compileTimeGlobalsFile", "${resourcesSourceDir}/google/registry/ui/globals.txt"
|
||||
if (deps != "") {
|
||||
args "--deps", "${deps.join(',')}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,7 +523,7 @@ task compileProdJS(type: JavaExec) {
|
||||
|
||||
// manually include all the required js files
|
||||
closureArgs << "--js=${nodeModulesDir}/google-closure-library/**.js"
|
||||
closureArgs << "--js=${nodeModulesDir}/soyutils_usegoog.js"
|
||||
closureArgs << "--js=${jsDir}/soyutils_usegoog.js"
|
||||
closureArgs << "--js=${cssSourceDir}/registrar_bin.css.js"
|
||||
closureArgs << "--js=${jsSourceDir}/**.js"
|
||||
// TODO(shicong) Verify the compiled JS file works in Alpha
|
||||
@@ -525,7 +534,12 @@ task compileProdJS(type: JavaExec) {
|
||||
|
||||
compileJava.dependsOn jaxbToJava
|
||||
compileJava.dependsOn soyToJava
|
||||
compileJava.dependsOn compileProdJS
|
||||
// The Closure JS compiler does not support Windows. It is fine to disable it if all we want to do
|
||||
// is to complile the Java code on Windows.
|
||||
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
|
||||
compileJava.dependsOn compileProdJS
|
||||
assemble.dependsOn compileProdJS
|
||||
}
|
||||
|
||||
// stylesheetsToJavascript must happen after processResources, which wipes the
|
||||
// resources folder before copying data into it.
|
||||
@@ -536,13 +550,12 @@ compileProdJS.dependsOn rootProject.npmInstall
|
||||
compileProdJS.dependsOn processResources
|
||||
compileProdJS.dependsOn processTestResources
|
||||
compileProdJS.dependsOn soyToJS
|
||||
assemble.dependsOn compileProdJS
|
||||
|
||||
task karmaTest(type: Exec) {
|
||||
dependsOn ':npmInstall'
|
||||
workingDir rootProject.projectDir
|
||||
executable 'node_modules/karma/bin/karma'
|
||||
args('start')
|
||||
args('start', "${project.projectDir}/karma.conf.js")
|
||||
}
|
||||
|
||||
test.dependsOn karmaTest
|
||||
@@ -577,14 +590,43 @@ artifacts {
|
||||
*/
|
||||
class FilteringTest extends Test {
|
||||
|
||||
void setTests(List<String> tests) {
|
||||
// Common exclude pattern. See README in parent directory for explanation.
|
||||
exclude "**/*TestCase.*", "**/*TestSuite.*"
|
||||
include tests
|
||||
private void applyTestFilter() {
|
||||
if (project.testFilter) {
|
||||
testNameIncludePatterns = project.testFilter.split(',')
|
||||
|
||||
// By default, gradle test tasks will produce a failure if no tests
|
||||
// match the include/exclude/filter rules. Since test filtering allows us
|
||||
// to select a set of tests from a particular task, we don't want this
|
||||
// behavior.
|
||||
filter.failOnNoMatchingTests = false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set to false if you also want to include TestCase and TestSuite classes.
|
||||
*
|
||||
* <p>Must be defined before "test", if at all.
|
||||
*/
|
||||
boolean excludeTestCases = true
|
||||
|
||||
void setTests(List<String> tests) {
|
||||
// Common exclude pattern. See README in parent directory for explanation.
|
||||
if (excludeTestCases) {
|
||||
exclude "**/*TestCase.*", "**/*TestSuite.*"
|
||||
}
|
||||
include tests
|
||||
applyTestFilter()
|
||||
}
|
||||
|
||||
/**
|
||||
* Include all of the tests (except Test{Case,TestSuite}). This actually
|
||||
* doesn't explicitly "include" anything, in which cast the Test class tries
|
||||
* to include everything that is not explicitly excluded.
|
||||
*/
|
||||
void includeAllTests() {
|
||||
exclude "**/*TestCase.*", "**/*TestSuite.*"
|
||||
applyTestFilter()
|
||||
}
|
||||
}
|
||||
|
||||
task fragileTest(type: FilteringTest) {
|
||||
@@ -606,6 +648,12 @@ task outcastTest(type: FilteringTest) {
|
||||
maxParallelForks 5
|
||||
}
|
||||
|
||||
// Dedicated test suite for schema-dependent tests.
|
||||
task sqlIntegrationTest(type: FilteringTest) {
|
||||
excludeTestCases = false
|
||||
tests = ['google/registry/schema/integration/SqlIntegrationTestSuite.*']
|
||||
}
|
||||
|
||||
task findGoldenImages(type: JavaExec) {
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
main = 'google.registry.webdriver.GoldenImageFinder'
|
||||
@@ -688,9 +736,8 @@ task flowDocsTool(type: JavaExec) {
|
||||
args arguments
|
||||
}
|
||||
|
||||
test {
|
||||
// Common exclude pattern. See README in parent directory for explanation.
|
||||
exclude "**/*TestCase.*", "**/*TestSuite.*"
|
||||
task standardTest(type: FilteringTest) {
|
||||
includeAllTests()
|
||||
exclude fragileTestPatterns
|
||||
exclude outcastTestPatterns
|
||||
|
||||
@@ -712,7 +759,13 @@ test {
|
||||
doFirst {
|
||||
new File(screenshotsDir).deleteDir()
|
||||
}
|
||||
}.dependsOn(fragileTest, outcastTest)
|
||||
}
|
||||
|
||||
test {
|
||||
// Don't run any tests from this task, all testing gets done in the
|
||||
// FilteringTest tasks.
|
||||
exclude "**"
|
||||
}.dependsOn(fragileTest, outcastTest, standardTest)
|
||||
|
||||
createUberJar('nomulus', 'nomulus', 'google.registry.tools.RegistryTool')
|
||||
project.nomulus.dependsOn project(':third_party').jar
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.0.23
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -165,22 +164,23 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-lang3:3.5
|
||||
org.apache.httpcomponents:httpclient:4.5.8
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.0.23
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -163,22 +162,23 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-lang3:3.5
|
||||
org.apache.httpcomponents:httpclient:4.5.8
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.0.23
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -176,22 +175,23 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-lang3:3.5
|
||||
org.apache.httpcomponents:httpclient:4.5.8
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.0.23
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -165,22 +164,23 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-lang3:3.5
|
||||
org.apache.httpcomponents:httpclient:4.5.8
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.0.23
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -176,22 +175,23 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-lang3:3.5
|
||||
org.apache.httpcomponents:httpclient:4.5.8
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -130,6 +129,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -173,24 +173,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -129,6 +128,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -171,24 +171,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -16,6 +16,7 @@ process.env.CHROME_BIN = require('puppeteer').executablePath()
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '..',
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
@@ -1296,12 +1296,6 @@ public final class RegistryConfig {
|
||||
return config.registryTool.clientSecret;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Config("toolsCloudSqlJdbcUrl")
|
||||
public static String providesToolsCloudSqlJdbcUrl(RegistryConfigSettings config) {
|
||||
return config.registryTool.jdbcUrl;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Config("toolsCloudSqlUsername")
|
||||
public static String providesToolsCloudSqlUsername(RegistryConfigSettings config) {
|
||||
|
||||
@@ -213,7 +213,6 @@ public class RegistryConfigSettings {
|
||||
public static class RegistryTool {
|
||||
public String clientId;
|
||||
public String clientSecret;
|
||||
public String jdbcUrl;
|
||||
public String username;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -422,6 +422,4 @@ registryTool:
|
||||
clientId: YOUR_CLIENT_ID
|
||||
# OAuth client secret used by the tool.
|
||||
clientSecret: YOUR_CLIENT_SECRET
|
||||
# Nomulus tool uses a different jdbc url and user to connect to Cloud SQL
|
||||
jdbcUrl: jdbc:postgresql://localhost/tool
|
||||
username: toolusername
|
||||
|
||||
@@ -55,6 +55,12 @@
|
||||
<url-pattern>/registrar-settings</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Registry lock get/post/verify. -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>frontend-servlet</servlet-name>
|
||||
<url-pattern>/registry-lock-get</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Security config -->
|
||||
<security-constraint>
|
||||
<web-resource-collection>
|
||||
|
||||
@@ -35,6 +35,8 @@ import com.googlecode.objectify.annotation.Entity;
|
||||
import com.googlecode.objectify.annotation.Id;
|
||||
import com.googlecode.objectify.annotation.Index;
|
||||
import com.googlecode.objectify.annotation.Mapify;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.domain.DomainFlowUtils;
|
||||
import google.registry.model.BackupGroupRoot;
|
||||
import google.registry.model.Buildable;
|
||||
import google.registry.model.CreateAutoTimestamp;
|
||||
@@ -201,6 +203,13 @@ public class AllocationToken extends BackupGroupRoot implements Buildable {
|
||||
getInstance().redemptionHistoryEntry == null
|
||||
|| TokenType.SINGLE_USE.equals(getInstance().tokenType),
|
||||
"Redemption history entry can only be specified for SINGLE_USE tokens");
|
||||
if (getInstance().domainName != null) {
|
||||
try {
|
||||
DomainFlowUtils.validateDomainName(getInstance().domainName);
|
||||
} catch (EppException e) {
|
||||
throw new IllegalArgumentException("Invalid domain name: " + getInstance().domainName, e);
|
||||
}
|
||||
}
|
||||
return super.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ package google.registry.model.registry;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import google.registry.schema.domain.RegistryLock;
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
@@ -40,13 +41,29 @@ public final class RegistryLockDao {
|
||||
Long.class)
|
||||
.setParameter("verificationCode", verificationCode)
|
||||
.getSingleResult();
|
||||
// TODO(gbrodman): Don't throw NPE here. Maybe NoResultException fits better?
|
||||
checkNotNull(revisionId, "No registry lock with this code");
|
||||
return em.find(RegistryLock.class, revisionId);
|
||||
});
|
||||
}
|
||||
|
||||
public static void save(RegistryLock registryLock) {
|
||||
public static ImmutableList<RegistryLock> getByRegistrarId(String registrarId) {
|
||||
return jpaTm()
|
||||
.transact(
|
||||
() ->
|
||||
ImmutableList.copyOf(
|
||||
jpaTm()
|
||||
.getEntityManager()
|
||||
.createQuery(
|
||||
"SELECT lock FROM RegistryLock lock WHERE"
|
||||
+ " lock.registrarId = :registrarId",
|
||||
RegistryLock.class)
|
||||
.setParameter("registrarId", registrarId)
|
||||
.getResultList()));
|
||||
}
|
||||
|
||||
public static RegistryLock save(RegistryLock registryLock) {
|
||||
checkNotNull(registryLock, "Null registry lock cannot be saved");
|
||||
jpaTm().transact(() -> jpaTm().getEntityManager().persist(registryLock));
|
||||
return jpaTm().transact(() -> jpaTm().getEntityManager().merge(registryLock));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,17 +79,14 @@ public class JpaTransactionManagerImpl implements JpaTransactionManager {
|
||||
T result = work.run();
|
||||
txn.commit();
|
||||
return result;
|
||||
} catch (Throwable transactionException) {
|
||||
String rollbackMessage;
|
||||
} catch (RuntimeException e) {
|
||||
try {
|
||||
txn.rollback();
|
||||
rollbackMessage = "transaction rolled back";
|
||||
logger.atWarning().log("Error during transaction; transaction rolled back");
|
||||
} catch (Throwable rollbackException) {
|
||||
logger.atSevere().withCause(rollbackException).log("Rollback failed, suppressing error");
|
||||
rollbackMessage = "transaction rollback failed";
|
||||
logger.atSevere().withCause(rollbackException).log("Rollback failed; suppressing error");
|
||||
}
|
||||
throw new PersistenceException(
|
||||
"Error during transaction, " + rollbackMessage, transactionException);
|
||||
throw e;
|
||||
} finally {
|
||||
txnInfo.clear();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,16 @@
|
||||
|
||||
package google.registry.model.transaction;
|
||||
|
||||
import static google.registry.config.RegistryEnvironment.ALPHA;
|
||||
import static google.registry.config.RegistryEnvironment.CRASH;
|
||||
import static google.registry.config.RegistryEnvironment.SANDBOX;
|
||||
|
||||
import com.google.appengine.api.utils.SystemProperty;
|
||||
import com.google.appengine.api.utils.SystemProperty.Environment.Value;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import google.registry.config.RegistryEnvironment;
|
||||
import google.registry.model.ofy.DatastoreTransactionManager;
|
||||
import google.registry.persistence.DaggerPersistenceComponent;
|
||||
|
||||
/** Factory class to create {@link TransactionManager} instance. */
|
||||
// TODO: Rename this to PersistenceFactory and move to persistence package.
|
||||
@@ -27,19 +35,11 @@ public class TransactionManagerFactory {
|
||||
private TransactionManagerFactory() {}
|
||||
|
||||
private static JpaTransactionManager createJpaTransactionManager() {
|
||||
// TODO(shicong): There is currently no environment where we want to create a real JPA
|
||||
// transaction manager here. The unit tests that require one are all set up using
|
||||
// JpaTransactionManagerRule which launches its own PostgreSQL instance. When we actually have
|
||||
// PostgreSQL tables in production, ensure that all of the test environments are set up
|
||||
// correctly and restore the code that creates a JpaTransactionManager when
|
||||
// RegistryEnvironment.get() != UNITTEST.
|
||||
//
|
||||
// We removed the original code because it didn't work in sandbox (due to the absence of the
|
||||
// persistence.xml file, which has since been added), and then (after adding this) didn't work
|
||||
// in crash because the postgresql password hadn't been set up. Prior to restoring, we'll need
|
||||
// to do setup in all environments, and we probably only want to do this once we're actually
|
||||
// using Cloud SQL for one of the new tables.
|
||||
return DummyJpaTransactionManager.create();
|
||||
if (shouldEnableJpaTm() && isInAppEngine()) {
|
||||
return DaggerPersistenceComponent.create().appEngineJpaTransactionManager();
|
||||
} else {
|
||||
return DummyJpaTransactionManager.create();
|
||||
}
|
||||
}
|
||||
|
||||
private static TransactionManager createTransactionManager() {
|
||||
@@ -54,8 +54,29 @@ public class TransactionManagerFactory {
|
||||
* {@link google.registry.tools.RegistryCli} to initialize jpaTm.
|
||||
*/
|
||||
public static void initForTool() {
|
||||
// TODO(shicong): Uncomment the line below when we set up Cloud SQL instance in all environments
|
||||
// jpaTm = DaggerPersistenceComponent.create().nomulusToolJpaTransactionManager();
|
||||
if (shouldEnableJpaTm()) {
|
||||
jpaTm = DaggerPersistenceComponent.create().nomulusToolJpaTransactionManager();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(shicong): Enable JpaTm for all environments and remove this function
|
||||
private static boolean shouldEnableJpaTm() {
|
||||
return RegistryEnvironment.get() == ALPHA
|
||||
|| RegistryEnvironment.get() == CRASH
|
||||
|| RegistryEnvironment.get() == SANDBOX;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function uses App Engine API to determine if the current runtime environment is App
|
||||
* Engine.
|
||||
*
|
||||
* @see <a
|
||||
* href="https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/utils/SystemProperty">App
|
||||
* Engine API public doc</a>
|
||||
*/
|
||||
private static boolean isInAppEngine() {
|
||||
// SystemProperty.environment.value() returns null if the current runtime is local JVM
|
||||
return SystemProperty.environment.value() == Value.Production;
|
||||
}
|
||||
|
||||
/** Returns {@link TransactionManager} instance. */
|
||||
|
||||
@@ -30,6 +30,7 @@ import google.registry.ui.server.registrar.ConsoleUiAction;
|
||||
import google.registry.ui.server.registrar.OteStatusAction;
|
||||
import google.registry.ui.server.registrar.RegistrarConsoleModule;
|
||||
import google.registry.ui.server.registrar.RegistrarSettingsAction;
|
||||
import google.registry.ui.server.registrar.RegistryLockGetAction;
|
||||
|
||||
/** Dagger component with per-request lifetime for "default" App Engine module. */
|
||||
@RequestScope
|
||||
@@ -50,6 +51,8 @@ interface FrontendRequestComponent {
|
||||
OteStatusAction oteStatusAction();
|
||||
RegistrarSettingsAction registrarSettingsAction();
|
||||
|
||||
RegistryLockGetAction registryLockGetAction();
|
||||
|
||||
@Subcomponent.Builder
|
||||
abstract class Builder implements RequestComponentBuilder<FrontendRequestComponent> {
|
||||
@Override public abstract Builder requestModule(RequestModule requestModule);
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
package google.registry.persistence;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.persistence.Converter;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/** JPA converter for {@link CurrencyUnit}s. */
|
||||
@Converter(autoApply = true)
|
||||
public class CurrencyUnitConverter extends ToStringConverterBase<CurrencyUnit> {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public CurrencyUnit convertToEntityAttribute(@Nullable String columnValue) {
|
||||
return (columnValue == null) ? null : CurrencyUnit.of(columnValue);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.persistence;
|
||||
|
||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Maps;
|
||||
import java.io.File;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Stream;
|
||||
import javax.persistence.AttributeConverter;
|
||||
import org.hibernate.boot.MetadataSources;
|
||||
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
|
||||
import org.hibernate.jpa.boot.internal.PersistenceXmlParser;
|
||||
import org.hibernate.tool.hbm2ddl.SchemaExport;
|
||||
import org.hibernate.tool.schema.TargetType;
|
||||
|
||||
/** Utility class to export DDL script for given {@link javax.persistence.Entity} classes. */
|
||||
public class HibernateSchemaExporter {
|
||||
private final String jdbcUrl;
|
||||
private final String username;
|
||||
private final String password;
|
||||
|
||||
private HibernateSchemaExporter(String jdbcUrl, String username, String password) {
|
||||
this.jdbcUrl = jdbcUrl;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/** Constructs a {@link HibernateSchemaExporter} instance. */
|
||||
public static HibernateSchemaExporter create(String jdbcUrl, String username, String password) {
|
||||
return new HibernateSchemaExporter(jdbcUrl, username, password);
|
||||
}
|
||||
|
||||
/** Exports DDL script to the {@code outputFile} for the given {@code entityClasses}. */
|
||||
public void export(ImmutableList<Class> entityClasses, File outputFile) {
|
||||
// Configure Hibernate settings.
|
||||
Map<String, String> settings = Maps.newHashMap();
|
||||
settings.put(Environment.DIALECT, NomulusPostgreSQLDialect.class.getName());
|
||||
settings.put(Environment.URL, jdbcUrl);
|
||||
settings.put(Environment.USER, username);
|
||||
settings.put(Environment.PASS, password);
|
||||
settings.put(Environment.HBM2DDL_AUTO, "none");
|
||||
settings.put(Environment.SHOW_SQL, "true");
|
||||
settings.put(
|
||||
Environment.PHYSICAL_NAMING_STRATEGY, NomulusNamingStrategy.class.getCanonicalName());
|
||||
|
||||
MetadataSources metadata =
|
||||
new MetadataSources(new StandardServiceRegistryBuilder().applySettings(settings).build());
|
||||
|
||||
// Note that we need to also add all converters to the Hibernate context because
|
||||
// the entity class may use the customized type.
|
||||
Stream.concat(entityClasses.stream(), findAllConverters().stream())
|
||||
.forEach(metadata::addAnnotatedClass);
|
||||
|
||||
SchemaExport export = new SchemaExport();
|
||||
export.setHaltOnError(true);
|
||||
export.setFormat(true);
|
||||
export.setDelimiter(";");
|
||||
export.setOutputFile(outputFile.getAbsolutePath());
|
||||
export.createOnly(EnumSet.of(TargetType.SCRIPT), metadata.buildMetadata());
|
||||
}
|
||||
|
||||
private ImmutableList<Class> findAllConverters() {
|
||||
ParsedPersistenceXmlDescriptor descriptor =
|
||||
PersistenceXmlParser.locatePersistenceUnits(new Properties()).stream()
|
||||
.filter(unit -> PersistenceModule.PERSISTENCE_UNIT_NAME.equals(unit.getName()))
|
||||
.findFirst()
|
||||
.orElseThrow(
|
||||
() ->
|
||||
new IllegalArgumentException(
|
||||
String.format(
|
||||
"Could not find persistence unit with name %s",
|
||||
PersistenceModule.PERSISTENCE_UNIT_NAME)));
|
||||
return descriptor.getManagedClassNames().stream()
|
||||
.map(
|
||||
className -> {
|
||||
try {
|
||||
return Class.forName(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
})
|
||||
.filter(AttributeConverter.class::isAssignableFrom)
|
||||
.collect(toImmutableList());
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,10 @@ public class PersistenceModule {
|
||||
public static final String HIKARI_MAXIMUM_POOL_SIZE = "hibernate.hikari.maximumPoolSize";
|
||||
public static final String HIKARI_IDLE_TIMEOUT = "hibernate.hikari.idleTimeout";
|
||||
|
||||
public static final String HIKARI_DS_SOCKET_FACTORY = "hibernate.hikari.dataSource.socketFactory";
|
||||
public static final String HIKARI_DS_CLOUD_SQL_INSTANCE =
|
||||
"hibernate.hikari.dataSource.cloudSqlInstance";
|
||||
|
||||
@Provides
|
||||
@DefaultHibernateConfigs
|
||||
public static ImmutableMap<String, String> providesDefaultDatabaseConfigs() {
|
||||
@@ -79,27 +83,31 @@ public class PersistenceModule {
|
||||
return properties.build();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@PartialCloudSqlConfigs
|
||||
public static ImmutableMap<String, String> providesPartialCloudSqlConfigs(
|
||||
@Config("cloudSqlJdbcUrl") String jdbcUrl,
|
||||
@Config("cloudSqlInstanceConnectionName") String instanceConnectionName,
|
||||
@DefaultHibernateConfigs ImmutableMap<String, String> defaultConfigs) {
|
||||
HashMap<String, String> overrides = Maps.newHashMap(defaultConfigs);
|
||||
overrides.put(Environment.URL, jdbcUrl);
|
||||
overrides.put(HIKARI_DS_SOCKET_FACTORY, "com.google.cloud.sql.postgres.SocketFactory");
|
||||
overrides.put(HIKARI_DS_CLOUD_SQL_INSTANCE, instanceConnectionName);
|
||||
return ImmutableMap.copyOf(overrides);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@AppEngineJpaTm
|
||||
public static JpaTransactionManager providesAppEngineJpaTm(
|
||||
@Config("cloudSqlJdbcUrl") String jdbcUrl,
|
||||
@Config("cloudSqlUsername") String username,
|
||||
@Config("cloudSqlInstanceConnectionName") String instanceConnectionName,
|
||||
KmsKeyring kmsKeyring,
|
||||
@DefaultHibernateConfigs ImmutableMap<String, String> defaultConfigs,
|
||||
@PartialCloudSqlConfigs ImmutableMap<String, String> cloudSqlConfigs,
|
||||
Clock clock) {
|
||||
HashMap<String, String> overrides = Maps.newHashMap(defaultConfigs);
|
||||
|
||||
// For Java users, the Cloud SQL JDBC Socket Factory can provide authenticated connections.
|
||||
// See https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory for details.
|
||||
overrides.put("socketFactory", "com.google.cloud.sql.postgres.SocketFactory");
|
||||
overrides.put("cloudSqlInstance", instanceConnectionName);
|
||||
|
||||
overrides.put(Environment.URL, jdbcUrl);
|
||||
HashMap<String, String> overrides = Maps.newHashMap(cloudSqlConfigs);
|
||||
overrides.put(Environment.USER, username);
|
||||
overrides.put(Environment.PASS, kmsKeyring.getCloudSqlPassword());
|
||||
|
||||
return new JpaTransactionManagerImpl(create(overrides), clock);
|
||||
}
|
||||
|
||||
@@ -107,27 +115,13 @@ public class PersistenceModule {
|
||||
@Singleton
|
||||
@NomulusToolJpaTm
|
||||
public static JpaTransactionManager providesNomulusToolJpaTm(
|
||||
@Config("toolsCloudSqlJdbcUrl") String jdbcUrl,
|
||||
@Config("toolsCloudSqlUsername") String username,
|
||||
@Config("cloudSqlInstanceConnectionName") String instanceConnectionName,
|
||||
KmsKeyring kmsKeyring,
|
||||
@DefaultHibernateConfigs ImmutableMap<String, String> defaultConfigs,
|
||||
@PartialCloudSqlConfigs ImmutableMap<String, String> cloudSqlConfigs,
|
||||
Clock clock) {
|
||||
|
||||
// Cloud SQL JDBC Socket Factory library requires the jdbc url to include all connection
|
||||
// information, otherwise the connection initialization will fail. See here for more details:
|
||||
// https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory
|
||||
String fullJdbcUrl =
|
||||
new StringBuilder(jdbcUrl)
|
||||
.append("?cloudSqlInstance=" + instanceConnectionName)
|
||||
.append("&socketFactory=com.google.cloud.sql.postgres.SocketFactory")
|
||||
.append("&user=" + username)
|
||||
.append("&password=" + kmsKeyring.getCloudSqlPassword())
|
||||
.toString();
|
||||
|
||||
HashMap<String, String> overrides = Maps.newHashMap(defaultConfigs);
|
||||
overrides.put(Environment.URL, fullJdbcUrl);
|
||||
|
||||
HashMap<String, String> overrides = Maps.newHashMap(cloudSqlConfigs);
|
||||
overrides.put(Environment.USER, username);
|
||||
overrides.put(Environment.PASS, kmsKeyring.getToolsCloudSqlPassword());
|
||||
return new JpaTransactionManagerImpl(create(overrides), clock);
|
||||
}
|
||||
|
||||
@@ -166,6 +160,11 @@ public class PersistenceModule {
|
||||
@Documented
|
||||
@interface NomulusToolJpaTm {}
|
||||
|
||||
/** Dagger qualifier for the partial Cloud SQL configs. */
|
||||
@Qualifier
|
||||
@Documented
|
||||
@interface PartialCloudSqlConfigs {}
|
||||
|
||||
/** Dagger qualifier for the default Hibernate configurations. */
|
||||
// TODO(shicong): Change annotations in this class to none public or put them in a top level
|
||||
// package
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
package google.registry.persistence;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.persistence.AttributeConverter;
|
||||
|
||||
/** Abstract JPA converter for objects that are stored by their toString() value. */
|
||||
abstract class ToStringConverterBase<T> implements AttributeConverter<T, String> {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String convertToDatabaseColumn(@Nullable T entity) {
|
||||
return (entity == null) ? null : entity.toString();
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ import google.registry.util.Retrier;
|
||||
import google.registry.util.SendEmailService;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.inject.Inject;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
@@ -102,7 +103,7 @@ public final class IcannReportingUploadAction implements Runnable {
|
||||
final byte[] payload = readBytesFromGcs(gcsFilename);
|
||||
return icannReporter.send(payload, reportFilename);
|
||||
},
|
||||
IOException.class);
|
||||
IcannReportingUploadAction::isUploadFailureRetryable);
|
||||
} catch (RuntimeException e) {
|
||||
logger.atWarning().withCause(e).log("Upload to %s failed.", gcsFilename);
|
||||
}
|
||||
@@ -115,6 +116,21 @@ public final class IcannReportingUploadAction implements Runnable {
|
||||
String.format("OK, attempted uploading %d reports", manifestedFiles.size()));
|
||||
}
|
||||
|
||||
/** Don't retry when reports are already uploaded or can't be uploaded. */
|
||||
private static final String ICANN_UPLOAD_PERMANENT_ERROR_MESSAGE =
|
||||
"A report for that month already exists, the cut-off date already passed.";
|
||||
|
||||
/** Don't retry when the IP address isn't whitelisted, as retries go through the same IP. */
|
||||
private static final Pattern ICANN_UPLOAD_WHITELIST_ERROR =
|
||||
Pattern.compile("Your IP address .+ is not allowed to connect");
|
||||
|
||||
/** Predicate to retry uploads on IOException, so long as they aren't non-retryable errors. */
|
||||
private static boolean isUploadFailureRetryable(Throwable e) {
|
||||
return (e instanceof IOException)
|
||||
&& !e.getMessage().contains(ICANN_UPLOAD_PERMANENT_ERROR_MESSAGE)
|
||||
&& !ICANN_UPLOAD_WHITELIST_ERROR.matcher(e.getMessage()).matches();
|
||||
}
|
||||
|
||||
private void emailUploadResults(ImmutableMap<String, Boolean> reportSummary) {
|
||||
String subject = String.format(
|
||||
"ICANN Monthly report upload summary: %d/%d succeeded",
|
||||
|
||||
@@ -347,7 +347,7 @@ public class AuthenticatedRegistrarAccessor {
|
||||
|
||||
/** Exception thrown when the current user doesn't have access to the requested Registrar. */
|
||||
public static class RegistrarAccessDeniedException extends Exception {
|
||||
RegistrarAccessDeniedException(String message) {
|
||||
public RegistrarAccessDeniedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,8 @@ import org.joda.time.DateTime;
|
||||
name = "idx_registry_lock_repo_id_revision_id",
|
||||
columnList = "repoId, revisionId",
|
||||
unique = true),
|
||||
@Index(name = "idx_registry_lock_verification_code", columnList = "verificationCode")
|
||||
@Index(name = "idx_registry_lock_verification_code", columnList = "verificationCode"),
|
||||
@Index(name = "idx_registry_lock_registrar_id", columnList = "registrarId")
|
||||
})
|
||||
public final class RegistryLock extends ImmutableObject implements Buildable {
|
||||
|
||||
@@ -175,12 +176,13 @@ public final class RegistryLock extends ImmutableObject implements Buildable {
|
||||
this.completionTimestamp = toZonedDateTime(dateTime);
|
||||
}
|
||||
|
||||
public boolean isVerified() {
|
||||
return completionTimestamp != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder asBuilder() {
|
||||
RegistryLock clone = clone(this);
|
||||
// Revision ID should be different for every object
|
||||
clone.revisionId = null;
|
||||
return new Builder(clone);
|
||||
return new Builder(clone(this));
|
||||
}
|
||||
|
||||
/** Builder for {@link google.registry.schema.domain.RegistryLock}. */
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
|
||||
/** A command to upload a {@link ClaimsListShard}. */
|
||||
@Parameters(separators = " =", commandDescription = "Manually upload a new claims list file")
|
||||
final class UploadClaimsListCommand extends ConfirmingCommand implements CommandWithRemoteApi {
|
||||
final class UploadClaimsListCommand extends ConfirmingCommand implements CommandWithCloudSql {
|
||||
|
||||
@Parameter(description = "Claims list filename")
|
||||
private List<String> mainParameters = new ArrayList<>();
|
||||
|
||||
@@ -21,7 +21,9 @@ import static google.registry.util.DomainNameUtils.canonicalizeDomainName;
|
||||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import com.google.re2j.Pattern;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
@@ -194,12 +196,10 @@ public final class RegistrarFormFields {
|
||||
FormField.named("visibleInDomainWhoisAsAbuse", Boolean.class).build();
|
||||
|
||||
public static final FormField<String, String> CONTACT_PHONE_NUMBER_FIELD =
|
||||
FormFields.PHONE_NUMBER.asBuilder()
|
||||
.build();
|
||||
FormFields.PHONE_NUMBER.asBuilder().build();
|
||||
|
||||
public static final FormField<String, String> CONTACT_FAX_NUMBER_FIELD =
|
||||
FormFields.PHONE_NUMBER.asBuilderNamed("faxNumber")
|
||||
.build();
|
||||
FormFields.PHONE_NUMBER.asBuilderNamed("faxNumber").build();
|
||||
|
||||
public static final FormField<String, String> CONTACT_GAE_USER_ID_FIELD =
|
||||
FormFields.NAME.asBuilderNamed("gaeUserId").build();
|
||||
@@ -217,11 +217,8 @@ public final class RegistrarFormFields {
|
||||
.asSet(Splitter.on(',').omitEmptyStrings().trimResults())
|
||||
.build();
|
||||
|
||||
public static final FormField<List<Map<String, ?>>, List<RegistrarContact.Builder>>
|
||||
CONTACTS_FIELD = FormField.mapNamed("contacts")
|
||||
.transform(RegistrarContact.Builder.class, RegistrarFormFields::toRegistrarContactBuilder)
|
||||
.asList()
|
||||
.build();
|
||||
public static final FormField<List<Map<String, ?>>, List<Map<String, ?>>> CONTACTS_AS_MAPS =
|
||||
FormField.mapNamed("contacts").asList().build();
|
||||
|
||||
public static final FormField<List<String>, List<String>> I18N_STREET_FIELD =
|
||||
FormFields.XS_NORMALIZED_STRING.asBuilderNamed("street")
|
||||
@@ -344,33 +341,60 @@ public final class RegistrarFormFields {
|
||||
}
|
||||
}
|
||||
|
||||
private static @Nullable RegistrarContact.Builder toRegistrarContactBuilder(
|
||||
@Nullable Map<String, ?> args) {
|
||||
public static ImmutableList<RegistrarContact.Builder> getRegistrarContactBuilders(
|
||||
ImmutableSet<RegistrarContact> existingContacts, @Nullable Map<String, ?> args) {
|
||||
if (args == null) {
|
||||
return null;
|
||||
return ImmutableList.of();
|
||||
}
|
||||
RegistrarContact.Builder builder = new RegistrarContact.Builder();
|
||||
CONTACT_NAME_FIELD.extractUntyped(args).ifPresent(builder::setName);
|
||||
CONTACT_EMAIL_ADDRESS_FIELD.extractUntyped(args).ifPresent(builder::setEmailAddress);
|
||||
CONTACT_VISIBLE_IN_WHOIS_AS_ADMIN_FIELD
|
||||
.extractUntyped(args)
|
||||
.ifPresent(builder::setVisibleInWhoisAsAdmin);
|
||||
CONTACT_VISIBLE_IN_WHOIS_AS_TECH_FIELD
|
||||
.extractUntyped(args)
|
||||
.ifPresent(builder::setVisibleInWhoisAsTech);
|
||||
PHONE_AND_EMAIL_VISIBLE_IN_DOMAIN_WHOIS_AS_ABUSE_FIELD
|
||||
.extractUntyped(args)
|
||||
.ifPresent(builder::setVisibleInDomainWhoisAsAbuse);
|
||||
CONTACT_PHONE_NUMBER_FIELD.extractUntyped(args).ifPresent(builder::setPhoneNumber);
|
||||
CONTACT_FAX_NUMBER_FIELD.extractUntyped(args).ifPresent(builder::setFaxNumber);
|
||||
CONTACT_TYPES.extractUntyped(args).ifPresent(builder::setTypes);
|
||||
CONTACT_GAE_USER_ID_FIELD.extractUntyped(args).ifPresent(builder::setGaeUserId);
|
||||
CONTACT_ALLOWED_TO_SET_REGISTRY_LOCK_PASSWORD
|
||||
.extractUntyped(args)
|
||||
.ifPresent(builder::setAllowedToSetRegistryLockPassword);
|
||||
Optional<List<Map<String, ?>>> contactsAsMaps = CONTACTS_AS_MAPS.extractUntyped(args);
|
||||
if (!contactsAsMaps.isPresent()) {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
ImmutableList.Builder<RegistrarContact.Builder> result = new ImmutableList.Builder<>();
|
||||
for (Map<String, ?> contactAsMap : contactsAsMaps.get()) {
|
||||
String emailAddress =
|
||||
CONTACT_EMAIL_ADDRESS_FIELD
|
||||
.extractUntyped(contactAsMap)
|
||||
.orElseThrow(
|
||||
() -> new IllegalArgumentException("Contacts from UI must have email addresses"));
|
||||
// Start with a new builder if the contact didn't previously exist
|
||||
RegistrarContact.Builder contactBuilder =
|
||||
existingContacts.stream()
|
||||
.filter(rc -> rc.getEmailAddress().equals(emailAddress))
|
||||
.findFirst()
|
||||
.map(RegistrarContact::asBuilder)
|
||||
.orElse(new RegistrarContact.Builder());
|
||||
applyRegistrarContactArgs(contactBuilder, contactAsMap);
|
||||
result.add(contactBuilder);
|
||||
}
|
||||
return result.build();
|
||||
}
|
||||
|
||||
private static void applyRegistrarContactArgs(
|
||||
RegistrarContact.Builder builder, Map<String, ?> args) {
|
||||
builder.setName(CONTACT_NAME_FIELD.extractUntyped(args).orElse(null));
|
||||
builder.setEmailAddress(CONTACT_EMAIL_ADDRESS_FIELD.extractUntyped(args).orElse(null));
|
||||
builder.setVisibleInWhoisAsAdmin(
|
||||
CONTACT_VISIBLE_IN_WHOIS_AS_ADMIN_FIELD.extractUntyped(args).orElse(false));
|
||||
builder.setVisibleInWhoisAsTech(
|
||||
CONTACT_VISIBLE_IN_WHOIS_AS_TECH_FIELD.extractUntyped(args).orElse(false));
|
||||
builder.setVisibleInDomainWhoisAsAbuse(
|
||||
PHONE_AND_EMAIL_VISIBLE_IN_DOMAIN_WHOIS_AS_ABUSE_FIELD.extractUntyped(args).orElse(false));
|
||||
builder.setPhoneNumber(CONTACT_PHONE_NUMBER_FIELD.extractUntyped(args).orElse(null));
|
||||
builder.setFaxNumber(CONTACT_FAX_NUMBER_FIELD.extractUntyped(args).orElse(null));
|
||||
builder.setTypes(CONTACT_TYPES.extractUntyped(args).orElse(ImmutableSet.of()));
|
||||
builder.setGaeUserId(CONTACT_GAE_USER_ID_FIELD.extractUntyped(args).orElse(null));
|
||||
builder.setAllowedToSetRegistryLockPassword(
|
||||
CONTACT_ALLOWED_TO_SET_REGISTRY_LOCK_PASSWORD.extractUntyped(args).orElse(false));
|
||||
|
||||
// Registry lock password does not need to be set every time
|
||||
CONTACT_REGISTRY_LOCK_PASSWORD_FIELD
|
||||
.extractUntyped(args)
|
||||
.ifPresent(builder::setRegistryLockPassword);
|
||||
return builder;
|
||||
.ifPresent(
|
||||
password -> {
|
||||
if (!Strings.isNullOrEmpty(password)) {
|
||||
builder.setRegistryLockPassword(password);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ import google.registry.util.CollectionUtils;
|
||||
import google.registry.util.DiffUtils;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
@@ -175,8 +174,7 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
}
|
||||
|
||||
private RegistrarResult update(final Map<String, ?> args, String clientId) {
|
||||
return tm()
|
||||
.transact(
|
||||
return tm().transact(
|
||||
() -> {
|
||||
// We load the registrar here rather than outside of the transaction - to make
|
||||
// sure we have the latest version. This one is loaded inside the transaction, so it's
|
||||
@@ -215,7 +213,8 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
updatedRegistrar = checkAndUpdateAdminControlledFields(updatedRegistrar, args);
|
||||
|
||||
// read the contacts from the request.
|
||||
ImmutableSet<RegistrarContact> updatedContacts = readContacts(registrar, args);
|
||||
ImmutableSet<RegistrarContact> updatedContacts =
|
||||
readContacts(registrar, contacts, args);
|
||||
|
||||
// Save the updated contacts
|
||||
if (!updatedContacts.equals(contacts)) {
|
||||
@@ -240,11 +239,18 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
});
|
||||
}
|
||||
|
||||
private Map<String, Object> expandRegistrarWithContacts(Iterable<RegistrarContact> contacts,
|
||||
Registrar registrar) {
|
||||
private Map<String, Object> expandRegistrarWithContacts(
|
||||
Iterable<RegistrarContact> contacts, Registrar registrar) {
|
||||
ImmutableSet<Map<String, Object>> expandedContacts =
|
||||
Streams.stream(contacts)
|
||||
.map(RegistrarContact::toDiffableFieldMap)
|
||||
// Note: per the javadoc, toDiffableFieldMap includes sensitive data but we don't want
|
||||
// to display it here
|
||||
.peek(
|
||||
map -> {
|
||||
map.remove("registryLockPasswordHash");
|
||||
map.remove("registryLockPasswordSalt");
|
||||
})
|
||||
.collect(toImmutableSet());
|
||||
// Use LinkedHashMap here to preserve ordering; null values mean we can't use ImmutableMap.
|
||||
LinkedHashMap<String, Object> result = new LinkedHashMap<>(registrar.toDiffableFieldMap());
|
||||
@@ -377,16 +383,10 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
|
||||
/** Reads the contacts from the supplied args. */
|
||||
public static ImmutableSet<RegistrarContact> readContacts(
|
||||
Registrar registrar, Map<String, ?> args) {
|
||||
|
||||
ImmutableSet.Builder<RegistrarContact> contacts = new ImmutableSet.Builder<>();
|
||||
Optional<List<RegistrarContact.Builder>> builders =
|
||||
RegistrarFormFields.CONTACTS_FIELD.extractUntyped(args);
|
||||
if (builders.isPresent()) {
|
||||
builders.get().forEach(c -> contacts.add(c.setParent(registrar).build()));
|
||||
}
|
||||
|
||||
return contacts.build();
|
||||
Registrar registrar, ImmutableSet<RegistrarContact> existingContacts, Map<String, ?> args) {
|
||||
return RegistrarFormFields.getRegistrarContactBuilders(existingContacts, args).stream()
|
||||
.map(builder -> builder.setParent(registrar).build())
|
||||
.collect(toImmutableSet());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -452,8 +452,17 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
() ->
|
||||
new FormException(
|
||||
"Not allowed to set registry lock password directly on new contact"));
|
||||
if (!existingContact.isAllowedToSetRegistryLockPassword()) {
|
||||
throw new FormException("Registrar contact not allowed to set registry lock password");
|
||||
if (updatedContact.isRegistryLockAllowed()) {
|
||||
// the password must have been set before or the user was allowed to set it now
|
||||
if (!existingContact.isAllowedToSetRegistryLockPassword()
|
||||
&& !existingContact.isRegistryLockAllowed()) {
|
||||
throw new FormException("Registrar contact not allowed to set registry lock password");
|
||||
}
|
||||
}
|
||||
if (updatedContact.isAllowedToSetRegistryLockPassword()) {
|
||||
if (!existingContact.isAllowedToSetRegistryLockPassword()) {
|
||||
throw new FormException("Cannot set isAllowedToSetRegistryLockPassword through UI");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.ui.server.registrar;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||
import static com.google.common.net.HttpHeaders.X_FRAME_OPTIONS;
|
||||
import static google.registry.security.JsonResponseHelper.Status.SUCCESS;
|
||||
import static google.registry.ui.server.registrar.RegistrarConsoleModule.PARAM_CLIENT_ID;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
|
||||
|
||||
import com.google.appengine.api.users.User;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.common.net.MediaType;
|
||||
import com.google.gson.Gson;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registrar.RegistrarContact;
|
||||
import google.registry.model.registry.RegistryLockDao;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Action.Method;
|
||||
import google.registry.request.Parameter;
|
||||
import google.registry.request.RequestMethod;
|
||||
import google.registry.request.Response;
|
||||
import google.registry.request.auth.Auth;
|
||||
import google.registry.request.auth.AuthResult;
|
||||
import google.registry.request.auth.AuthenticatedRegistrarAccessor;
|
||||
import google.registry.request.auth.AuthenticatedRegistrarAccessor.RegistrarAccessDeniedException;
|
||||
import google.registry.request.auth.UserAuthInfo;
|
||||
import google.registry.schema.domain.RegistryLock;
|
||||
import google.registry.security.JsonResponseHelper;
|
||||
import java.util.Optional;
|
||||
import javax.inject.Inject;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
* Servlet that allows for getting locks for a particular registrar.
|
||||
*
|
||||
* <p>Note: at the moment we have no mechanism for JSON GET/POSTs in the same class or at the same
|
||||
* URL, which is why this is distinct from the {@link RegistryLockPostAction}.
|
||||
*/
|
||||
@Action(
|
||||
service = Action.Service.DEFAULT,
|
||||
path = RegistryLockGetAction.PATH,
|
||||
auth = Auth.AUTH_PUBLIC_LOGGED_IN)
|
||||
public final class RegistryLockGetAction implements Runnable {
|
||||
|
||||
public static final String PATH = "/registry-lock-get";
|
||||
|
||||
private static final String LOCK_ENABLED_FOR_CONTACT_PARAM = "lockEnabledForContact";
|
||||
private static final String EMAIL_PARAM = "email";
|
||||
private static final String LOCKS_PARAM = "locks";
|
||||
private static final String FULLY_QUALIFIED_DOMAIN_NAME_PARAM = "fullyQualifiedDomainName";
|
||||
private static final String LOCKED_TIME_PARAM = "lockedTime";
|
||||
private static final String LOCKED_BY_PARAM = "lockedBy";
|
||||
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
private static final Gson GSON = new Gson();
|
||||
|
||||
@VisibleForTesting Method method;
|
||||
private final Response response;
|
||||
private final AuthenticatedRegistrarAccessor registrarAccessor;
|
||||
@VisibleForTesting AuthResult authResult;
|
||||
@VisibleForTesting Optional<String> paramClientId;
|
||||
|
||||
@Inject
|
||||
RegistryLockGetAction(
|
||||
@RequestMethod Method method,
|
||||
Response response,
|
||||
AuthenticatedRegistrarAccessor registrarAccessor,
|
||||
AuthResult authResult,
|
||||
@Parameter(PARAM_CLIENT_ID) Optional<String> paramClientId) {
|
||||
this.method = method;
|
||||
this.response = response;
|
||||
this.registrarAccessor = registrarAccessor;
|
||||
this.authResult = authResult;
|
||||
this.paramClientId = paramClientId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
checkArgument(Method.GET.equals(method), "Only GET requests allowed");
|
||||
checkArgument(authResult.userAuthInfo().isPresent(), "User auth info must be present");
|
||||
checkArgument(paramClientId.isPresent(), "clientId must be present");
|
||||
response.setContentType(MediaType.JSON_UTF_8);
|
||||
response.setHeader(X_FRAME_OPTIONS, "SAMEORIGIN"); // Disallow iframing.
|
||||
response.setHeader("X-Ui-Compatible", "IE=edge"); // Ask IE not to be silly.
|
||||
|
||||
try {
|
||||
ImmutableMap<String, ?> resultMap = getLockedDomainsMap(paramClientId.get());
|
||||
ImmutableMap<String, ?> payload =
|
||||
JsonResponseHelper.create(SUCCESS, "Successful locks retrieval", resultMap);
|
||||
response.setPayload(GSON.toJson(payload));
|
||||
} catch (RegistrarAccessDeniedException e) {
|
||||
logger.atWarning().withCause(e).log(
|
||||
"User %s doesn't have access to this registrar", authResult.userIdForLogging());
|
||||
response.setStatus(SC_FORBIDDEN);
|
||||
} catch (Exception e) {
|
||||
logger.atWarning().withCause(e).log("Unexpected error when retrieving locks for a registrar");
|
||||
response.setStatus(SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
private ImmutableMap<String, ?> getLockedDomainsMap(String clientId)
|
||||
throws RegistrarAccessDeniedException {
|
||||
// Note: admins always have access to the locks page
|
||||
checkArgument(authResult.userAuthInfo().isPresent(), "User auth info must be present");
|
||||
UserAuthInfo userAuthInfo = authResult.userAuthInfo().get();
|
||||
boolean isAdmin = userAuthInfo.isUserAdmin();
|
||||
Registrar registrar = getRegistrarAndVerifyLockAccess(clientId, isAdmin);
|
||||
User user = userAuthInfo.user();
|
||||
boolean isRegistryLockAllowed =
|
||||
isAdmin
|
||||
|| registrar.getContacts().stream()
|
||||
.filter(contact -> contact.getEmailAddress().equals(user.getEmail()))
|
||||
.findFirst()
|
||||
.map(RegistrarContact::isRegistryLockAllowed)
|
||||
.orElse(false);
|
||||
return ImmutableMap.of(
|
||||
LOCK_ENABLED_FOR_CONTACT_PARAM,
|
||||
isRegistryLockAllowed,
|
||||
EMAIL_PARAM,
|
||||
user.getEmail(),
|
||||
PARAM_CLIENT_ID,
|
||||
registrar.getClientId(),
|
||||
LOCKS_PARAM,
|
||||
getLockedDomains(clientId));
|
||||
}
|
||||
|
||||
private Registrar getRegistrarAndVerifyLockAccess(String clientId, boolean isAdmin)
|
||||
throws RegistrarAccessDeniedException {
|
||||
Registrar registrar = registrarAccessor.getRegistrar(clientId);
|
||||
checkArgument(
|
||||
isAdmin || registrar.isRegistryLockAllowed(),
|
||||
"Registry lock not allowed for this registrar");
|
||||
return registrar;
|
||||
}
|
||||
|
||||
private ImmutableList<ImmutableMap<String, ?>> getLockedDomains(String clientId) {
|
||||
ImmutableList<RegistryLock> locks =
|
||||
RegistryLockDao.getByRegistrarId(clientId).stream()
|
||||
.filter(RegistryLock::isVerified)
|
||||
.collect(toImmutableList());
|
||||
return locks.stream().map(this::lockToMap).collect(toImmutableList());
|
||||
}
|
||||
|
||||
private ImmutableMap<String, ?> lockToMap(RegistryLock lock) {
|
||||
return ImmutableMap.of(
|
||||
FULLY_QUALIFIED_DOMAIN_NAME_PARAM,
|
||||
lock.getDomainName(),
|
||||
LOCKED_TIME_PARAM,
|
||||
lock.getCompletionTimestamp().map(DateTime::toString).orElse(""),
|
||||
LOCKED_BY_PARAM,
|
||||
lock.isSuperuser() ? "admin" : lock.getRegistrarPocId());
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
tmp="$(mktemp -d "${TMPDIR:-/tmp}/list_generated_files.XXXXXXXX")"
|
||||
[[ "${tmp}" != "" ]] || exit 1
|
||||
trap "rm -rf ${tmp}" EXIT
|
||||
|
||||
base="${PWD}"
|
||||
export LC_ALL=C
|
||||
|
||||
cd "${tmp}"
|
||||
cp "${base}/java/google/registry/xjc/bindings.xjb" .
|
||||
cp "${base}"/java/google/registry/xml/xsd/*.xsd .
|
||||
"${base}/third_party/java/jaxb/jaxb-xjc" -extension -d "${tmp}" -b *.xjb *.xsd \
|
||||
| sed -ne s@google/registry/xjc/@@p \
|
||||
| grep -v package-info.java \
|
||||
| sort \
|
||||
> xjc_generated_files
|
||||
|
||||
cat <<EOF
|
||||
#
|
||||
# .'\`\`'. ...
|
||||
# :o o \`....'\` ;
|
||||
# \`. O :'
|
||||
# \`': \`.
|
||||
# \`:. \`.
|
||||
# : \`. \`.
|
||||
# \`..'\`... \`.
|
||||
# \`... \`.
|
||||
# DO NOT EDIT \`\`... \`.
|
||||
# THIS FILE \`\`\`\`\`.
|
||||
#
|
||||
# When you make changes to the XML schemas (*.xsd) or the JAXB bindings file
|
||||
# (bindings.xjb), you must regenerate this file with the following commands:
|
||||
#
|
||||
# bazel run java/google/registry/xjc:list_generated_files | tee /tmp/lol
|
||||
# mv /tmp/lol java/google/registry/xjc/generated_files.bzl
|
||||
#
|
||||
EOF
|
||||
|
||||
echo
|
||||
echo "pkginfo_generated_files = ["
|
||||
while read package; do
|
||||
printf ' "%s/package-info.java",\n' "${package}"
|
||||
done < <(awk -F/ '{print $1}' xjc_generated_files | sort -u)
|
||||
echo "]"
|
||||
|
||||
echo
|
||||
echo "xjc_generated_files = ["
|
||||
while read path; do
|
||||
printf ' "%s",\n' "${path}"
|
||||
done <xjc_generated_files
|
||||
echo "]"
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
[[ $# != 2 ]] && { echo "usage: $0 TEMPLATE OUTDIR" >&2; exit 1; }
|
||||
|
||||
template="$1"
|
||||
outdir="$2"
|
||||
|
||||
create() {
|
||||
package=$1
|
||||
namespace=$2
|
||||
sed -e "s,@PACKAGE@,${package},g" \
|
||||
-e "s,@NAMESPACE@,${namespace},g" \
|
||||
< "${template}" \
|
||||
> "${outdir}/${package}/package-info.java"
|
||||
}
|
||||
|
||||
create contact urn:ietf:params:xml:ns:contact-1.0
|
||||
create domain urn:ietf:params:xml:ns:domain-1.0
|
||||
create dsig http://www.w3.org/2000/09/xmldsig#
|
||||
create epp urn:ietf:params:xml:ns:epp-1.0
|
||||
create eppcom urn:ietf:params:xml:ns:eppcom-1.0
|
||||
create fee06 urn:ietf:params:xml:ns:fee-0.6
|
||||
create fee11 urn:ietf:params:xml:ns:fee-0.11
|
||||
create fee12 urn:ietf:params:xml:ns:fee-0.12
|
||||
create host urn:ietf:params:xml:ns:host-1.0
|
||||
create iirdea urn:ietf:params:xml:ns:iirdea-1.0
|
||||
create launch urn:ietf:params:xml:ns:launch-1.0
|
||||
create mark urn:ietf:params:xml:ns:mark-1.0
|
||||
create rde urn:ietf:params:xml:ns:rde-1.0
|
||||
create rdecontact urn:ietf:params:xml:ns:rdeContact-1.0
|
||||
create rdedomain urn:ietf:params:xml:ns:rdeDomain-1.0
|
||||
create rdeeppparams urn:ietf:params:xml:ns:rdeEppParams-1.0
|
||||
create rdeheader urn:ietf:params:xml:ns:rdeHeader-1.0
|
||||
create rdehost urn:ietf:params:xml:ns:rdeHost-1.0
|
||||
create rdeidn urn:ietf:params:xml:ns:rdeIDN-1.0
|
||||
create rdenndn urn:ietf:params:xml:ns:rdeNNDN-1.0
|
||||
create rdenotification urn:ietf:params:xml:ns:rdeNotification-1.0
|
||||
create rdepolicy urn:ietf:params:xml:ns:rdePolicy-1.0
|
||||
create rderegistrar urn:ietf:params:xml:ns:rdeRegistrar-1.0
|
||||
create rdereport urn:ietf:params:xml:ns:rdeReport-1.0
|
||||
create rgp urn:ietf:params:xml:ns:rgp-1.0
|
||||
create secdns urn:ietf:params:xml:ns:secDNS-1.1
|
||||
create smd urn:ietf:params:xml:ns:signedMark-1.0
|
||||
@@ -1,4 +1,3 @@
|
||||
// See build.xml and make_pkginfo.sh which preprocess this into actual files.
|
||||
@XmlSchema(
|
||||
elementFormDefault = XmlNsForm.QUALIFIED,
|
||||
namespace = "@NAMESPACE@",
|
||||
|
||||
27
core/src/main/java/google/registry/xjc/package-info.map
Normal file
27
core/src/main/java/google/registry/xjc/package-info.map
Normal file
@@ -0,0 +1,27 @@
|
||||
contact urn:ietf:params:xml:ns:contact-1.0
|
||||
domain urn:ietf:params:xml:ns:domain-1.0
|
||||
dsig http://www.w3.org/2000/09/xmldsig#
|
||||
epp urn:ietf:params:xml:ns:epp-1.0
|
||||
eppcom urn:ietf:params:xml:ns:eppcom-1.0
|
||||
fee06 urn:ietf:params:xml:ns:fee-0.6
|
||||
fee11 urn:ietf:params:xml:ns:fee-0.11
|
||||
fee12 urn:ietf:params:xml:ns:fee-0.12
|
||||
host urn:ietf:params:xml:ns:host-1.0
|
||||
iirdea urn:ietf:params:xml:ns:iirdea-1.0
|
||||
launch urn:ietf:params:xml:ns:launch-1.0
|
||||
mark urn:ietf:params:xml:ns:mark-1.0
|
||||
rde urn:ietf:params:xml:ns:rde-1.0
|
||||
rdecontact urn:ietf:params:xml:ns:rdeContact-1.0
|
||||
rdedomain urn:ietf:params:xml:ns:rdeDomain-1.0
|
||||
rdeeppparams urn:ietf:params:xml:ns:rdeEppParams-1.0
|
||||
rdeheader urn:ietf:params:xml:ns:rdeHeader-1.0
|
||||
rdehost urn:ietf:params:xml:ns:rdeHost-1.0
|
||||
rdeidn urn:ietf:params:xml:ns:rdeIDN-1.0
|
||||
rdenndn urn:ietf:params:xml:ns:rdeNNDN-1.0
|
||||
rdenotification urn:ietf:params:xml:ns:rdeNotification-1.0
|
||||
rdepolicy urn:ietf:params:xml:ns:rdePolicy-1.0
|
||||
rderegistrar urn:ietf:params:xml:ns:rdeRegistrar-1.0
|
||||
rdereport urn:ietf:params:xml:ns:rdeReport-1.0
|
||||
rgp urn:ietf:params:xml:ns:rgp-1.0
|
||||
secdns urn:ietf:params:xml:ns:secDNS-1.1
|
||||
smd urn:ietf:params:xml:ns:signedMark-1.0
|
||||
@@ -35,6 +35,7 @@
|
||||
<!-- Customized type converters -->
|
||||
<class>google.registry.persistence.BloomFilterConverter</class>
|
||||
<class>google.registry.persistence.CreateAutoTimestampConverter</class>
|
||||
<class>google.registry.persistence.CurrencyUnitConverter</class>
|
||||
<class>google.registry.persistence.UpdateAutoTimestampConverter</class>
|
||||
<class>google.registry.persistence.ZonedDateTimeConverter</class>
|
||||
|
||||
|
||||
@@ -37,17 +37,18 @@
|
||||
{/call}
|
||||
|
||||
<p>Please work with the registrant to mitigate any security issues and have the
|
||||
domains delisted.</p>
|
||||
domains delisted. If you believe that any of the domains were reported in error, or are still
|
||||
receiving reports for issues that have been remediated,
|
||||
please <a href="https://safebrowsing.google.com/safebrowsing/report_error/?hl=en">submit a
|
||||
request</a> to have the site reviewed.</p>
|
||||
|
||||
{call .resourceList}
|
||||
{param resources: $resources /}
|
||||
{/call}
|
||||
|
||||
<p>You will continue to receive a monthly summary of all domains managed by your registrar
|
||||
that remain on our lists of potential security threats. You will additionally receive a daily
|
||||
notice when any new domains that are added to these lists. Once the registrant has resolved
|
||||
the security issues and followed the steps to have his or her domain reviewed and delisted
|
||||
it will automatically be removed from our monthly reporting.</p>
|
||||
that remain on our lists of potential security threats. You will also receive a daily
|
||||
notice when any new domains are added to these lists.</p>
|
||||
|
||||
<p>If you have any questions regarding this notice, please contact {$replyToEmail}.</p>
|
||||
{/template}
|
||||
@@ -79,11 +80,14 @@
|
||||
{param resources: $resources /}
|
||||
{/call}
|
||||
|
||||
<p>If you believe that any of the domains were reported in error, or are still receiving
|
||||
reports for issues that have been remediated,
|
||||
please <a href="https://safebrowsing.google.com/safebrowsing/report_error/?hl=en">submit
|
||||
a request</a> to have the site reviewed.</p>
|
||||
|
||||
<p>You will continue to receive daily notices when new domains managed by your registrar
|
||||
are flagged for abuse, as well as a monthly summary of all of your domains under management
|
||||
that remain flagged for abuse. Once the registrant has resolved the security issues and
|
||||
followed the steps to have his or her domain reviewed and delisted it will automatically
|
||||
be removed from our reporting.</p>
|
||||
that remain flagged for abuse.</p>
|
||||
|
||||
<p>If you would like to change the email to which these notices are sent please update your
|
||||
abuse contact using your registrar portal account.</p>
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.flows.domain;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.domain.DomainFlowUtils.BadDomainNameCharacterException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.BadDomainNamePartsCountException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.DashesInThirdAndFourthException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.DomainLabelTooLongException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.EmptyDomainNamePartException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.InvalidPunycodeException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.LeadingDashException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.TldDoesNotExistException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.TrailingDashException;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class DomainFlowUtilsTest extends ResourceFlowTestCase<DomainInfoFlow, DomainBase> {
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
setEppInput("domain_info.xml");
|
||||
createTld("tld");
|
||||
persistResource(AppEngineRule.makeRegistrar1().asBuilder().build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainNameAcceptsValidName() throws EppException {
|
||||
assertThat(DomainFlowUtils.validateDomainName("example.tld")).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_IllegalCharacters() {
|
||||
BadDomainNameCharacterException thrown =
|
||||
assertThrows(
|
||||
BadDomainNameCharacterException.class,
|
||||
() -> DomainFlowUtils.validateDomainName("$.foo"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain names can only contain a-z, 0-9, '.' and '-'");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_DomainNameWithEmptyParts() {
|
||||
EmptyDomainNamePartException thrown =
|
||||
assertThrows(
|
||||
EmptyDomainNamePartException.class,
|
||||
() -> DomainFlowUtils.validateDomainName("example."));
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("No part of a domain name can be empty");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_DomainNameWithLessThanTwoParts() {
|
||||
BadDomainNamePartsCountException thrown =
|
||||
assertThrows(
|
||||
BadDomainNamePartsCountException.class,
|
||||
() -> DomainFlowUtils.validateDomainName("example"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain name must have exactly one part above the TLD");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_invalidTLD() {
|
||||
TldDoesNotExistException thrown =
|
||||
assertThrows(
|
||||
TldDoesNotExistException.class,
|
||||
() -> DomainFlowUtils.validateDomainName("example.nosuchtld"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain name is under tld nosuchtld which doesn't exist");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_DomainNameIsTooLong() {
|
||||
DomainLabelTooLongException thrown =
|
||||
assertThrows(
|
||||
DomainLabelTooLongException.class,
|
||||
() ->
|
||||
DomainFlowUtils.validateDomainName(
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.foo"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain labels cannot be longer than 63 characters");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_leadingDash() {
|
||||
LeadingDashException thrown =
|
||||
assertThrows(
|
||||
LeadingDashException.class, () -> DomainFlowUtils.validateDomainName("-example.foo"));
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("Domain labels cannot begin with a dash");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_trailingDash() {
|
||||
TrailingDashException thrown =
|
||||
assertThrows(
|
||||
TrailingDashException.class, () -> DomainFlowUtils.validateDomainName("example-.foo"));
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("Domain labels cannot end with a dash");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_invalidIDN() {
|
||||
InvalidPunycodeException thrown =
|
||||
assertThrows(
|
||||
InvalidPunycodeException.class,
|
||||
() -> DomainFlowUtils.validateDomainName("xn--abcd.foo"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain name starts with xn-- but is not a valid IDN");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateDomainName_containsInvalidDashes() {
|
||||
DashesInThirdAndFourthException thrown =
|
||||
assertThrows(
|
||||
DashesInThirdAndFourthException.class,
|
||||
() -> DomainFlowUtils.validateDomainName("ab--cd.foo"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Non-IDN domain names cannot contain dashes in the third or fourth position");
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import static google.registry.model.domain.token.AllocationToken.TokenStatus.VAL
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
@@ -36,11 +37,17 @@ import google.registry.model.domain.token.AllocationToken.TokenStatus;
|
||||
import google.registry.model.domain.token.AllocationToken.TokenType;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/** Unit tests for {@link AllocationToken}. */
|
||||
public class AllocationTokenTest extends EntityTestCase {
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
createTld("foo");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPersistence() {
|
||||
AllocationToken unlimitedUseToken =
|
||||
@@ -66,7 +73,7 @@ public class AllocationTokenTest extends EntityTestCase {
|
||||
new AllocationToken.Builder()
|
||||
.setToken("abc123")
|
||||
.setRedemptionHistoryEntry(Key.create(HistoryEntry.class, 1L))
|
||||
.setDomainName("foo.example")
|
||||
.setDomainName("example.foo")
|
||||
.setCreationTimeForTest(DateTime.parse("2010-11-12T05:00:00Z"))
|
||||
.setTokenType(SINGLE_USE)
|
||||
.build());
|
||||
@@ -81,7 +88,7 @@ public class AllocationTokenTest extends EntityTestCase {
|
||||
.setToken("abc123")
|
||||
.setTokenType(SINGLE_USE)
|
||||
.setRedemptionHistoryEntry(Key.create(HistoryEntry.class, 1L))
|
||||
.setDomainName("blahdomain.fake")
|
||||
.setDomainName("blahdomain.foo")
|
||||
.setCreationTimeForTest(DateTime.parse("2010-11-12T05:00:00Z"))
|
||||
.build()),
|
||||
"token",
|
||||
@@ -129,13 +136,49 @@ public class AllocationTokenTest extends EntityTestCase {
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("Token type can only be set once");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBuild_DomainNameWithLessThanTwoParts() {
|
||||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() ->
|
||||
new AllocationToken.Builder()
|
||||
.setDomainName("example")
|
||||
.setTokenType(SINGLE_USE)
|
||||
.setToken("barfoo")
|
||||
.build());
|
||||
assertThat(thrown)
|
||||
.hasCauseThat()
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain name must have exactly one part above the TLD");
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("Invalid domain name: example");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBuild_invalidTLD() {
|
||||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() ->
|
||||
new AllocationToken.Builder()
|
||||
.setDomainName("example.nosuchtld")
|
||||
.setTokenType(SINGLE_USE)
|
||||
.setToken("barfoo")
|
||||
.build());
|
||||
assertThat(thrown)
|
||||
.hasCauseThat()
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Domain name is under tld nosuchtld which doesn't exist");
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("Invalid domain name: example.nosuchtld");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBuild_domainNameOnlyOnSingleUse() {
|
||||
AllocationToken.Builder builder =
|
||||
new AllocationToken.Builder()
|
||||
.setToken("foobar")
|
||||
.setTokenType(TokenType.UNLIMITED_USE)
|
||||
.setDomainName("foo.example");
|
||||
.setDomainName("example.foo");
|
||||
IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, builder::build);
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
package google.registry.model.registry;
|
||||
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
@@ -22,8 +23,8 @@ import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import google.registry.schema.domain.RegistryLock;
|
||||
import google.registry.schema.domain.RegistryLock.Action;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.PersistenceException;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -52,15 +53,11 @@ public final class RegistryLockDaoTest {
|
||||
public void testSaveAndLoad_failure_differentCode() {
|
||||
RegistryLock lock = createLock();
|
||||
RegistryLockDao.save(lock);
|
||||
PersistenceException exception =
|
||||
NullPointerException thrown =
|
||||
assertThrows(
|
||||
PersistenceException.class,
|
||||
NullPointerException.class,
|
||||
() -> RegistryLockDao.getByVerificationCode(UUID.randomUUID().toString()));
|
||||
assertThat(exception)
|
||||
.hasCauseThat()
|
||||
.hasMessageThat()
|
||||
.isEqualTo("No registry lock with this code");
|
||||
assertThat(exception).hasCauseThat().isInstanceOf(NullPointerException.class);
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("No registry lock with this code");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -71,10 +68,10 @@ public final class RegistryLockDaoTest {
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> {
|
||||
RegistryLock secondLock =
|
||||
RegistryLock updatedLock =
|
||||
RegistryLockDao.getByVerificationCode(lock.getVerificationCode());
|
||||
secondLock.setCompletionTimestamp(jpaTmRule.getTxnClock().nowUtc());
|
||||
RegistryLockDao.save(secondLock);
|
||||
updatedLock.setCompletionTimestamp(jpaTmRule.getTxnClock().nowUtc());
|
||||
RegistryLockDao.save(updatedLock);
|
||||
});
|
||||
jpaTm()
|
||||
.transact(
|
||||
@@ -86,11 +83,43 @@ public final class RegistryLockDaoTest {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateLock_usingSamePrimaryKey() {
|
||||
RegistryLock lock = RegistryLockDao.save(createLock());
|
||||
jpaTmRule.getTxnClock().advanceOneMilli();
|
||||
RegistryLock updatedLock =
|
||||
lock.asBuilder().setCompletionTimestamp(jpaTmRule.getTxnClock().nowUtc()).build();
|
||||
jpaTm().transact(() -> RegistryLockDao.save(updatedLock));
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> {
|
||||
RegistryLock fromDatabase =
|
||||
RegistryLockDao.getByVerificationCode(lock.getVerificationCode());
|
||||
assertThat(fromDatabase.getCompletionTimestamp())
|
||||
.isEqualTo(Optional.of(jpaTmRule.getTxnClock().nowUtc()));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_saveNull() {
|
||||
assertThrows(NullPointerException.class, () -> RegistryLockDao.save(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoad_byRegistrarId() {
|
||||
RegistryLock lock = createLock();
|
||||
RegistryLock secondLock = createLock().asBuilder().setDomainName("otherexample.test").build();
|
||||
RegistryLockDao.save(lock);
|
||||
RegistryLockDao.save(secondLock);
|
||||
|
||||
assertThat(
|
||||
RegistryLockDao.getByRegistrarId("TheRegistrar").stream()
|
||||
.map(RegistryLock::getDomainName)
|
||||
.collect(toImmutableSet()))
|
||||
.containsExactly("example.test", "otherexample.test");
|
||||
assertThat(RegistryLockDao.getByRegistrarId("nonexistent")).isEmpty();
|
||||
}
|
||||
|
||||
private RegistryLock createLock() {
|
||||
return new RegistryLock.Builder()
|
||||
.setRepoId("repoId")
|
||||
|
||||
@@ -22,7 +22,6 @@ import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import google.registry.schema.tmch.ClaimsList;
|
||||
import google.registry.testing.FakeClock;
|
||||
import javax.persistence.NoResultException;
|
||||
import javax.persistence.PersistenceException;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -71,9 +70,7 @@ public class ClaimsListDaoTest {
|
||||
|
||||
@Test
|
||||
public void getCurrent_throwsNoResultExceptionIfTableIsEmpty() {
|
||||
PersistenceException thrown =
|
||||
assertThrows(PersistenceException.class, () -> ClaimsListDao.getCurrent());
|
||||
assertThat(thrown).hasCauseThat().isInstanceOf(NoResultException.class);
|
||||
assertThrows(NoResultException.class, ClaimsListDao::getCurrent);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,17 +15,31 @@
|
||||
package google.registry.model.transaction;
|
||||
|
||||
import static org.joda.time.DateTimeZone.UTC;
|
||||
import static org.testcontainers.containers.PostgreSQLContainer.POSTGRESQL_PORT;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.io.Resources;
|
||||
import google.registry.persistence.HibernateSchemaExporter;
|
||||
import google.registry.persistence.PersistenceModule;
|
||||
import google.registry.testing.FakeClock;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Driver;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
|
||||
@@ -33,9 +47,6 @@ import org.hibernate.jpa.boot.internal.PersistenceXmlParser;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.rules.ExternalResource;
|
||||
import org.junit.rules.RuleChain;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
import org.testcontainers.containers.JdbcDatabaseContainer;
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
|
||||
@@ -48,38 +59,54 @@ import org.testcontainers.containers.PostgreSQLContainer;
|
||||
* PostgreSQLContainer} to achieve test purpose.
|
||||
*/
|
||||
public class JpaTransactionManagerRule extends ExternalResource {
|
||||
private static final String SCHEMA_GOLDEN_SQL = "sql/schema/nomulus.golden.sql";
|
||||
private static final String GOLDEN_SCHEMA_SQL_PATH = "sql/schema/nomulus.golden.sql";
|
||||
private static final String DB_CLEANUP_SQL_PATH =
|
||||
"google/registry/model/transaction/cleanup_database.sql";
|
||||
private static final String MANAGEMENT_DB_NAME = "management";
|
||||
private static final String POSTGRES_DB_NAME = "postgres";
|
||||
|
||||
private final DateTime now = DateTime.now(UTC);
|
||||
private final FakeClock clock = new FakeClock(now);
|
||||
private final String initScript;
|
||||
private final String initScriptPath;
|
||||
private final ImmutableList<Class> extraEntityClasses;
|
||||
private final ImmutableMap userProperties;
|
||||
|
||||
private JdbcDatabaseContainer database;
|
||||
private static final JdbcDatabaseContainer database = create();
|
||||
private static final HibernateSchemaExporter exporter =
|
||||
HibernateSchemaExporter.create(
|
||||
database.getJdbcUrl(), database.getUsername(), database.getPassword());
|
||||
private EntityManagerFactory emf;
|
||||
private JpaTransactionManager cachedTm;
|
||||
|
||||
private JpaTransactionManagerRule(
|
||||
String initScript,
|
||||
String initScriptPath,
|
||||
ImmutableList<Class> extraEntityClasses,
|
||||
ImmutableMap<String, String> userProperties) {
|
||||
this.initScript = initScript;
|
||||
this.initScriptPath = initScriptPath;
|
||||
this.extraEntityClasses = extraEntityClasses;
|
||||
this.userProperties = userProperties;
|
||||
}
|
||||
|
||||
/** Wraps {@link JpaTransactionManagerRule} in a {@link PostgreSQLContainer}. */
|
||||
@Override
|
||||
public Statement apply(Statement base, Description description) {
|
||||
database = new PostgreSQLContainer().withInitScript(initScript);
|
||||
return RuleChain.outerRule(database)
|
||||
.around(JpaTransactionManagerRule.super::apply)
|
||||
.apply(base, description);
|
||||
private static JdbcDatabaseContainer create() {
|
||||
PostgreSQLContainer container = new PostgreSQLContainer().withDatabaseName(MANAGEMENT_DB_NAME);
|
||||
container.start();
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> container.close()));
|
||||
return container;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before() {
|
||||
public void before() throws Exception {
|
||||
executeSql(MANAGEMENT_DB_NAME, readSqlInClassPath(DB_CLEANUP_SQL_PATH));
|
||||
executeSql(POSTGRES_DB_NAME, readSqlInClassPath(initScriptPath));
|
||||
if (!extraEntityClasses.isEmpty()) {
|
||||
File tempSqlFile = File.createTempFile("tempSqlFile", ".sql");
|
||||
tempSqlFile.deleteOnExit();
|
||||
exporter.export(extraEntityClasses, tempSqlFile);
|
||||
executeSql(
|
||||
POSTGRES_DB_NAME,
|
||||
new String(Files.readAllBytes(tempSqlFile.toPath()), StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
ImmutableMap properties = PersistenceModule.providesDefaultDatabaseConfigs();
|
||||
if (!userProperties.isEmpty()) {
|
||||
// If there are user properties, create a new properties object with these added.
|
||||
@@ -90,7 +117,7 @@ public class JpaTransactionManagerRule extends ExternalResource {
|
||||
|
||||
emf =
|
||||
createEntityManagerFactory(
|
||||
database.getJdbcUrl(),
|
||||
getJdbcUrlFor(POSTGRES_DB_NAME),
|
||||
database.getUsername(),
|
||||
database.getPassword(),
|
||||
properties,
|
||||
@@ -109,6 +136,46 @@ public class JpaTransactionManagerRule extends ExternalResource {
|
||||
cachedTm = null;
|
||||
}
|
||||
|
||||
private static String readSqlInClassPath(String sqlScriptPath) {
|
||||
try {
|
||||
return Resources.toString(Resources.getResource(sqlScriptPath), Charsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void executeSql(String dbName, String sqlScript) {
|
||||
try (Connection conn = createConnection(dbName);
|
||||
Statement statement = conn.createStatement()) {
|
||||
statement.execute(sqlScript);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private String getJdbcUrlFor(String dbName) {
|
||||
// Disable Postgres driver use of java.util.logging to reduce noise at startup time
|
||||
return "jdbc:postgresql://"
|
||||
+ database.getContainerIpAddress()
|
||||
+ ":"
|
||||
+ database.getMappedPort(POSTGRESQL_PORT)
|
||||
+ "/"
|
||||
+ dbName
|
||||
+ "?loggerLevel=OFF";
|
||||
}
|
||||
|
||||
private Connection createConnection(String dbName) {
|
||||
final Properties info = new Properties();
|
||||
info.put("user", database.getUsername());
|
||||
info.put("password", database.getPassword());
|
||||
final Driver jdbcDriverInstance = database.getJdbcDriverInstance();
|
||||
try {
|
||||
return jdbcDriverInstance.connect(getJdbcUrlFor(dbName), info);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/** Constructs the {@link EntityManagerFactory} instance. */
|
||||
private static EntityManagerFactory createEntityManagerFactory(
|
||||
String jdbcUrl,
|
||||
@@ -171,7 +238,7 @@ public class JpaTransactionManagerRule extends ExternalResource {
|
||||
/** Builds a {@link JpaTransactionManagerRule} instance. */
|
||||
public JpaTransactionManagerRule build() {
|
||||
if (initScript == null) {
|
||||
initScript = SCHEMA_GOLDEN_SQL;
|
||||
initScript = GOLDEN_SCHEMA_SQL_PATH;
|
||||
}
|
||||
return new JpaTransactionManagerRule(
|
||||
initScript,
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.List;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.PersistenceException;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -37,7 +36,6 @@ public class JpaTransactionManagerRuleTest {
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder()
|
||||
.withEntityClass(TestEntity.class)
|
||||
.withProperty(Environment.HBM2DDL_AUTO, "update")
|
||||
.build();
|
||||
|
||||
@Test
|
||||
|
||||
@@ -24,12 +24,12 @@ import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Unit tests for {@link BloomFilterConverter}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class BloomFilterConverterTest {
|
||||
|
||||
@@ -37,7 +37,6 @@ public class BloomFilterConverterTest {
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder()
|
||||
.withEntityClass(TestEntity.class)
|
||||
.withProperty(Environment.HBM2DDL_AUTO, "update")
|
||||
.build();
|
||||
|
||||
@Test
|
||||
@@ -60,7 +59,7 @@ public class BloomFilterConverterTest {
|
||||
|
||||
public TestEntity() {}
|
||||
|
||||
public TestEntity(BloomFilter<String> bloomFilter) {
|
||||
TestEntity(BloomFilter<String> bloomFilter) {
|
||||
this.bloomFilter = bloomFilter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@ import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Unit tests for {@link CreateAutoTimestampConverter}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class CreateAutoTimestampConverterTest {
|
||||
|
||||
@@ -35,7 +35,6 @@ public class CreateAutoTimestampConverterTest {
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder()
|
||||
.withEntityClass(TestEntity.class)
|
||||
.withProperty(Environment.HBM2DDL_AUTO, "update")
|
||||
.build();
|
||||
|
||||
@Test
|
||||
@@ -70,7 +69,7 @@ public class CreateAutoTimestampConverterTest {
|
||||
|
||||
public TestEntity() {}
|
||||
|
||||
public TestEntity(String name, CreateAutoTimestamp cat) {
|
||||
TestEntity(String name, CreateAutoTimestamp cat) {
|
||||
this.name = name;
|
||||
this.cat = cat;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
package google.registry.persistence;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.PersistenceException;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Unit tests for {@link CurrencyUnitConverter}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class CurrencyUnitConverterTest {
|
||||
|
||||
@Rule
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder()
|
||||
.withEntityClass(TestEntity.class)
|
||||
.build();
|
||||
|
||||
@Test
|
||||
public void roundTripConversion() {
|
||||
TestEntity entity = new TestEntity(CurrencyUnit.EUR);
|
||||
jpaTm().transact(() -> jpaTm().getEntityManager().persist(entity));
|
||||
assertThat(
|
||||
jpaTm()
|
||||
.transact(
|
||||
() ->
|
||||
jpaTm()
|
||||
.getEntityManager()
|
||||
.createNativeQuery(
|
||||
"SELECT currency FROM \"TestEntity\" WHERE name = 'id'")
|
||||
.getResultList()))
|
||||
.containsExactly("EUR");
|
||||
TestEntity persisted =
|
||||
jpaTm().transact(() -> jpaTm().getEntityManager().find(TestEntity.class, "id"));
|
||||
assertThat(persisted.currency).isEqualTo(CurrencyUnit.EUR);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void invalidCurrency() {
|
||||
jpaTm()
|
||||
.transact(
|
||||
() ->
|
||||
jpaTm()
|
||||
.getEntityManager()
|
||||
.createNativeQuery(
|
||||
"INSERT INTO \"TestEntity\" (name, currency) VALUES('id', 'XXXX')")
|
||||
.executeUpdate());
|
||||
PersistenceException thrown =
|
||||
assertThrows(
|
||||
PersistenceException.class,
|
||||
() ->
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> jpaTm().getEntityManager().find(TestEntity.class, "id").currency));
|
||||
assertThat(thrown).hasCauseThat().hasMessageThat().isEqualTo("Unknown currency 'XXXX'");
|
||||
}
|
||||
|
||||
@Entity(name = "TestEntity") // Override entity name to avoid the nested class reference.
|
||||
public static class TestEntity extends ImmutableObject {
|
||||
|
||||
@Id String name = "id";
|
||||
|
||||
CurrencyUnit currency;
|
||||
|
||||
public TestEntity() {}
|
||||
|
||||
TestEntity(CurrencyUnit currency) {
|
||||
this.currency = currency;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.persistence;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
|
||||
/** Unit tests for {@link HibernateSchemaExporter}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class HibernateSchemaExporterTest {
|
||||
@ClassRule public static final PostgreSQLContainer database = new PostgreSQLContainer();
|
||||
private static HibernateSchemaExporter exporter;
|
||||
|
||||
@Rule public final TemporaryFolder tempFolder = new TemporaryFolder();
|
||||
|
||||
@BeforeClass
|
||||
public static void init() {
|
||||
exporter =
|
||||
HibernateSchemaExporter.create(
|
||||
database.getJdbcUrl(), database.getUsername(), database.getPassword());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void export_succeeds() throws IOException {
|
||||
File sqlFile = tempFolder.newFile();
|
||||
exporter.export(ImmutableList.of(TestEntity.class), sqlFile);
|
||||
assertThat(Files.readAllBytes(sqlFile.toPath()))
|
||||
.isEqualTo(
|
||||
("\n"
|
||||
+ " create table \"TestEntity\" (\n"
|
||||
+ " name text not null,\n"
|
||||
+ " cu text,\n"
|
||||
+ " primary key (name)\n"
|
||||
+ " );\n")
|
||||
.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
@Entity(name = "TestEntity") // Override entity name to avoid the nested class reference.
|
||||
private static class TestEntity {
|
||||
@Id String name;
|
||||
|
||||
CurrencyUnit cu;
|
||||
}
|
||||
}
|
||||
@@ -21,12 +21,12 @@ import google.registry.model.UpdateAutoTimestamp;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Unit tests for {@link UpdateAutoTimestampConverter}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class UpdateAutoTimestampConverterTest {
|
||||
|
||||
@@ -34,7 +34,6 @@ public class UpdateAutoTimestampConverterTest {
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder()
|
||||
.withEntityClass(TestEntity.class)
|
||||
.withProperty(Environment.HBM2DDL_AUTO, "update")
|
||||
.build();
|
||||
|
||||
@Test
|
||||
@@ -81,7 +80,7 @@ public class UpdateAutoTimestampConverterTest {
|
||||
|
||||
public TestEntity() {}
|
||||
|
||||
public TestEntity(String name, UpdateAutoTimestamp uat) {
|
||||
TestEntity(String name, UpdateAutoTimestamp uat) {
|
||||
this.name = name;
|
||||
this.uat = uat;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -38,7 +37,6 @@ public class ZonedDateTimeConverterTest {
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder()
|
||||
.withEntityClass(TestEntity.class)
|
||||
.withProperty(Environment.HBM2DDL_AUTO, "update")
|
||||
.build();
|
||||
|
||||
private final ZonedDateTimeConverter converter = new ZonedDateTimeConverter();
|
||||
@@ -113,7 +111,7 @@ public class ZonedDateTimeConverterTest {
|
||||
|
||||
public TestEntity() {}
|
||||
|
||||
public TestEntity(String name, ZonedDateTime zdt) {
|
||||
TestEntity(String name, ZonedDateTime zdt) {
|
||||
this.name = name;
|
||||
this.zdt = zdt;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,45 @@ public class IcannReportingUploadActionTest {
|
||||
new InternetAddress("recipient@example.com"),
|
||||
new InternetAddress("sender@example.com")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_quicklySkipsOverNonRetryableUploadException() throws Exception {
|
||||
runTest_nonRetryableException(
|
||||
new IOException(
|
||||
"<msg>A report for that month already exists, the cut-off date already"
|
||||
+ " passed.</msg>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_quicklySkipsOverIpWhitelistException() throws Exception {
|
||||
runTest_nonRetryableException(
|
||||
new IOException("Your IP address 25.147.130.158 is not allowed to connect"));
|
||||
}
|
||||
|
||||
private void runTest_nonRetryableException(Exception nonRetryableException) throws Exception {
|
||||
IcannReportingUploadAction action = createAction();
|
||||
when(mockReporter.send(PAYLOAD_FAIL, "a-activity-201706.csv"))
|
||||
.thenThrow(nonRetryableException)
|
||||
.thenThrow(
|
||||
new AssertionError(
|
||||
"This should never be thrown because the previous exception isn't retryable"));
|
||||
action.run();
|
||||
verify(mockReporter, times(1)).send(PAYLOAD_FAIL, "a-activity-201706.csv");
|
||||
verify(mockReporter).send(PAYLOAD_SUCCESS, "test-transactions-201706.csv");
|
||||
verifyNoMoreInteractions(mockReporter);
|
||||
assertThat(((FakeResponse) action.response).getPayload())
|
||||
.isEqualTo("OK, attempted uploading 2 reports");
|
||||
verify(emailService)
|
||||
.sendEmail(
|
||||
EmailMessage.create(
|
||||
"ICANN Monthly report upload summary: 1/2 succeeded",
|
||||
"Report Filename - Upload status:\n"
|
||||
+ "test-transactions-201706.csv - SUCCESS\n"
|
||||
+ "a-activity-201706.csv - FAILURE",
|
||||
new InternetAddress("recipient@example.com"),
|
||||
new InternetAddress("sender@example.com")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFail_FileNotFound() throws Exception {
|
||||
IcannReportingUploadAction action = createAction();
|
||||
|
||||
@@ -61,63 +61,40 @@ public class Spec11EmailUtilsTest {
|
||||
|
||||
private static final ImmutableList<String> FAKE_RESOURCES = ImmutableList.of("foo");
|
||||
private static final String DAILY_EMAIL_FORMAT =
|
||||
"Dear registrar partner,"
|
||||
+ ""
|
||||
+ "<p>Super Cool Registry conducts a daily analysis of all domains registered in its "
|
||||
+ "TLDs to identify potential security concerns. On 2018-07-15, the following domains "
|
||||
+ "that your registrar manages were flagged for potential security concerns:</p>"
|
||||
+ ""
|
||||
+ "<table>"
|
||||
+ "<tr><th>Domain Name</th><th>Threat Type</th></tr>"
|
||||
+ "%s"
|
||||
+ "</table>"
|
||||
+ "<p><b>Please communicate these findings to the registrant and work with the "
|
||||
+ "registrant to mitigate any security issues and have the domains delisted.</b></p>"
|
||||
+ ""
|
||||
"Dear registrar partner,<p>Super Cool Registry conducts a daily analysis of all domains"
|
||||
+ " registered in its TLDs to identify potential security concerns. On 2018-07-15, the"
|
||||
+ " following domains that your registrar manages were flagged for potential security"
|
||||
+ " concerns:</p><table><tr><th>Domain Name</th><th>Threat Type</th></tr>%s"
|
||||
+ "</table><p><b>Please communicate these findings to the registrant and work with the"
|
||||
+ " registrant to mitigate any security issues and have the domains delisted.</b></p>"
|
||||
+ "Some helpful resources for getting off a blocked list include:"
|
||||
+ "<ul><li>foo</li></ul><p>"
|
||||
+ ""
|
||||
+ "You will continue to receive daily notices when new domains managed by your registrar "
|
||||
+ "are flagged for abuse, as well as a monthly summary of all of your domains under "
|
||||
+ "management that remain flagged for abuse. Once the registrant has resolved the "
|
||||
+ "security issues and followed the steps to have his or her domain reviewed and "
|
||||
+ "delisted it will automatically be removed from our reporting.</p>"
|
||||
+ ""
|
||||
+ "<p>If you would like to change the email to which these notices are sent please "
|
||||
+ "update your abuse contact using your registrar portal account.</p>"
|
||||
+ ""
|
||||
+ "<p>If you have any questions regarding this notice, please contact "
|
||||
+ "abuse@test.com.</p>";
|
||||
+ "<ul><li>foo</li></ul><p>If you believe that any of the domains were reported in"
|
||||
+ " error, or are still receiving reports for issues that have been remediated, please"
|
||||
+ " <a href=\"https://safebrowsing.google.com/safebrowsing/report_error/?hl=en\">submit"
|
||||
+ " a request</a> to have the site reviewed.</p><p>You will continue to receive daily"
|
||||
+ " notices when new domains managed by your registrar are flagged for abuse, as well as"
|
||||
+ " a monthly summary of all of your domains under management that remain flagged for"
|
||||
+ " abuse.</p><p>If you would like to change the email to which these notices are sent"
|
||||
+ " please update your abuse contact using your registrar portal account.</p><p>If you"
|
||||
+ " have any questions regarding this notice, please contact abuse@test.com.</p>";
|
||||
private static final String MONTHLY_EMAIL_FORMAT =
|
||||
"Dear registrar partner,"
|
||||
+ ""
|
||||
+ "<p>Super Cool Registry previously notified you when the following "
|
||||
+ "domains managed by your registrar were flagged for potential security concerns.</p>"
|
||||
+ "<p>The following domains that you manage continue to be flagged by our analysis "
|
||||
+ "for potential security concerns. This may be because the registrants have not "
|
||||
+ "completed the requisite steps to mitigate the potential security abuse and/or have "
|
||||
+ "it reviewed and delisted.</p>"
|
||||
+ ""
|
||||
+ "<table>"
|
||||
+ "<tr><th>Domain Name</th><th>Threat Type</th></tr>"
|
||||
+ "%s"
|
||||
+ "</table>"
|
||||
+ ""
|
||||
+ "<p>Please work with the registrant to mitigate any security issues "
|
||||
+ "and have the domains delisted.</p>"
|
||||
+ ""
|
||||
+ "Some helpful resources for getting off a blocked list include:"
|
||||
+ "<ul><li>foo</li></ul><p>"
|
||||
+ ""
|
||||
+ "You will continue to receive a monthly summary of all domains managed by your "
|
||||
+ "registrar that remain on our lists of potential security threats. You will "
|
||||
+ "additionally receive a daily notice when any new domains that are added to these "
|
||||
+ "lists. Once the registrant has resolved the security issues and followed the steps to "
|
||||
+ "have his or her domain reviewed and delisted it will automatically be removed from "
|
||||
+ "our monthly reporting.</p>"
|
||||
+ ""
|
||||
+ "<p>If you have any questions regarding this notice, please contact "
|
||||
+ "abuse@test.com.</p>";
|
||||
"Dear registrar partner,<p>Super Cool Registry previously notified you when the following"
|
||||
+ " domains managed by your registrar were flagged for potential security"
|
||||
+ " concerns.</p><p>The following domains that you manage continue to be flagged by our"
|
||||
+ " analysis for potential security concerns. This may be because the registrants have"
|
||||
+ " not completed the requisite steps to mitigate the potential security abuse and/or"
|
||||
+ " have it reviewed and delisted.</p><table><tr><th>Domain Name</th><th>Threat"
|
||||
+ " Type</th></tr>%s</table><p>Please work with the registrant to mitigate any security"
|
||||
+ " issues and have the domains delisted. If you believe that any of the domains were"
|
||||
+ " reported in error, or are still receiving reports for issues that have been"
|
||||
+ " remediated, please <a"
|
||||
+ " href=\"https://safebrowsing.google.com/safebrowsing/report_error/?hl=en\">submit a"
|
||||
+ " request</a> to have the site reviewed.</p>Some helpful resources for getting off a"
|
||||
+ " blocked list include:<ul><li>foo</li></ul><p>You will continue to receive a monthly"
|
||||
+ " summary of all domains managed by your registrar that remain on our lists of"
|
||||
+ " potential security threats. You will also receive a daily notice when any new"
|
||||
+ " domains are added to these lists.</p><p>If you have any questions regarding this"
|
||||
+ " notice, please contact abuse@test.com.</p>";
|
||||
|
||||
@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build();
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
// Copyright 2018 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.schema.integration;
|
||||
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.collect.Sets.SetView;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import io.github.classgraph.ClassGraph;
|
||||
import io.github.classgraph.ScanResult;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.runners.Suite.SuiteClasses;
|
||||
|
||||
/**
|
||||
* Verifies that all tests that depends on the Cloud SQL schema are included in the project's
|
||||
* sqlIntegrationTest suite. Names of the test classes is set to the 'test.sqlIntergrationTests'
|
||||
* system property as a comma-separated string.
|
||||
*
|
||||
* <p>A test is deemed dependent on the SQL schema iff it has a field with type {@link
|
||||
* JpaTransactionManagerRule}.
|
||||
*/
|
||||
// TODO(weiminyu): consider generating a TestSuite class instead.
|
||||
@RunWith(JUnit4.class)
|
||||
public class SqlIntegrationMembershipTest {
|
||||
|
||||
@Test
|
||||
public void sqlIntegrationMembershipComplete() {
|
||||
ImmutableSet<String> sqlDependentTests;
|
||||
try (ScanResult scanResult =
|
||||
new ClassGraph().enableAnnotationInfo().whitelistPackages("google.registry").scan()) {
|
||||
sqlDependentTests =
|
||||
scanResult.getClassesWithAnnotation(RunWith.class.getName()).stream()
|
||||
.filter(clazz -> clazz.getSimpleName().endsWith("Test"))
|
||||
.map(clazz -> clazz.loadClass())
|
||||
.filter(SqlIntegrationMembershipTest::isSqlDependent)
|
||||
.map(Class::getName)
|
||||
.collect(ImmutableSet.toImmutableSet());
|
||||
}
|
||||
ImmutableSet<String> declaredTests =
|
||||
Stream.of(SqlIntegrationTestSuite.class.getAnnotation(SuiteClasses.class).value())
|
||||
.map(Class::getName)
|
||||
.collect(ImmutableSet.toImmutableSet());
|
||||
SetView<String> undeclaredTests = Sets.difference(sqlDependentTests, declaredTests);
|
||||
assertWithMessage(
|
||||
"Undeclared sql-dependent tests found. "
|
||||
+ "Please add them to SqlIntegrationTestSuite.java.")
|
||||
.that(undeclaredTests)
|
||||
.isEmpty();
|
||||
SetView<String> unnecessaryDeclarations = Sets.difference(declaredTests, sqlDependentTests);
|
||||
assertWithMessage("Found tests that should not be included in SqlIntegrationTestSuite.java.")
|
||||
.that(unnecessaryDeclarations)
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
private static boolean isSqlDependent(Class<?> testClass) {
|
||||
return Stream.of(testClass.getDeclaredFields())
|
||||
.map(Field::getType)
|
||||
.anyMatch(JpaTransactionManagerRule.class::equals);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright 2018 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.schema.integration;
|
||||
|
||||
import google.registry.model.registry.RegistryLockDaoTest;
|
||||
import google.registry.model.tmch.ClaimsListDaoTest;
|
||||
import google.registry.model.transaction.JpaTransactionManagerImplTest;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRuleTest;
|
||||
import google.registry.persistence.BloomFilterConverterTest;
|
||||
import google.registry.persistence.CreateAutoTimestampConverterTest;
|
||||
import google.registry.persistence.CurrencyUnitConverterTest;
|
||||
import google.registry.persistence.UpdateAutoTimestampConverterTest;
|
||||
import google.registry.persistence.ZonedDateTimeConverterTest;
|
||||
import google.registry.schema.tld.PremiumListDaoTest;
|
||||
import google.registry.ui.server.registrar.RegistryLockGetActionTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Suite;
|
||||
import org.junit.runners.Suite.SuiteClasses;
|
||||
|
||||
/**
|
||||
* Groups all tests that may depends on Cloud SQL schema. They will be run for server-schema
|
||||
* compatibility check.
|
||||
*
|
||||
* <p>Schema dependency is approximated by the use of {@link
|
||||
* google.registry.model.transaction.JpaTransactionManagerRule}.
|
||||
*
|
||||
* @see SqlIntegrationMembershipTest
|
||||
*/
|
||||
// TODO(weiminyu): refactor JpaTransactionManagerRule to eliminate false positives.
|
||||
@RunWith(Suite.class)
|
||||
@SuiteClasses({
|
||||
BloomFilterConverterTest.class,
|
||||
ClaimsListDaoTest.class,
|
||||
CreateAutoTimestampConverterTest.class,
|
||||
CurrencyUnitConverterTest.class,
|
||||
JpaTransactionManagerImplTest.class,
|
||||
JpaTransactionManagerRuleTest.class,
|
||||
PremiumListDaoTest.class,
|
||||
RegistryLockDaoTest.class,
|
||||
RegistryLockGetActionTest.class,
|
||||
UpdateAutoTimestampConverterTest.class,
|
||||
ZonedDateTimeConverterTest.class
|
||||
})
|
||||
public class SqlIntegrationTestSuite {}
|
||||
@@ -21,7 +21,6 @@ import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import java.math.BigDecimal;
|
||||
import javax.persistence.PersistenceException;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -68,16 +67,13 @@ public class PremiumListDaoTest {
|
||||
@Test
|
||||
public void saveNew_throwsWhenPremiumListAlreadyExists() {
|
||||
PremiumListDao.saveNew(PremiumList.create("testlist", CurrencyUnit.USD, TEST_PRICES));
|
||||
PersistenceException thrown =
|
||||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
PersistenceException.class,
|
||||
IllegalArgumentException.class,
|
||||
() ->
|
||||
PremiumListDao.saveNew(
|
||||
PremiumList.create("testlist", CurrencyUnit.USD, TEST_PRICES)));
|
||||
assertThat(thrown)
|
||||
.hasCauseThat()
|
||||
.hasMessageThat()
|
||||
.contains("A premium list of this name already exists");
|
||||
assertThat(thrown).hasMessageThat().contains("A premium list of this name already exists");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -82,7 +82,8 @@ public final class RegistryTestServer {
|
||||
route("/registrar-create", FrontendServlet.class),
|
||||
route("/registrar-ote-setup", FrontendServlet.class),
|
||||
route("/registrar-ote-status", FrontendServlet.class),
|
||||
route("/registrar-settings", FrontendServlet.class));
|
||||
route("/registrar-settings", FrontendServlet.class),
|
||||
route("/registry-lock-get", FrontendServlet.class));
|
||||
|
||||
private static final ImmutableList<Class<? extends Filter>> FILTERS = ImmutableList.of(
|
||||
ObjectifyFilter.class,
|
||||
|
||||
@@ -193,6 +193,7 @@ public final class AppEngineRule extends ExternalResource {
|
||||
.setPassword("foo-BAR2")
|
||||
.setPhoneNumber("+1.3334445555")
|
||||
.setPhonePasscode("12345")
|
||||
.setRegistryLockAllowed(false)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -206,6 +207,7 @@ public final class AppEngineRule extends ExternalResource {
|
||||
.setPassword("password2")
|
||||
.setPhoneNumber("+1.2223334444")
|
||||
.setPhonePasscode("22222")
|
||||
.setRegistryLockAllowed(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -241,6 +243,19 @@ public final class AppEngineRule extends ExternalResource {
|
||||
.build();
|
||||
}
|
||||
|
||||
public static RegistrarContact makeRegistrarContact3() {
|
||||
return new RegistrarContact.Builder()
|
||||
.setParent(makeRegistrar2())
|
||||
.setName("Marla Singer")
|
||||
.setEmailAddress("Marla.Singer@crr.com")
|
||||
.setPhoneNumber("+1.2128675309")
|
||||
.setTypes(ImmutableSet.of(RegistrarContact.Type.TECH))
|
||||
.setGaeUserId(THE_REGISTRAR_GAE_USER_ID)
|
||||
.setAllowedToSetRegistryLockPassword(true)
|
||||
.setRegistryLockPassword("hi")
|
||||
.build();
|
||||
}
|
||||
|
||||
/** Hack to make sure AppEngineRule is always wrapped in a TemporaryFolder rule. */
|
||||
@Override
|
||||
public Statement apply(Statement base, Description description) {
|
||||
@@ -412,6 +427,10 @@ public final class AppEngineRule extends ExternalResource {
|
||||
public static void loadInitialData() {
|
||||
persistSimpleResources(
|
||||
ImmutableList.of(
|
||||
makeRegistrar1(), makeRegistrarContact1(), makeRegistrar2(), makeRegistrarContact2()));
|
||||
makeRegistrar1(),
|
||||
makeRegistrarContact1(),
|
||||
makeRegistrar2(),
|
||||
makeRegistrarContact2(),
|
||||
makeRegistrarContact3()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package google.registry.tools;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
|
||||
@@ -42,6 +43,7 @@ public class DeleteAllocationTokensCommandTest
|
||||
|
||||
@Before
|
||||
public void init() {
|
||||
createTlds("foo", "bar");
|
||||
preRed1 = persistToken("prefix12345AA", null, true);
|
||||
preRed2 = persistToken("prefixgh8907a", null, true);
|
||||
preNot1 = persistToken("prefix2978204", null, false);
|
||||
|
||||
@@ -18,6 +18,7 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
@@ -134,6 +135,7 @@ public class GenerateAllocationTokensCommandTest
|
||||
|
||||
@Test
|
||||
public void testSuccess_domainNames() throws Exception {
|
||||
createTld("tld");
|
||||
File domainNamesFile = tmpDir.newFile("domain_names.txt");
|
||||
Files.asCharSink(domainNamesFile, UTF_8).write("foo1.tld\nboo2.tld\nbaz9.tld\n");
|
||||
runCommand("--domain_names_file", domainNamesFile.getPath());
|
||||
|
||||
@@ -17,6 +17,7 @@ package google.registry.tools;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.testing.DatastoreHelper.createHistoryEntryForEppResource;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistSimpleResources;
|
||||
@@ -35,6 +36,7 @@ public class GetAllocationTokenCommandTest extends CommandTestCase<GetAllocation
|
||||
|
||||
@Test
|
||||
public void testSuccess_oneToken() throws Exception {
|
||||
createTlds("bar");
|
||||
AllocationToken token =
|
||||
persistResource(
|
||||
new AllocationToken.Builder()
|
||||
@@ -48,6 +50,7 @@ public class GetAllocationTokenCommandTest extends CommandTestCase<GetAllocation
|
||||
|
||||
@Test
|
||||
public void testSuccess_multipleTokens() throws Exception {
|
||||
createTlds("baz");
|
||||
ImmutableList<AllocationToken> tokens =
|
||||
persistSimpleResources(
|
||||
ImmutableList.of(
|
||||
@@ -90,6 +93,7 @@ public class GetAllocationTokenCommandTest extends CommandTestCase<GetAllocation
|
||||
|
||||
@Test
|
||||
public void testSuccess_oneTokenDoesNotExist() throws Exception {
|
||||
createTlds("bar");
|
||||
AllocationToken token =
|
||||
persistResource(
|
||||
new AllocationToken.Builder()
|
||||
|
||||
@@ -21,6 +21,7 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.loadRegistrar;
|
||||
|
||||
import com.google.common.collect.ImmutableSortedSet;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.ofy.CommitLogManifest;
|
||||
import google.registry.model.ofy.CommitLogMutation;
|
||||
@@ -62,13 +63,16 @@ public class ResaveEnvironmentEntitiesCommandTest
|
||||
transform(
|
||||
ofy().load().type(CommitLogMutation.class).list(),
|
||||
mutation -> ofy().load().fromEntity(mutation.getEntity()));
|
||||
ImmutableSortedSet<RegistrarContact> theRegistrarContacts =
|
||||
loadRegistrar("TheRegistrar").getContacts();
|
||||
assertThat(savedEntities)
|
||||
.containsExactly(
|
||||
// The Registrars and RegistrarContacts are created by AppEngineRule.
|
||||
loadRegistrar("TheRegistrar"),
|
||||
loadRegistrar("NewRegistrar"),
|
||||
Registry.get("tld"),
|
||||
getOnlyElement(loadRegistrar("TheRegistrar").getContacts()),
|
||||
theRegistrarContacts.first(),
|
||||
theRegistrarContacts.last(),
|
||||
getOnlyElement(loadRegistrar("NewRegistrar").getContacts()));
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +188,33 @@ public class ContactSettingsTest extends RegistrarSettingsActionTestCase {
|
||||
|
||||
@Test
|
||||
public void testSuccess_setRegistryLockPassword() {
|
||||
addPasswordToTechContact();
|
||||
techContact = Iterables.getOnlyElement(loadRegistrar(CLIENT_ID).getContactsOfType(Type.TECH));
|
||||
assertThat(techContact.verifyRegistryLockPassword("hi")).isTrue();
|
||||
assertMetric(CLIENT_ID, "update", "[OWNER]", "SUCCESS");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_setRegistryLockPassword_notOverriddenLater() {
|
||||
addPasswordToTechContact();
|
||||
techContact = Iterables.getOnlyElement(loadRegistrar(CLIENT_ID).getContactsOfType(Type.TECH));
|
||||
assertThat(techContact.verifyRegistryLockPassword("hi")).isTrue();
|
||||
|
||||
techContact = Iterables.getOnlyElement(loadRegistrar(CLIENT_ID).getContactsOfType(Type.TECH));
|
||||
Map<String, Object> techContactMap = techContact.toJsonMap();
|
||||
techContactMap.put("name", "Some Other Name");
|
||||
Map<String, Object> reqJson = loadRegistrar(CLIENT_ID).toJsonMap();
|
||||
reqJson.put(
|
||||
"contacts",
|
||||
ImmutableList.of(AppEngineRule.makeRegistrarContact2().toJsonMap(), techContactMap));
|
||||
Map<String, Object> response =
|
||||
action.handleJsonRequest(ImmutableMap.of("op", "update", "id", CLIENT_ID, "args", reqJson));
|
||||
assertThat(response).containsAtLeastEntriesIn(ImmutableMap.of("status", "SUCCESS"));
|
||||
techContact = Iterables.getOnlyElement(loadRegistrar(CLIENT_ID).getContactsOfType(Type.TECH));
|
||||
assertThat(techContact.verifyRegistryLockPassword("hi")).isTrue();
|
||||
}
|
||||
|
||||
private void addPasswordToTechContact() {
|
||||
techContact =
|
||||
persistResource(techContact.asBuilder().setAllowedToSetRegistryLockPassword(true).build());
|
||||
Map<String, Object> contactMap = techContact.toJsonMap();
|
||||
@@ -199,9 +226,6 @@ public class ContactSettingsTest extends RegistrarSettingsActionTestCase {
|
||||
Map<String, Object> response =
|
||||
action.handleJsonRequest(ImmutableMap.of("op", "update", "id", CLIENT_ID, "args", reqJson));
|
||||
assertThat(response).containsAtLeastEntriesIn(ImmutableMap.of("status", "SUCCESS"));
|
||||
techContact = Iterables.getOnlyElement(loadRegistrar(CLIENT_ID).getContactsOfType(Type.TECH));
|
||||
assertThat(techContact.verifyRegistryLockPassword("hi")).isTrue();
|
||||
assertMetric(CLIENT_ID, "update", "[OWNER]", "SUCCESS");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -275,7 +299,7 @@ public class ContactSettingsTest extends RegistrarSettingsActionTestCase {
|
||||
"results",
|
||||
ImmutableList.of(),
|
||||
"message",
|
||||
"Registrar contact not allowed to set registry lock password");
|
||||
"Cannot set isAllowedToSetRegistryLockPassword through UI");
|
||||
assertMetric(CLIENT_ID, "update", "[OWNER]", "ERROR: FormException");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.ui.server.registrar;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.request.auth.AuthenticatedRegistrarAccessor.Role.OWNER;
|
||||
import static google.registry.testing.AppEngineRule.makeRegistrar2;
|
||||
import static google.registry.testing.AppEngineRule.makeRegistrarContact3;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
|
||||
|
||||
import com.google.api.client.http.HttpStatusCodes;
|
||||
import com.google.appengine.api.users.User;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSetMultimap;
|
||||
import com.google.gson.Gson;
|
||||
import google.registry.model.registry.RegistryLockDao;
|
||||
import google.registry.model.transaction.JpaTransactionManagerRule;
|
||||
import google.registry.request.Action.Method;
|
||||
import google.registry.request.auth.AuthLevel;
|
||||
import google.registry.request.auth.AuthResult;
|
||||
import google.registry.request.auth.AuthenticatedRegistrarAccessor;
|
||||
import google.registry.request.auth.UserAuthInfo;
|
||||
import google.registry.schema.domain.RegistryLock;
|
||||
import google.registry.schema.domain.RegistryLock.Action;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
|
||||
/** Unit tests for {@link RegistryLockGetAction}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class RegistryLockGetActionTest {
|
||||
|
||||
private static final Gson GSON = new Gson();
|
||||
|
||||
@Rule public final AppEngineRule appEngineRule = AppEngineRule.builder().withDatastore().build();
|
||||
|
||||
@Rule
|
||||
public final JpaTransactionManagerRule jpaTmRule =
|
||||
new JpaTransactionManagerRule.Builder().build();
|
||||
|
||||
@Rule public final MockitoRule mocks = MockitoJUnit.rule();
|
||||
|
||||
private final FakeResponse response = new FakeResponse();
|
||||
private final User user = new User("Marla.Singer@crr.com", "gmail.com", "12345");
|
||||
|
||||
private AuthResult authResult;
|
||||
private AuthenticatedRegistrarAccessor accessor;
|
||||
private RegistryLockGetAction action;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
jpaTmRule.getTxnClock().setTo(DateTime.parse("2000-06-08T22:00:00.0Z"));
|
||||
authResult = AuthResult.create(AuthLevel.USER, UserAuthInfo.create(user, false));
|
||||
accessor =
|
||||
AuthenticatedRegistrarAccessor.createForTesting(
|
||||
ImmutableSetMultimap.of(
|
||||
"TheRegistrar", OWNER,
|
||||
"NewRegistrar", OWNER));
|
||||
action =
|
||||
new RegistryLockGetAction(
|
||||
Method.GET, response, accessor, authResult, Optional.of("TheRegistrar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_retrievesLocks() {
|
||||
RegistryLock regularLock =
|
||||
new RegistryLock.Builder()
|
||||
.setRepoId("repoId")
|
||||
.setDomainName("example.test")
|
||||
.setRegistrarId("TheRegistrar")
|
||||
.setAction(Action.LOCK)
|
||||
.setVerificationCode(UUID.randomUUID().toString())
|
||||
.setRegistrarPocId("johndoe@theregistrar.com")
|
||||
.setCompletionTimestamp(jpaTmRule.getTxnClock().nowUtc())
|
||||
.build();
|
||||
jpaTmRule.getTxnClock().advanceOneMilli();
|
||||
RegistryLock adminLock =
|
||||
new RegistryLock.Builder()
|
||||
.setRepoId("repoId")
|
||||
.setDomainName("adminexample.test")
|
||||
.setRegistrarId("TheRegistrar")
|
||||
.setAction(Action.LOCK)
|
||||
.setVerificationCode(UUID.randomUUID().toString())
|
||||
.isSuperuser(true)
|
||||
.setCompletionTimestamp(jpaTmRule.getTxnClock().nowUtc())
|
||||
.build();
|
||||
RegistryLock incompleteLock =
|
||||
new RegistryLock.Builder()
|
||||
.setRepoId("repoId")
|
||||
.setDomainName("incomplete.test")
|
||||
.setRegistrarId("TheRegistrar")
|
||||
.setAction(Action.LOCK)
|
||||
.setVerificationCode(UUID.randomUUID().toString())
|
||||
.setRegistrarPocId("johndoe@theregistrar.com")
|
||||
.build();
|
||||
|
||||
RegistryLockDao.save(regularLock);
|
||||
RegistryLockDao.save(adminLock);
|
||||
RegistryLockDao.save(incompleteLock);
|
||||
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(HttpStatusCodes.STATUS_CODE_OK);
|
||||
assertThat(GSON.fromJson(response.getPayload(), Map.class))
|
||||
.containsExactly(
|
||||
"status", "SUCCESS",
|
||||
"message", "Successful locks retrieval",
|
||||
"results",
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of(
|
||||
"lockEnabledForContact", true,
|
||||
"email", "Marla.Singer@crr.com",
|
||||
"clientId", "TheRegistrar",
|
||||
"locks",
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of(
|
||||
"fullyQualifiedDomainName", "example.test",
|
||||
"lockedTime", "2000-06-08T22:00:00.000Z",
|
||||
"lockedBy", "johndoe@theregistrar.com"),
|
||||
ImmutableMap.of(
|
||||
"fullyQualifiedDomainName", "adminexample.test",
|
||||
"lockedTime", "2000-06-08T22:00:00.001Z",
|
||||
"lockedBy", "admin")))));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidMethod() {
|
||||
action.method = Method.POST;
|
||||
assertThat(assertThrows(IllegalArgumentException.class, action::run))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Only GET requests allowed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noAuthInfo() {
|
||||
action.authResult = AuthResult.NOT_AUTHENTICATED;
|
||||
assertThat(assertThrows(IllegalArgumentException.class, action::run))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("User auth info must be present");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noClientId() {
|
||||
action.paramClientId = Optional.empty();
|
||||
assertThat(assertThrows(IllegalArgumentException.class, action::run))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("clientId must be present");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noRegistrarAccess() {
|
||||
accessor = AuthenticatedRegistrarAccessor.createForTesting(ImmutableSetMultimap.of());
|
||||
action =
|
||||
new RegistryLockGetAction(
|
||||
Method.GET, response, accessor, authResult, Optional.of("TheRegistrar"));
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(SC_FORBIDDEN);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_readOnlyAccessForOtherUsers() {
|
||||
// If lock is not enabled for a user, this should be read-only
|
||||
persistResource(
|
||||
makeRegistrarContact3().asBuilder().setAllowedToSetRegistryLockPassword(true).build());
|
||||
action.run();
|
||||
assertThat(GSON.fromJson(response.getPayload(), Map.class).get("results"))
|
||||
.isEqualTo(
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of(
|
||||
"lockEnabledForContact",
|
||||
false,
|
||||
"email",
|
||||
"Marla.Singer@crr.com",
|
||||
"clientId",
|
||||
"TheRegistrar",
|
||||
"locks",
|
||||
ImmutableList.of())));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_lockAllowedForAdmin() throws Exception {
|
||||
// Locks are allowed for admins even when they're not enabled for the registrar
|
||||
persistResource(makeRegistrar2().asBuilder().setRegistryLockAllowed(false).build());
|
||||
authResult = AuthResult.create(AuthLevel.USER, UserAuthInfo.create(user, true));
|
||||
action =
|
||||
new RegistryLockGetAction(
|
||||
Method.GET, response, accessor, authResult, Optional.of("TheRegistrar"));
|
||||
action.run();
|
||||
assertThat(GSON.fromJson(response.getPayload(), Map.class).get("results"))
|
||||
.isEqualTo(
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of(
|
||||
"lockEnabledForContact",
|
||||
true,
|
||||
"email",
|
||||
"Marla.Singer@crr.com",
|
||||
"clientId",
|
||||
"TheRegistrar",
|
||||
"locks",
|
||||
ImmutableList.of())));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_lockNotAllowedForRegistrar() {
|
||||
// The UI shouldn't be making requests where lock isn't enabled for this registrar
|
||||
action =
|
||||
new RegistryLockGetAction(
|
||||
Method.GET, response, accessor, authResult, Optional.of("NewRegistrar"));
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_accessDenied() {
|
||||
accessor = AuthenticatedRegistrarAccessor.createForTesting(ImmutableSetMultimap.of());
|
||||
action =
|
||||
new RegistryLockGetAction(
|
||||
Method.GET, response, accessor, authResult, Optional.of("TheRegistrar"));
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(SC_FORBIDDEN);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badRegistrar() {
|
||||
action =
|
||||
new RegistryLockGetAction(
|
||||
Method.GET, response, accessor, authResult, Optional.of("SomeBadRegistrar"));
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(SC_FORBIDDEN);
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,7 @@ import org.junit.Test;
|
||||
import org.junit.rules.Timeout;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
/** WebDriver tests for Registrar Console UI. */
|
||||
@RunWith(RepeatableRunner.class)
|
||||
@@ -78,6 +79,12 @@ public class RegistrarConsoleWebTest extends WebDriverTestCase {
|
||||
assertThat(driver.waitForElement(By.id(eltId)).isDisplayed()).isFalse();
|
||||
}
|
||||
|
||||
/** Checks that searching with the given By produces at least one element with the given text. */
|
||||
void assertEltTextPresent(By by, String toFind) {
|
||||
assertThat(driver.findElements(by).stream().map(WebElement::getText).anyMatch(toFind::equals))
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEditButtonsVisibility_owner() throws Throwable {
|
||||
driver.get(server.getUrl("/registrar#whois-settings"));
|
||||
@@ -190,9 +197,11 @@ public class RegistrarConsoleWebTest extends WebDriverTestCase {
|
||||
ImmutableList<RegistrarContact> contacts =
|
||||
server.runInAppEngineEnvironment(
|
||||
() -> loadRegistrar("TheRegistrar").getContacts().asList());
|
||||
assertEltText("contacts[0].name", contacts.get(0).getName());
|
||||
assertEltText("contacts[0].emailAddress", contacts.get(0).getEmailAddress());
|
||||
assertEltText("contacts[0].phoneNumber", contacts.get(0).getPhoneNumber());
|
||||
for (RegistrarContact contact : contacts) {
|
||||
assertEltTextPresent(By.id("contacts[0].name"), contact.getName());
|
||||
assertEltTextPresent(By.id("contacts[0].emailAddress"), contact.getEmailAddress());
|
||||
assertEltTextPresent(By.id("contacts[0].phoneNumber"), contact.getPhoneNumber());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
-- Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
DROP DATABASE IF EXISTS postgres;
|
||||
CREATE DATABASE postgres;
|
||||
@@ -5,3 +5,4 @@ PATH CLASS METHODS OK AUTH_METHODS
|
||||
/registrar-ote-setup ConsoleOteSetupAction POST,GET n INTERNAL,API,LEGACY NONE PUBLIC
|
||||
/registrar-ote-status OteStatusAction POST n API,LEGACY USER PUBLIC
|
||||
/registrar-settings RegistrarSettingsAction POST n API,LEGACY USER PUBLIC
|
||||
/registry-lock-get RegistryLockGetAction GET n API,LEGACY USER PUBLIC
|
||||
|
||||
@@ -11,9 +11,10 @@ emailAddress: the.registrar@example.com -> thase@the.registrar
|
||||
url: http://my.fake.url -> http://my.new.url
|
||||
contacts:
|
||||
ADDED:
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=+1.2345678901, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false, registryLockPasswordHash=null, registryLockPasswordSalt=null}
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=+1.2345678901, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false}
|
||||
REMOVED:
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=John Doe, emailAddress=johndoe@theregistrar.com, phoneNumber=+1.1234567890, faxNumber=null, types=[ADMIN], gaeUserId=31337, visibleInWhoisAsAdmin=false, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false, registryLockPasswordHash=null, registryLockPasswordSalt=null},
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Jian-Yang, emailAddress=jyang@bachman.accelerator, phoneNumber=+1.1234567890, faxNumber=null, types=[TECH], gaeUserId=null, visibleInWhoisAsAdmin=false, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false, registryLockPasswordHash=null, registryLockPasswordSalt=null}
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Marla Singer, emailAddress=Marla.Singer@crr.com, phoneNumber=+1.2128675309, faxNumber=null, types=[TECH], gaeUserId=31337, visibleInWhoisAsAdmin=false, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false},
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=John Doe, emailAddress=johndoe@theregistrar.com, phoneNumber=+1.1234567890, faxNumber=null, types=[ADMIN], gaeUserId=31337, visibleInWhoisAsAdmin=false, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false},
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Jian-Yang, emailAddress=jyang@bachman.accelerator, phoneNumber=+1.1234567890, faxNumber=null, types=[TECH], gaeUserId=null, visibleInWhoisAsAdmin=false, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false}
|
||||
FINAL CONTENTS:
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=+1.2345678901, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false, registryLockPasswordHash=null, registryLockPasswordSalt=null}
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=+1.2345678901, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false, allowedToSetRegistryLockPassword=false}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 93 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 50 KiB |
26
db/README.md
26
db/README.md
@@ -29,18 +29,28 @@ changes not yet deployed are pushed.
|
||||
|
||||
Below are the steps to submit a schema change:
|
||||
|
||||
1. Write the incremental DDL script that makes your changes to the existing
|
||||
schema. It should be stored in a new file in the
|
||||
1. Make your changes to entity classes, remembering to add new ones to
|
||||
`core/src/main/resources/META-INF/persistence.xml` so they'll be picked up.
|
||||
2. Run the `nomulus generate_sql_schema` command to generate a new version of
|
||||
`db-schema.sql.generated`. The full command line to do this is:
|
||||
|
||||
`./gradlew registryTool --args="-e localhost generate_sql_schema --start_postgresql -o /path/to/nomulus/db/src/main/resources/sql/schema/db-schema.sql.generated"`
|
||||
3. Write an incremental DDL script that changes the existing schema to your
|
||||
new one. The generated SQL file from the previous step should help. New
|
||||
create table statements can be used as is, whereas alter table statements
|
||||
should be written to change any existing tables.
|
||||
|
||||
This script should be stored in a new file in the
|
||||
`db/src/main/resources/sql/flyway` folder using the naming pattern
|
||||
`V{id}__{description text}.sql`, where `{id}` is the next highest number
|
||||
following the existing scripts in that folder. Also note that it is a
|
||||
**double** underscore in the naming pattern.
|
||||
2. Run the `:db:test` task from the Gradle root project. The SchemaTest will
|
||||
following the existing scripts in that folder. Note the double underscore in
|
||||
the naming pattern.
|
||||
4. Run the `:db:test` task from the Gradle root project. The SchemaTest will
|
||||
fail because the new schema does not match the golden file.
|
||||
3. Copy db/build/resources/test/testcontainer/mount/dump.txt to the golden file
|
||||
(db/src/main/resources/sql/schema/nomulus.golden.sql). Diff it against the
|
||||
5. Copy `db/build/resources/test/testcontainer/mount/dump.txt` to the golden file
|
||||
`db/src/main/resources/sql/schema/nomulus.golden.sql`. Diff it against the
|
||||
old version and verify that all changes are expected.
|
||||
4. Rerun the `:db:test` task. This time all tests should pass.
|
||||
6. Re-run the `:db:test` task. This time all tests should pass.
|
||||
|
||||
Relevant files (under db/src/main/resources/sql/schema/):
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ ext {
|
||||
def command =
|
||||
"""gsutil cp \
|
||||
gs://domain-registry${env}-cloudsql-credentials/${role}_credential.enc - | \
|
||||
base64 -d | \
|
||||
gcloud kms decrypt --location global --keyring nomulus \
|
||||
--key sql-credentials-on-gcs-key --plaintext-file=- \
|
||||
--ciphertext-file=- \
|
||||
@@ -118,11 +119,11 @@ artifacts {
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
url project.schema_jar_repo
|
||||
url project.schema_publish_repo
|
||||
}
|
||||
}
|
||||
publications {
|
||||
schemaOrmPublication(MavenPublication) {
|
||||
sqlSchemaPublication(MavenPublication) {
|
||||
groupId 'google.registry'
|
||||
artifactId 'schema'
|
||||
version project.schema_version
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
-- Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
create index if not exists idx_registry_lock_registrar_id ON "RegistryLock"
|
||||
using btree (registrar_id);
|
||||
@@ -0,0 +1,19 @@
|
||||
-- Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
-- Note: We're OK with dropping this data since it's not live in production yet.
|
||||
alter table "PremiumList" drop column if exists currency;
|
||||
|
||||
-- TODO(mcilwain): Add a subsequent schema change to remove this default.
|
||||
alter table "PremiumList" add column currency text not null default 'USD';
|
||||
@@ -22,6 +22,7 @@
|
||||
create table "ClaimsList" (
|
||||
revision_id bigserial not null,
|
||||
creation_timestamp timestamptz not null,
|
||||
tmdb_generation_time timestamptz not null,
|
||||
primary key (revision_id)
|
||||
);
|
||||
|
||||
@@ -132,7 +133,7 @@
|
||||
revision_id bigserial not null,
|
||||
bloom_filter bytea not null,
|
||||
creation_timestamp timestamptz not null,
|
||||
currency bytea not null,
|
||||
currency text not null,
|
||||
name text not null,
|
||||
primary key (revision_id)
|
||||
);
|
||||
@@ -160,6 +161,8 @@
|
||||
alter table if exists "Domain_GracePeriod"
|
||||
add constraint UK_4ps2u4y8i5r91wu2n1x2xea28 unique (grace_periods_id);
|
||||
create index premiumlist_name_idx on "PremiumList" (name);
|
||||
create index idx_registry_lock_verification_code on "RegistryLock" (verification_code);
|
||||
create index idx_registry_lock_registrar_id on "RegistryLock" (registrar_id);
|
||||
|
||||
alter table if exists "RegistryLock"
|
||||
add constraint idx_registry_lock_repo_id_revision_id unique (repo_id, revision_id);
|
||||
|
||||
@@ -92,9 +92,9 @@ CREATE TABLE public."PremiumEntry" (
|
||||
CREATE TABLE public."PremiumList" (
|
||||
revision_id bigint NOT NULL,
|
||||
creation_timestamp timestamp with time zone NOT NULL,
|
||||
currency bytea NOT NULL,
|
||||
name text NOT NULL,
|
||||
bloom_filter bytea NOT NULL
|
||||
bloom_filter bytea NOT NULL,
|
||||
currency text DEFAULT 'USD'::text NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -223,6 +223,13 @@ ALTER TABLE ONLY public."RegistryLock"
|
||||
ADD CONSTRAINT idx_registry_lock_repo_id_revision_id UNIQUE (repo_id, revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_registry_lock_registrar_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx_registry_lock_registrar_id ON public."RegistryLock" USING btree (registrar_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_registry_lock_verification_code; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
@@ -79,6 +79,7 @@ ext {
|
||||
'com.sun.xml.bind:jaxb-xjc:2.2.11',
|
||||
'com.thoughtworks.qdox:qdox:1.12.1',
|
||||
'dnsjava:dnsjava:2.1.7',
|
||||
'io.github.classgraph:classgraph:4.8.52',
|
||||
'io.github.java-diff-utils:java-diff-utils:4.0',
|
||||
'io.netty:netty-buffer:4.1.31.Final',
|
||||
'io.netty:netty-codec:4.1.31.Final',
|
||||
@@ -96,11 +97,11 @@ ext {
|
||||
'joda-time:joda-time:2.9.2',
|
||||
'junit:junit:4.12',
|
||||
'org.apache.avro:avro:1.8.2',
|
||||
'org.apache.beam:beam-runners-direct-java:2.11.0',
|
||||
'org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0',
|
||||
'org.apache.beam:beam-sdks-java-core:2.11.0',
|
||||
'org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0',
|
||||
'org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0',
|
||||
'org.apache.beam:beam-runners-direct-java:2.16.0',
|
||||
'org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0',
|
||||
'org.apache.beam:beam-sdks-java-core:2.16.0',
|
||||
'org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0',
|
||||
'org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0',
|
||||
'org.apache.commons:commons-text:1.6',
|
||||
'org.apache.ftpserver:ftplet-api:1.0.6',
|
||||
'org.apache.ftpserver:ftpserver-core:1.0.6',
|
||||
|
||||
@@ -24,5 +24,5 @@ dbPassword=
|
||||
|
||||
# Maven repository of the Cloud SQL schema jar, which contains the
|
||||
# SQL DDL scripts.
|
||||
schema_jar_repo=
|
||||
schema_publish_repo=
|
||||
schema_version=
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -54,7 +54,6 @@ tasks.withType(JavaCompile).configureEach {
|
||||
}
|
||||
}
|
||||
|
||||
version = '1.0'
|
||||
sourceCompatibility = '1.8'
|
||||
targetCompatibility = '1.8'
|
||||
|
||||
|
||||
2030
package-lock.json
generated
2030
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -21,10 +21,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"jasmine-core": "3.4.0",
|
||||
"karma": "3.0.0",
|
||||
"karma": "^4.4.1",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-closure": "0.1.3",
|
||||
"karma-jasmine": "2.0.1",
|
||||
"puppeteer": "1.17.0"
|
||||
"puppeteer": "1.20.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -130,6 +129,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -172,24 +172,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -18,7 +18,8 @@ task buildProxyImage(dependsOn: deployJar, type: Exec) {
|
||||
commandLine 'docker', 'build', '-t', 'proxy', '.'
|
||||
}
|
||||
|
||||
task deployProxy(dependsOn: [buildProxyImage, ':verifyDeployment']) {
|
||||
task deployProxy(dependsOn: buildProxyImage) {
|
||||
configure verifyDeploymentConfig
|
||||
doLast {
|
||||
exec {
|
||||
commandLine 'docker', 'tag', 'proxy', "gcr.io/${rootProject.gcpProject}/proxy"
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,11 +6,10 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -18,7 +17,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -44,7 +43,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -130,6 +129,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -172,24 +172,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -6,9 +6,9 @@ aopalliance:aopalliance:1.0
|
||||
args4j:args4j:2.33
|
||||
cglib:cglib-nodep:2.2
|
||||
com.beust:jcommander:1.60
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.9
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.8
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-core:2.9.10
|
||||
com.fasterxml.jackson.core:jackson-databind:2.9.10
|
||||
com.fasterxml:classmate:1.3.4
|
||||
com.github.jnr:jffi:1.2.17
|
||||
com.github.jnr:jnr-a64asm:1.0.0
|
||||
@@ -18,7 +18,6 @@ com.github.jnr:jnr-ffi:2.1.9
|
||||
com.github.jnr:jnr-posix:3.0.47
|
||||
com.github.jnr:jnr-unixsocket:0.21
|
||||
com.github.jnr:jnr-x86asm:1.0.2
|
||||
com.github.luben:zstd-jni:1.3.8-3
|
||||
com.google.api-client:google-api-client-appengine:1.29.0
|
||||
com.google.api-client:google-api-client-jackson2:1.27.0
|
||||
com.google.api-client:google-api-client-java6:1.27.0
|
||||
@@ -26,7 +25,7 @@ com.google.api-client:google-api-client-servlet:1.29.0
|
||||
com.google.api-client:google-api-client:1.29.2
|
||||
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
|
||||
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
|
||||
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
|
||||
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
|
||||
@@ -52,7 +51,7 @@ com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
|
||||
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
|
||||
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
|
||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
|
||||
com.google.apis:google-api-services-dataflow:v1b3-rev20190607-1.27.0
|
||||
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
|
||||
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
|
||||
@@ -141,6 +140,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-logging:commons-logging:1.2
|
||||
dnsjava:dnsjava:2.1.7
|
||||
io.dropwizard.metrics:metrics-core:3.1.2
|
||||
io.github.classgraph:classgraph:4.8.52
|
||||
io.grpc:grpc-all:1.17.1
|
||||
io.grpc:grpc-alts:1.17.1
|
||||
io.grpc:grpc-auth:1.17.1
|
||||
@@ -184,24 +184,25 @@ javax.transaction:transaction-api:1.1
|
||||
javax.validation:validation-api:1.0.0.GA
|
||||
javax.xml.bind:jaxb-api:2.3.1
|
||||
jline:jline:1.0
|
||||
joda-time:joda-time:2.9.2
|
||||
joda-time:joda-time:2.10.3
|
||||
junit:junit:4.12
|
||||
net.bytebuddy:byte-buddy-agent:1.9.7
|
||||
net.bytebuddy:byte-buddy:1.9.11
|
||||
net.java.dev.jna:jna-platform:5.3.1
|
||||
net.java.dev.jna:jna:5.3.1
|
||||
org.apache.avro:avro:1.8.2
|
||||
org.apache.beam:beam-model-job-management:2.11.0
|
||||
org.apache.beam:beam-model-pipeline:2.11.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.11.0
|
||||
org.apache.beam:beam-runners-direct-java:2.11.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
|
||||
org.apache.beam:beam-sdks-java-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
|
||||
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
|
||||
org.apache.beam:beam-vendor-guava-20_0:0.1
|
||||
org.apache.beam:beam-model-job-management:2.16.0
|
||||
org.apache.beam:beam-model-pipeline:2.16.0
|
||||
org.apache.beam:beam-runners-core-construction-java:2.16.0
|
||||
org.apache.beam:beam-runners-direct-java:2.16.0
|
||||
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.16.0
|
||||
org.apache.beam:beam-sdks-java-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.16.0
|
||||
org.apache.beam:beam-sdks-java-extensions-protobuf:2.16.0
|
||||
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.16.0
|
||||
org.apache.beam:beam-vendor-bytebuddy-1_9_3:0.1
|
||||
org.apache.beam:beam-vendor-grpc-1_21_0:0.1
|
||||
org.apache.beam:beam-vendor-guava-26_0-jre:0.1
|
||||
org.apache.commons:commons-compress:1.19
|
||||
org.apache.commons:commons-exec:1.3
|
||||
org.apache.commons:commons-lang3:3.8.1
|
||||
|
||||
@@ -24,6 +24,7 @@ import google.registry.proxy.HttpsRelayProtocolModule.HttpsRelayProtocol;
|
||||
import google.registry.proxy.Protocol.BackendProtocol;
|
||||
import google.registry.proxy.Protocol.FrontendProtocol;
|
||||
import google.registry.proxy.handler.EppServiceHandler;
|
||||
import google.registry.proxy.handler.FrontendMetricsHandler;
|
||||
import google.registry.proxy.handler.ProxyProtocolHandler;
|
||||
import google.registry.proxy.handler.QuotaHandler.EppQuotaHandler;
|
||||
import google.registry.proxy.handler.RelayHandler.FullHttpRequestRelayHandler;
|
||||
@@ -85,6 +86,7 @@ public class EppProtocolModule {
|
||||
Provider<LengthFieldBasedFrameDecoder> lengthFieldBasedFrameDecoderProvider,
|
||||
Provider<LengthFieldPrepender> lengthFieldPrependerProvider,
|
||||
Provider<EppServiceHandler> eppServiceHandlerProvider,
|
||||
Provider<FrontendMetricsHandler> frontendMetricsHandlerProvider,
|
||||
Provider<EppQuotaHandler> eppQuotaHandlerProvider,
|
||||
Provider<FullHttpRequestRelayHandler> relayHandlerProvider) {
|
||||
return ImmutableList.of(
|
||||
@@ -94,6 +96,7 @@ public class EppProtocolModule {
|
||||
lengthFieldBasedFrameDecoderProvider,
|
||||
lengthFieldPrependerProvider,
|
||||
eppServiceHandlerProvider,
|
||||
frontendMetricsHandlerProvider,
|
||||
eppQuotaHandlerProvider,
|
||||
relayHandlerProvider);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user