Commit graph

1852 commits

Author SHA1 Message Date
gbrodman
3483f348dc Add a command to update allocation tokens
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246824258
2019-05-06 16:56:33 -04:00
gbrodman
df7e9a1225 Validate on-load that an AllocationToken can be used
Check the timing (that is, whether or not we're in a promotion), the allowed registrar client IDs, and the allowed TLDs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246824080
2019-05-06 16:54:55 -04:00
gbrodman
e9d220e6f3 Add promotional fields in GenerateAllocationTokensCommand
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246579125
2019-05-06 16:47:25 -04:00
gbrodman
c9ee5c3fb3 Add a scrap command to re-save all allocation token entities
This will populate the token type to be SINGLE_USE for existing tokens that
don't have a type.

Modeled after the ResaveEntitiesCommand, but modified so that we load all AllocationTokens (rather than having to provide a list of entity IDs on the command line)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246572756
2019-05-06 16:45:46 -04:00
weiminyu
e6e6303b9e Update to Truth 0.44 in Bazel build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246548162
2019-05-06 16:40:54 -04:00
guyben
5962c9c561 Fix Kokoro failure
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246411007
2019-05-06 16:34:27 -04:00
guyben
e1926dbc57 Add Jsonable and AbstractJsonableObject for easier RDAP object building
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246345611
2019-05-06 16:27:59 -04:00
jianglai
c45d3b843c Restore RemoteApiOptions method accessibility after use
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246161567
2019-05-06 16:24:44 -04:00
guyben
90c53152bf Simplify some of the RDAP Action classes
Overriding getter methods to change values is a bit overkill when these values
are static (don't change based on internal state).

Just setting them in the base class' constructor is simpler.

Also, we can read the PATH of an Action based on the Annotation instead
returning it manually for each Action.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246135754
2019-05-06 16:23:05 -04:00
mmuller
bbdf3db63e Change default TTLs on all records to 1 hour.
We need this as a precursor to running refreshDnsForAllDomains to change our
TTLs from 3 minutes to an hour (see the associated bug for details).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246011747
2019-05-06 16:19:48 -04:00
gbrodman
70c7e6c224 Use a potential discount in the AllocationToken when determining domain create price
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245458027
2019-04-27 00:08:57 -04:00
gbrodman
274b331522 Fix up a comment based on investigation into billing events
Please see the linked bug for more context--I believe this is correct based on what I've observed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245423464
2019-04-27 00:05:49 -04:00
gbrodman
312c1a46ab Add additional tests for the AllocationToken status transitions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245292932
2019-04-26 23:59:32 -04:00
gbrodman
a0f9e3b3dd Store a reference to an allocation token in the OneTime billing event
We will need to be able to find all redemptions associated with a particular token and this will allow us to do that.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245292865
2019-04-26 23:57:56 -04:00
gbrodman
53c1557d2a Use the registrar client ID and abuse email address in Spec11
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244899045
2019-04-26 23:45:07 -04:00
gbrodman
0644fab76e Use stream-collect rather than transformValues in Spec11 collection
As it turns out, using Maps::transformValues does not allow us to change the
resulting map--calling Map::put throws an UnsupportedOperationException. As a
result, we have to do this roundabout stream-collect to do a group-by.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244852373
2019-04-26 23:41:55 -04:00
jianglai
143ae1f93e Update proxy release pipeline following Spinnaker 1.13 release
The image name in the manifest needs to be the same as the name that Spinnaker trigger catches. With the new release, Spinnaker now correctly recognizes gcr.io/${PROJECT_ID}/proxy as the image name.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244845037
2019-04-23 10:44:44 -04:00
mcilwain
24bb78bd16 Fix some statically detected code issues
This includes: unnecessary semicolons, suppress warnings, switch statements, final/private qualifiers, Optional wrapping, conditionals, both inline and non-inline variables, ternaries, Collection putAll() calls, StringBuilders, and throws declarations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244182539
2019-04-22 12:54:34 -04:00
jakubvrana
212bd54b55 Remove references to |blessStringAsTrustedResourceUrlForLegacy in <link href>.
This directive will be deleted in the future, this change prepares for it.

More information: []

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

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243847668
2019-04-16 17:24:35 -04:00
mcilwain
3f974902df Only send registrar update notification emails to primary contacts
The test changes are perhaps a little bit more involved than expected, because I
had to add a second RegistrarContact which had knock-on effects on other tests.
This does make the other tests better though, in that we're now testing registrars
with multiple contacts (we weren't much before).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243827803
2019-04-16 14:11:06 -04:00
mcilwain
55f8e0efad Remove per-domain nameserver restrictions in reserved lists
This also removes the related setting on the Registry entity. We never used
either of these, and keeping them around in our codebase just adds complexity
for no purpose. We already achieve the goals of this feature by restricting
nameservers on entire TLDs and by registry-locking important domain names.

This is also two fewer things we'll have to worry about carrying over to the new
schema in Registry 3.0.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243816241
2019-04-16 14:09:27 -04:00
gbrodman
d1e3194fce Don't delete or "redeem" unlimited use AllocationTokens
We haven't started dealing with timing or discounts yet, but unlimited use tokens should actually be unlimited use

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243318266
2019-04-15 14:57:02 -04:00
jianglai
416a39b003 Remove @OnLoad on setDefaultNumDnsPublishLocks
All entities are updated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243274828
2019-04-15 14:55:23 -04:00
gbrodman
63807aa9be Add necessary fields to the AllocationToken schema
See https://docs.google.com/document/d/1SSWrILRpx0Mtr4sdvlYwz9I8wJp5Gu_o4qlml3iJDKI

This is just the base for now--we don't actually do anything with it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243265164
2019-04-15 14:53:45 -04:00
gbrodman
6b6e2ed930 Use a multimap to index the Spec11 threat matches
Collecting by key leads to exceptions if there are multiple client IDs with the
same email address (if we group by client ID in the pipeline). Using
Multimaps::index means that if we're grouping by email, all matches with the
same email get concatenated together

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242858112
2019-04-11 14:58:08 -04:00
guyben
d1f833b9bc Add abuse entity to registrar entities
From to the RDAP response profile:

2.4.5. Abuse Contact (email, phone) - an RDAP server MUST include an *entity*
with the *abuse* role within the registrar *entity* which MUST include *tel*
and *email*, and MAY include other members

Even though this is a MUST - this field will only be shown if the registrar has a *visible* abuse contact.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242684303
2019-04-11 14:54:28 -04:00
mcilwain
1c33f38555 Delete unused description field from premium/reserved list entities
It isn't used now, and as far as I can tell it was never used for anything, so
get rid of it.  We won't be using it in our new Cloud SQL schema anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242501877
2019-04-11 14:49:14 -04:00
shicong
1897b9d442 Fix Bazel build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242472456
2019-04-11 14:47:31 -04:00
guyben
3569f89c40 Show only the last of each event type in RDAP domain response
We also ignore events that happened before the domain was created (for example, in a previous incarnation of the same domain name) and we set the last changed event to be the later of the last EPP change and any other event that happened before "now".

From RDAP response profile
2.3.2 The domain object in the RDAP response MAY contain the following events:
2.3.2.3 An event of *eventAction* type *transfer*, with the last date and time that the
domain was transferred. The event of *eventAction* type *transfer* MUST be omitted if
the domain name has not been transferred since it was created.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242461310
2019-04-11 14:45:46 -04:00
shicong
9bcaaec7fd Add required dependency for RemoteApiInstaller
We got 500 Internal Server Error when calling GAE RemoteApi in Nomulus
tool. The root cause is we missed the dependency described in this
[]

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242166362
2019-04-11 14:43:46 -04:00
mmuller
2808364381 Change text of registrar change notification e-mail
Since we're now sending these to actual registrars, change the text to make it
a little bit clearer what's going on.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241992717
2019-04-05 11:54:45 -04:00
shicong
baed9dc6cc Improve exception message when TMDB not available
We saw a few IOExceptions recently which indicated that TMDB may
be down at that time. However, these IOExceptions didn't have
any message to clearly describe that. This CL is to improve
the exception message so next time we don't have to look at the
source code to figure out what happened.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241984023
2019-04-05 11:53:08 -04:00
gbrodman
d217939894 Clarify that we are actually using the client ID in Spec11
The Registrar object's @ID is on its clientId field, so that's what we're actually using here, not the name.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241936005
2019-04-05 11:51:28 -04:00
shicong
33cdc3ddda Enable flow documentation in external build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241934689
2019-04-05 11:49:49 -04:00
mcilwain
1346f7ab70 Make RDE report generation correctly handle DISABLED registrars
This is a follow-up to [] We can't set registrars as DISABLED until
this is deployed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241767990
2019-04-05 11:46:29 -04:00
gbrodman
3ad0d091f5 Continue Spec11 emails even if one fails
One failure should not stop the rest from sending.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241760092
2019-04-05 11:44:49 -04:00
shicong
ac74ad3088 Use Docker Java API to manage container for WebDriver
Previously we had a few customized Gradle build task to manage
the Docker container for provisioning browser and ChromeDriverService
used by WebDriver tests. This CL changed to use a java library
from testcontainers.org to achieve the same purpose. The main
benefit of it is that we can expect to run the WebDriver tests
from IDE going forward.

Also, this CL refactored the structure of WebDriver related classes
to have JUnit rule to manage the lifecycle of WebDriver instance,
this is also compatible with the API from testcontainers library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241539861
2019-04-05 11:38:16 -04:00
guyben
c0f5710c31 Update the rdapConformance and notices fields
We're changing rdapConformance from rdap_level_0 to icann_rdap_response_profile_0, and changing the EPP status notices title from "EPP Status Codes" to "Status Codes" to conform with the changing spec.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241527211
2019-04-05 11:35:08 -04:00
gbrodman
9c1739d562 Include the registrar name in the Spec11 threats report
Because we make use of previous reports, it's easier to add this in and then use it later as two steps, rather than trying to add this and use it in one change. This way we don't really need to deal with backcompat issues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241378853
2019-04-05 11:33:33 -04:00
gbrodman
25f1d58969 Automated g4 rollback of changelist 240574585.
*** Reason for rollback ***

The inconsistent class loading is breaking the tests

*** Original change description ***

Validate provided email addresses when creating a Registrar

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241014945
2019-03-29 16:23:59 -04:00
gbrodman
d5fbdea37d Skip emailing registrars with a null or empty email address
Obviously this is a bad thing and would fail if it ever happened. If this does occur, we will send a warning email.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240977242
2019-03-29 16:20:47 -04:00
gbrodman
174d8d69ea Validate provided email addresses when creating a Registrar
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240574585
2019-03-29 16:14:22 -04:00
mcilwain
26eda15d47 Check registrar existence prior to verifying access
This way the error messages are more sensible when a registrar doesn't exist
(which realistically shouldn't happen in the typical case anyway).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240376239
2019-03-29 16:11:10 -04:00
mcilwain
e1abef7b3e Explain why permission check occurs before existence check
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240355450
2019-03-29 16:09:32 -04:00
gbrodman
648656e002 Coalesce null to the empty string in the Spec11 pipeline
We'll have a separate change to make sure we're not actually trying to email these folks, but this will make it so that the entire pipeline doesn't crash. The test makes sure that we can run the pipeline properly with these empty strings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240346954
2019-03-29 16:07:54 -04:00
mcilwain
4fb0021b14 Display created domain name in get_allocation_token command
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240212479
2019-03-29 16:02:48 -04:00
jianglai
64edf25fbe Add crash canary environment for proxy
This makes it possible to set up canary testing on crash.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240210405
2019-03-29 16:01:07 -04:00
gbrodman
f95a30426d Remove compareTo() from DelegationSignerData
The only reason why it existed was so that we could get tests to print information in a consistent order and there are other ways of doing that. By removing compareTo we can use the properties of the extended ImmutableObject properly and properly implement the RFC https://tools.ietf.org/html/rfc5910#page-18

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240170488
2019-03-29 15:56:15 -04:00
jianglai
c25486ec32 Upload proxy manifests during GCB build
GCB will now upload the images to GCR and the manifests to GCS. A Spinnaker pipeline can then be triggered by the GCB Pub/Sub message and use both the image and the manifests to deploy the proxy to GKE.

Also temporarily moves customized Maven repo location while it is being worked on.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=239853011
2019-03-25 12:01:09 -04:00
mcilwain
6e1e4769a9 Remove authcode fallback for registering anchor tenants
We won't be using this for future launches, so get rid of it now.

Also reorganizes existing anchor tenant test cases and adds a new one for
creation of a TMDBed anchor tenant domain in sunrise.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=239669950
2019-03-25 11:59:38 -04:00