Commit graph

3172 commits

Author SHA1 Message Date
guyben
a03d10ce22 Add ability to save report to local folder
Updated the plugin to receive the "protocol"-like tag in the destination, so that you can choose whether to upload to GCS or just save it locally.

Possibly we might expand this in the future, but for now the goal was to allow saving our "internal" builds locally until we find a secure way to store AND BROWSE them remotely.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238055136
2019-03-20 14:25:28 -04:00
shicong
bc3bdc7347 Upgrade the version of google/errorprone plug-in
This CL upgraded google/errorprone plug-in to 2.3.3 and resolved
some warnings detected from the plug-in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238047862
2019-03-20 14:25:28 -04:00
gbrodman
50e0a9b532 Refactor common email sending utility
The main thrust of this is to create a common POJO that contains email content in a simple way, then have one class that converts that to an email and sends it. Any class that uses email should only have to deal with creating that POJO.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237883643
2019-03-20 14:25:28 -04:00
shicong
9823ee7fcf Enable Webdriver test in Kokoro build
We changed to use Docker to provision Chrome browser and
ChromeDriverService, and the used Kokoro VM comes with
the docker CLI so we can enable the webdriver tests again
in kokoro build.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237874165
2019-03-20 14:25:28 -04:00
mmuller
450e867534 E-mail changes initiated from console to registrar contacts
Also, fix misspelling of "recipient."

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237857289
2019-03-20 14:25:28 -04:00
shicong
a7d099d2a3 Enable screenshot comparison in external build
This change actually enabled the screenshot comparison in the
visual regression tests. We used Docker to provision Chrome
and ChromeDriver to eliminate the discrepancy of environment
between local development and Travis CI.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237811918
2019-03-20 14:25:28 -04:00
gbrodman
44e3668510 Display pricing tier even when a domain is reserved
Even though it's not directly related, I also fixed a typo in PREMIUM because it bugged me.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237796791
2019-03-20 14:25:28 -04:00
guyben
dc0c1583f5 Set the travis CI build to continue even if some tasks failed
The --continue argument makes gradle try and build every task whose dependencies finished successfully. This is in contrast to the "regular" behavior of stopping at the first failure.

This is useful because it will show us all the failed tests (from all test tasks) instead of just the first test task that failed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237792667
2019-03-20 14:25:28 -04:00
mcilwain
241dbea9d9 De-premiumize wing.dev for internal registration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236661149
2019-03-20 14:25:28 -04:00
jianglai
50e88acddb Update to bazel 0.23.1
Also updated closure rules to GitHub master, as the current release version
(0.80.0) has compatibility issues with bazel 0.23.1.

See: https://github.com/bazelbuild/rules_closure/issues/333

Note that on Debian Testing (Buster) there's currently an issue with OpenSSL that can be temporarily fixed by setting the environment variable OPENSSL_CONF to /etc/ssl.

See: https://fransdejonge.com/2018/12/run-enpass-on-debian-buster-testing/

Lastly, migrated from the --local_resources flag (to be deprecated) to --local_ram_resources and --local_cpu_resources.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237527805
2019-03-08 18:41:16 -05:00
shicong
984aed94a2 Update many dependencies to latest version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237514773
2019-03-08 18:39:42 -05:00
weiminyu
eb8d80f7ad Ensure gradle build has only one servlet-api
Use javax.servlet:servlet-api:2.5 and exclude all other implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237505707
2019-03-08 18:38:09 -05:00
jianglai
27c1765ab4 Fix Bazel build breakage introduced in []
This is no way to make Blaze and Bazel happy at the same point. Without [] Blaze complains about import orders. However the new order breaks Bazel. Bazel suggested to add a suppression to suppress order check, which fixes the Bazel problem, but the suppression string is not recognized by Blaze.

I cannot think of another way to solve this other than MOE. Luckily we'll delete all the BUILD files when we move to Gradle anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237501133
2019-03-08 18:36:36 -05:00
jianglai
b573b10ae1 Remove backported MockitoJUnitRule
Mockito in third_party is updated to 1.10. We do not need to backport this rule anymore.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237496086
2019-03-08 18:35:00 -05:00
tjgq
5056e48363 Fix linter errors introduced by CL 236568443.
Note that the Bazel closure rules run the linter at head, while fixjs/cider/critique/etc run the released version, so they will complain about the formatting introduced by this CL until a new release is out.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237358273
2019-03-08 18:33:25 -05:00
jianglai
90e298fb39 Only show OT&E admin actions when not in production environment
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237061813
2019-03-08 18:27:11 -05:00
shicong
6b9b60d38c Remove all CSS animations to reduce flakiness
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237045320
2019-03-08 18:25:36 -05:00
weiminyu
98cce20899 Set up domain-registry proxy in Crash environment
- Created configs for Proxy server, GKE, and terraform
- Created sans_list file for use with tarsier client
- Updated allowedClients in registry server

TODO: Update dr-bashrc to support crash environment

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236659249
2019-03-05 14:25:01 -05:00
Weimin Yu
69b7815dd0 Update create registrar form
Changed the order of the create registrar form fields and updated the delegate email and country code labels to be more intuitive

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236354256
2019-03-05 14:22:09 -05:00
guyben
847795d58d Remove the web console EPP endpoint
This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it.

We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration.

Also, this is a security risk, as it allowed to do "billable actions" (creating a new domain for example) with the only authentication being access to the registrar's G Suite account.

This bypassed the certificate, IP whitelist, and EPP password, which is bad.

PUBLIC:
Remove the web console EPP endpoint

This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it.

We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236244195
2019-03-05 14:20:42 -05:00
guyben
193bd49406 Zip report folders that don't have a clear entry point
This is mostly for build reports that use xml or other non-browsable
format. Most notable - the JUnit xml test results.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236118885
2019-03-05 14:19:12 -05:00
jianglai
4418d45595 Do not require auth info in super user transfer
Super users can look up auth info in Datastore or BigQuery backup anyway.
Requiring it only adds friction when using the super user extension, without
any additional security benefit.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235786090
2019-03-05 14:17:42 -05:00
guyben
5b94364bb9 Set the registrar WHOIS email in the web console creation endpoint
We set the initial value to the "icann referral email", but registrars can change it later if they want.

Although this value isn't strictly required, we assume it exists in the spec11 report.

Also changed the name of the contact email from "email" to "consoleUserEmail"

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235734200
2019-03-05 14:14:46 -05:00
shicong
756a3b41e1 Implement screenshot comparison
This change added the implementation of screenshot comparison with
ChromeWebDriver which will be used in the open-source code base.

This change also set a default window size(1200x2000) for each screenshot
test. This is to make the size of screenshot deterministic to help
build the screenshot comparison tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235539713
2019-03-05 14:13:13 -05:00
gbrodman
7ddd8b55d2 Set domain create fee cost to be 0 for anchor tenants
We already properly remove EAP fees for anchor tenants.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235529469
2019-03-05 14:11:36 -05:00
jianglai
8fac22f0f3 Fix .bzl files with buildifier
This CL fixes .bzl files to make them compatible with the next versions of Bazel. This is done by running the following command on all the .bzl files:

    buildifier --lint=fix --warnings=attr-non-empty,attr-single-file,ctx-actions,output-group

More information: []

Tested:
    tap_presubmit
    Some tests failed; test failures are believed to be unrelated to this CL

BEGIN_PUBLIC
Internal cleanup
END_PUBLIC

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235192309
2019-02-25 11:13:08 -05:00
shicong
26490e607e Copy dependency BOMs to our GoB vomit repo
We currently deploy metadata files for vulnerability scanning
to a GoB repo. The Vomit team has requested that we provide
the .pom and .jar files for each dependency in the GoB repo
for their new manifest approach of scanning.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235029408
2019-02-25 11:13:08 -05:00
mmuller
9571f66dd5 Enable build report upload on travis
Note that this also requires setting the CREDZ environment variable to the
contents of the service account credentials file (wrapped in single quotes for
shell command protection)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234993149
2019-02-25 11:13:08 -05:00
jianglai
468808723a Move domain registry terraform configs
We are moving toward using GitHub as the source of truth for the domain registry project (Nomulus). As such, the piper location will soon be deleted, along with it the terraform configs. These files are copied to the canonical location []

Note that the files under modules will still be present in the open source code base as it allows open source users to set up the project quickly. The files under envs are specific to each actual project and is removed entirely from the open source code (it was excluded by MOE before).

Some files are renamed to conform to the newly established terraform code style.

There was a remaining regarding using latchkey to set up IAM policies that I intend to punt for now. I imagine if we decide to use latchkey, it means that the IAM related terraform configs will be removed for the Annealing set up. However we would still like to leave that in the open source configs such that it still is a one-stop shop to set up your project.

The automation mode is set to DRYRUN so that there are no accidental changes to our projects during .dev launch. It will be changed back later.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234838043
2019-02-25 11:13:08 -05:00
guyben
6d9f718466 Upload task results to GCS
This uploads all the report files to GCS, and also creates a cover page that
summarises all the task states.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234601015
2019-02-25 11:13:08 -05:00
Michael Muller
fc4268b470 Revert "Merge branch 'master' into master"
This reverts commit 9dfbfc5e32, reversing
changes made to 94a2681127.
2019-02-19 15:44:11 -05:00
Michael Muller
6dbb74c1d0 Merge branch 'master' into master 2019-02-19 15:28:01 -05:00
mcilwain
94a2681127 Send deletion poll messages when requested by superuser
Otherwise, registrars will never receive a notification through EPP that a
domain has been synchronously deleted by us.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234172289
2019-02-18 17:34:36 -05:00
mcilwain
067756722d Change nomulus registrar --drive_id parameter to --drive_folder_id
This makes it consistent with the parameter of the same name on the tld commands.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234148699
2019-02-18 17:32:57 -05:00
jianglai
b582614d7a Add the builder folder to the open source code base
It should have been part of []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234036893
2019-02-18 17:31:19 -05:00
jianglai
23ee5b21ec Add a Dockerfile to build the builder
Our Gradle build now requires three programs to build: Java, npm and gcloud. There are no existing images that contain all of them. Even if there were, they probably come from some random Joe on the Internet and we cannot trust the image to be free of malwares. Therefore we need to build our own builder.

The builder images will be built by Cloud Build and upload to our container registry. We should periodically rebuild it to pull in the latest security updates both for the base Ubuntu image, and for the components that we install. I have not figured out a way to do that yet. For now we'll just trigger Cloud Build manually once in a while.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234009343
2019-02-14 16:17:03 -05:00
gbrodman
063197fd69 Clean up the Gradle JS distribution a bit
There's no reason not to always create the source mapping but we shouldn't
distribute it in production.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233984970
2019-02-14 16:12:10 -05:00
jianglai
4241c7658f Add admin page link to create new registrar
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233956155
2019-02-14 16:08:57 -05:00
jianglai
9a6a57c871 Add gitignore rules for node modules
The npmInstall task installs gradle/node_modules/google-closure-library, which should not be tracked by git.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233826415
2019-02-14 16:05:37 -05:00
jianglai
f677373a54 Fix overrides of plugin repository (take 2 of []
The correct way to override the plugins repo is through the pluginManagement
section in the gradle settings file.  Also make use of the gradle.properties
file to initialize repositoryUrl and also publishUrl so we don't have to mess
around with finding and assigning them in the main gradle file.

The lock files are also updated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233810854
2019-02-13 16:24:16 -05:00
mcilwain
4f9bce1686 Automated g4 rollback of changelist 233778270
*** Reason for rollback ***

Breaks the build.

*** Original change description ***

Fix overrides of plugin repository

The correct way to override the plugins repo is through the pluginManagement
section in the gradle settings file.  Also make use of the gradle.properties
file to initialize repositoryUrl and also publishUrl so we don't have to mess
around with finding and assigning them in the main gradle file.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233801411
2019-02-13 16:19:18 -05:00
mmuller
287824564c Fix overrides of plugin repository
The correct way to override the plugins repo is through the pluginManagement
section in the gradle settings file.  Also make use of the gradle.properties
file to initialize repositoryUrl and also publishUrl so we don't have to mess
around with finding and assigning them in the main gradle file.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233778270
2019-02-13 16:17:38 -05:00
shicong
76028ba1b4 Partially externalize WebDriver tests
This change does a few things:

  1. Partially externalized WebDriver tests by using ChromeDriver
     as an implementation of WebDriver API in the external build.
  2. Refactored WebDriverRule.java to decouple the creation and
     using of WebDriver related stuff so we can have different
     implementations in internal and external builds.
  3. Refactored the usage of some internal libraries to have a
     central place to store all of them to make it easier to
     remove them in the external build.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233661757
2019-02-13 16:11:02 -05:00
guyben
4097dae3b2 Only inject @Parameter-created variables in the Action itself
Icann reports have 3 parameter-provided injections:

- yearMonth
- subdir
- reportType

We move all of them away from the "inner classes" and only @Inject them in the Actions themselves.

This has 2 benefits:
- it's much clearer what all the parameter inputs of the Actions are
- the "inner injected classes" don't assume anything about the Action that uses them - they will work just as well for JSON actions as for "regular" actions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233625765
2019-02-13 16:07:45 -05:00
guyben
e6c46cab58 Set up the plugin build environment
The goal of this CL is to set up the build environment to allow plugins to work.

We have a trivial plugin that doesn't do anything (yet) - it just sets itself as the finalizer of all Reporting tasks.

Eventually, this plugin will upload all reports to GCS, and even create a "cover page" linking to each one of them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233617499
2019-02-13 16:06:05 -05:00
jianglai
75c80b5e24 Create WAR files ready for deployment
This makes sure that the WAR files created by running "gradle stage" can be deployed by appcfg (tested the pubapi service on alpha). We need to copy all the static html files regardless of the service because the error.html handler is registered for sandbox and production environments across services. Without those files the gradle app engine plugin refuses to create the WAR files.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233608424
2019-02-12 11:26:28 -05:00
jianglai
0b3fee4ef1 Update dependency lock files
Also upgrade gradle wrapper to the latest version (5.2.1)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233468712
2019-02-12 11:21:30 -05:00
mmuller
36605849ea Move the lockfiles back to where they should have been
It looks like I must have somehow duplicated the absolute path when I copied
these, this puts them in the right place (I think...)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233412326
2019-02-12 11:18:09 -05:00
jianglai
b19563f69d Use Maven repository on GCS for Cloud Build
This CL changes the Cloud Build flows to retrieve dependencies from our self-hosted GCS repository, to ensure that the release build are reproducible and hermetic (Note that it is still not truely reproducible as the dependency publishing process will override any existing artifacts in GCS with the current artifacts in Maven central. This is an issue that we should fix later).

There are a couple of changes involved to get this working:

1. Changed internal repo location to pull from the new repo.

2. Remove jcenter repo. It is only used to pull in the docker gradle plugin, which is not used. We instead build the deploy jar file with Gradle and build the docker image with a Dockerfile. The docker gradle plugin artifacts uploaded to GCS cannot be read because it is using some special classifier which seems to not be preserved when uploading. The java application plugin is also removed because it is only used by the docker gradle plugin.

3. Removed netty tcnative library classifier. It does not appear to be actually used (the jar downloaded from Maven central is an uber jar) and the classifier again interferes with downloading the artifacts from GCS.

4. Removed the cyclic dependency of the util project on itself. It was added because the nebula linter wanted it, which I think is an erroneous warning which should be reported upstream. The cyclic dependency was not a problem before (for yet unknown reasons), but it seems like when we force the dependency resolution (by calling project.generateDependencyPublications during configuration stage) it exacerbated the hidden issue and caused a cyclic task dependency in the util project, which is fatal. Now Nebula will complain again, but the warning is considered benign and will not cause the build to fail.

5. Added the nebula dependency lock files. We need these files when using the GCS maven repo because the we only upload artifacts after conflict resolution to GCS. If both v1 and v2 of the same library are requested in the dependency graph, only one will be uploaded. If we do not have the lock files in place, when building from GCS maven repo, Gradle will try to first find both v1 and v2 in the repo (which fails because v1 is not present in the repo), before proceeding to select v2 to use.

6. Refactored the code to upload Maven artifacts to GCS. We need to manually edit the POM file to reproduce the dependencies for each artifact so that they are all put in the classpath during compilation. Before, the POM files do not have any dependency information, which causes compilation to fail because transitive dependencies are not loaded (even though they are present in the GCS repo).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233408051
2019-02-11 11:24:12 -05:00
mcilwain
49ac4e3e69 Improve Datastore efficiency of duplicate contact messages
I should have caught this in the review, but [] is loading *ALL*
contacts individually from Datastore on every domain update. This will add a
large number of Datastore round trips and thus significantly reduce update
performance.

This CL changes the behavior to *ONLY* load contacts when there is a duplicate
(which is needed to determine the contact's display name to generate the error
message), and loads all of them in a single batch rather than individually.

This also makes some minor changes around domain getters returning empty sets
instead of null.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233128140
2019-02-11 11:22:34 -05:00