Commit graph

1465 commits

Author SHA1 Message Date
larryruili
6cdbde107f Redirect Registrar.referralUrl UI actions to url field
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196597051
2018-05-17 21:52:35 -04:00
mcilwain
de5645abd9 Don't add all claims data to NORDN verify task
This claims data can exceed the maximum size of a task, causing the NORDN upload
to error out.  It also wasn't even being used anyway. This data is already
logged during the upload and there's no reason to log it as well during the
verify, because there is already a unique actionLogId that can be used to tie
the verify task back to the upload task.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196521160
2018-05-17 21:52:35 -04:00
guyben
c25f765fc5 Set the MIME type BEFORE the payload
When we set the payload, it is converted to bytes using the response's
character set. Changing the MIME type later has no effect on the conversion
to bytes, even though it does change the returned MIME type. This results in
bytes that were encoded using one character set while the response reports a
different character set.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196258752
2018-05-17 21:52:35 -04:00
larryruili
c007458e1a Switch default service to manual scaling at 100 instances
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196129129
2018-05-17 21:52:35 -04:00
jianglai
e5538cfe35 Handle missing expected fee type in domain create
Also added a couple of more tests to make sure that we cover all edge cases.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195872013
2018-05-17 21:52:35 -04:00
glorioso
c2b5eaa4d2 Replace http://errorprone.info with https://errorprone.info since that site
serves from https now

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195473725
2018-05-05 23:52:20 -04:00
mcilwain
ec782367c0 Increase tools instance timeout duration to 60 minutes
This should decrease the average wait time when running nomulus tool.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195465469
2018-05-05 23:50:52 -04:00
mountford
3eb82ad647 Move RDAP boilerplate from remarks to notices
This is in response to decisions made by the RDAP working group regarding the
Operational Profile document:

https://docs.google.com/document/d/1h1E99GLY-8I0PfYBuANzVc3iJD1R38E6xayDYGK0pCw/edit?usp=sharing

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195251639
2018-05-05 23:47:47 -04:00
mmuller
d3bb808c5f Increase the number of instances on alpha
Increase the instances on alpha to achieve parity with sandbox.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194980588
2018-05-05 23:40:15 -04:00
jianglai
ebce333d5b Export registered domains to drive folder
The export happens in a reducer, whois instance fields all need to be serializable. The DriveConnection is therefore installed as a class variable that can be replaced with a mock during test. Class variables are not serialized. Only fields related to a particular instance are.

Note that DriveConnection is a misnomer. It is not a connection at all. It is just a thin wrapper class around the Drive service class, which provides convenient methods to write into Drive. Regardless, it cannot be serialized.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194596695
2018-05-05 23:38:42 -04:00
mcilwain
c242a4d08f Add nomulus count_domains command
This efficiently counts domains without having to load them (as opposed to the
existing list_domains command which does load then).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194559095
2018-05-05 23:37:11 -04:00
mcilwain
d95f286e58 Truncate how much info we log about updated premium lists
It doesn't make sense to log all 10K+ lines of a premium list every time it's
updated, and indeed that seems to hurt performance, yet that's precisely what
we were doing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194449836
2018-05-05 23:35:41 -04:00
larryruili
4657b8ab51 Replace 'referralUrl' with 'url' in WHOIS responses
The 'referralUrl' Datastore field is filled with mostly junk data, whereas
'url' contains real registrar web addresses. This makes the long needed fix to
display the proper url in WHOIS.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194398003
2018-05-05 23:32:40 -04:00
guyben
d618ae758b Throw exception when server returns error in ListObjectsCommand
ListObjectsCommand is a base class for a number of List commands that query the
tools server with the command input, and then show the user the server's reply.

For example, ListDomainsCommand queries ListDomainsAction with the input TLDs
from the user, and then prints the resulting domains for the user.

Currently, when the server query returns an error (because, e.g., the user of
ListDomainsCommand gave a non-existing TLD) - ListObjectsCommand just prints
the error message to stdout, and returns successfully.

That means that any automatic tool would think the command succeeded.

This CL changes the behavior of ListObjectsCommand to throw an exception with
the error message if the server returned an error. This results in the nomulus
command failing if the server encountered an error.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194393053
2018-05-05 23:31:09 -04:00
jianglai
82ded21b9e Make EAP fee description check more flexible
Currently we determine fee type from the fee extension description by checking if the format string of the FeeType contains the description we received. The formatting string for EAP is "Early Access Period, fee expires: %s", so the fee description generated by a domain check command, like "Early Access Period, fee expires: 2022-03-01T00:00:00.000Z", is not recognized as EAP.

This CL adds the ability to add arbitrary extra description strings to the FeeType for a description to match against. It also changes the match to "the given description contains any of the strings from the list of format string plus extra description strings".

For EAP, we added an extra description string "Early Access Period", so any fee description that contains "Early Access Period" will be matched to EAP FeeType, including the specific description (that contains the expiry time) that we send in a domain check.

Also improved error message on multiple fee type matching.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194149162
2018-05-05 23:26:33 -04:00
mcilwain
33505f4df7 Make async flow logic handle missing client transaction IDs
Per EPP RFC 5730, the <clTRID> element is optional. However, we weren't handling
it not being specified in asynchronous contact/host deletions because we were
adding it directly as a parameter value on a task, which does not allow null and
thus threw a NullPointerException.

This fixes handling for nulls (the parameter isn't set at all) and adds a test.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194123259
2018-05-05 23:21:55 -04:00
larryruili
f56355c9e8 Enforce anchor tenant domain create period
This verifies anchor tenant creates by registrars are for exactly 2 years, to simplify billing down the line (anchor tenants get 2 years of free domain creates).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193931858
2018-04-23 15:11:37 -04:00
larryruili
139c8e190d Enable ability to generate invoices without publishing
This adds a parameter to control invoice reporting, which defaults to false for
now (since we plan on manually adjusting the invoice next month).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193708323
2018-04-23 15:10:09 -04:00
mcilwain
f3359a5760 Add "Running ... " output to nomulus tool confirming commands
This makes it more clear than an operation is actually pending, rather
than nothing changing after pressing "Y" to run the command.

The prompt now looks like when you press "Y" and "N", respectively:

Perform this command? (y/N): Running ...

Perform this command? (y/N): Command aborted.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193521084
2018-04-23 15:04:04 -04:00
guyben
7bf8c02264 Replace uses of X.to(Upper|Lower)Case() with Ascii.to(Upper|Lower)Case(X)
Locales are weird. Even if all our character individually are just 0-9a-z_,
different locales might still convert them differently to upper/lower cases...

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193512312
2018-04-23 15:02:31 -04:00
jianglai
f289259101 Change UserPolicy to PUBLIC on WHOIS and EPP endpoints
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193407195
2018-04-23 14:59:24 -04:00
jianglai
77bfa5f4b8 Move autoscale object to service yaml file
The autoscaling manifest doesn't really change much from environment to environment. It makes sense to move it to the service yaml file, which is not environment dependent.

Also enhanced bashrc function to update the deployment manifest when deploy the proxy to alpha

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193407184
2018-04-23 14:57:52 -04:00
guyben
b885d01c0c Use java-8 functionals in FormFields
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193407158
2018-04-23 14:56:18 -04:00
mcilwain
2c0fb6d5a6 Enforce canonicalization of premium/reserved list labels
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193401336
2018-04-23 14:53:10 -04:00
jianglai
c6a4264606 Setup sandbox for GCP proxy
1) Clean up alpha config to only allow alpha proxy, removing test proxy client id.
2) Add sandbox service account client id to sandbox config.
3) Add sandbox config to nomulus and proxy, remove TEST environment, which is not being used anymore. (Test now uses LOCAL.)
4) Add sandbox kubenetes config

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193400909
2018-04-23 14:51:35 -04:00
guyben
9ed4d43f41 Use Predicates.not for one-liner functionals when appropriate
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193386976
2018-04-23 14:50:02 -04:00
jianglai
744727a58f Update domain registry proxy terraform annealing config
1) Change annealing target to watch for sandbox terraform config instead of test.
2) Delete terraform config for test project, as this project will be turned down.
3) Do not ask annealing to watch for alpha project terraform config, as we intend to change alpha regularly and manually.
4) Make terraform output display both service account email and client id.
5) Change canary node ports to 3100X, as 4000X is out of range for kubernetes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193383457
2018-04-23 14:48:29 -04:00
jianglai
eab6fcc8e6 Add networking settings for canary proxies
Canary proxies are not receiving real traffic but can be useful when testing Nomulus deployment (probers will probe canary proxy and compare metrics with production proxy). This CL added a separate load balancer for a canary proxy, running on the same clusters as production proxy.

The canary proxies have their own IP addresses, but are not assigned domain names. Probers will directly connect to these endpoints by IP.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193234937
2018-04-23 14:46:56 -04:00
jianglai
23c9cf926c Set namespace as default
This gets around a bug in Spinnaker where the namespace, if missing in the manifest, is set to "spinnaker".

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192825895
2018-04-23 14:39:09 -04:00
jianglai
bee77f0cc3 Make domain check return availability regardless of fee extensions
This allows a registrar to check domain availability even if the fee extension is not set. To obtain the premium price or create the domain, the fee extension is still needed.

PS: I believe the previous tests are erroneous anyway. It is the presence of fee extensions in the check request that we were looking for. Checking if the extension is declared during login has no bearing on the results.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192778137
2018-04-23 14:36:02 -04:00
mcilwain
078e9cbe53 Add better RDE logging for when contact resources don't exist
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192706560
2018-04-23 14:32:59 -04:00
mcilwain
613b19799a Increase commit log bucket count in production to match other envs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192614234
2018-04-23 14:29:59 -04:00
mcilwain
96f66eacd5 Add logging statement to export commit log diffs action
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192548282
2018-04-23 14:28:27 -04:00
mcilwain
168a23206d Increase export-snapshot queue rate from 5/m to 1/s
Five per minute just isn't working well enough on environments with lots of
entities (e.g. alpha and sandbox right now), and there doesn't seem to be a
real need to enforce such a low throttle.  The mapreduce queue, for instance,
has 500/s (effectively no throttle).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192474962
2018-04-23 14:26:55 -04:00
guyben
bec24a3558 Complete enums on tab
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192451820
2018-04-23 14:25:21 -04:00
guyben
8a9453f476 Replace registrar-premium-price-ack with registrar-settings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192355664
2018-04-23 14:22:18 -04:00
guyben
eb17851cb3 Test that update works for every field in RegistrarSettings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192348329
2018-04-23 14:20:43 -04:00
larryruili
ea995cf801 Make lock index parameters non-optional
The optional code has been around for a while, we can get rid of it now.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192344612
2018-04-23 14:19:10 -04:00
guyben
3dfd141e0f Fix the shell to allow multiple mutation of the same entity
Because of the objectify cache, after the first "read, change, write" of the
first mutation - the second mutation would "read" the original value, which
would then fail to be written with the error "Entity changed since init()".

This was specifically seen in the "UpdateRegistrarCommand", but likely affected
other commands as well.

Clearing the cache before each command solves this issue.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192328213
2018-04-10 17:08:45 -04:00
mcilwain
e0c32337fd Add mapreduce to delete load test data
This hard-deletes all contacts and hosts owned by a specific set of registrar
client IDs, currently just "proxy".

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192325211
2018-04-10 17:07:15 -04:00
mcilwain
0923c89981 Fix verb order in nomulus tool domain check commands
This makes them consistent with every other command, which uses the format
verb_noun.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192301468
2018-04-10 17:04:07 -04:00
mcilwain
8f1848e32e Disable verify entity integrity mapreduce on sandbox
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192289233
2018-04-10 16:59:28 -04:00
mcilwain
a8b6195ce2 Make RDE run less frequently on sandbox/alpha
This also removes RDE tasks that shouldn't/can't run on non-production environments, like upload/reporting.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192177779
2018-04-10 16:56:22 -04:00
guyben
38bf86c0fd Incorporate some of the fixes done in RegistrarPremiumPriceAckAction
This is in preparation for merging and then removing
RegistrarPremiumPriceAckAction.

This includes:

test that the data the UI sent isn't stale
---------------------------------------------
Our system is "read, modify, write". However, if between the "read" and the "write" someone else changed the registry, my write will undo their change even if I didn't touch any of their fields.
To solve that - we use the "lastUpdateTime" timestamp of the registrar. the UI reads it with the rest of the data, and sends it back on "write". We will now make sure the registrar currently in datastore has the same timestamp.

support premium-price-ack flag
---------------------------------
Add support for reading and writing this flag. We still won't be using it - that's in a followup CL, but we support it.

support changing the URL
------------------------
Add changing the URL in the UI, under the "whois" section

Will replace the Ack endpoint with this (and remove that endpoint) in a followup CL

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192154078
2018-04-10 16:54:51 -04:00
mcilwain
3bbaf585e5 Don't prompt to confirm non-mutating nomulus EPP tool commands
This is accomplished by making all non-mutating commands function with dry run set
to true, which also has the pleasurable side effect of not prompting for dry-run
mutating commands either, which also do nothing different/special on the second
run.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192149150
2018-04-10 16:53:18 -04:00
guyben
013558c814 Make it VERY clear when nomulus shell is on PROD
We don't want people to accidentally run commands on prod thinking they were on
Alpha / Sandbox.

To do that - we add 2 safeguards:

1) when on prod, the shell has a strong RED "PRODUCTION" in the commandline, while on alpha/sandbox it's green.

2) if a prod shell is idle for > 1h, it exits. So don't accidentally use a prod shell from a long time ago.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191931731
2018-04-10 16:51:42 -04:00
guyben
7bf0b059a6 Make the example whitelist IP be legal
Currently the example whitelist IP is 1.1.1.1/24, which is illegal. Changed to
1.1.1.0/24, which is legal

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191900036
2018-04-10 16:50:10 -04:00
guyben
6d5f7dc4a1 Print documentation for flags
After writing a flag on the shell, pressing "tab" will print out the
documentation for that flag.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191899137
2018-04-10 16:48:33 -04:00
jianglai
983bd27ee0 Read GCP proxy EPP SSL secret from GCS
This allows us to not ship the proxy with certificates/private keys. The secret is still encrypted by KMS. Reading the secret only happens once when the first EPP request comes in, which should not incur any tangible performance penalty.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191771680
2018-04-10 16:38:31 -04:00
jianglai
18a145eef1 Use self signed certificate when running the proxy locally
This allows us to not obtain a certificate and encrypt it with KMS when running the proxy locally during development.

Also updated FOSS build dagger version.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191746309
2018-04-10 16:36:56 -04:00