Commit graph

656 commits

Author SHA1 Message Date
mcilwain
48a1bacbb0 Get rid of the delete() method on ReservedList
It wasn't being used by any actual code, and having helper methods handling
saving/persistence on entities like this is not a pattern we want to encourage,
since it hides Datastore transactions from further up in the call chain. The
idea is that you can always look for ofy() calls in the same layer of code to
see where persisted data is being changed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143036027
2017-01-09 11:59:04 -05:00
mcilwain
28f6c770c8 Add MOE equivalence for sync on 2016-12-19
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142449539
2017-01-09 11:59:04 -05:00
nickfelt
0405a427f1 Remove unnecessary SecureRandom from UrlFetchUtils
We're only using it for generating multiparty boundaries, and there's no real need for the random boundary values to be cryptographically secure.  The point of the randomness is just to make collisions with content in the payload sufficiently unlikely.  The app itself controls the payload contents, and while it might be derived from user-submitted content, in practice it would be nearly infeasible to get the payload to contain arbitrary boundary values even if the RNG-produced boundaries could be determined in advance.

To further insulate against this, I've increased the boundary size (from 40 bits to 192) and added an actual check that the boundary isn't present in the input data, so that in the extremely unlikely event of a collision, we fail rather than producing an invalid multipart request.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142784289
2016-12-22 16:10:44 -05:00
mcilwain
9d9c527917 Reconcile FeesAndCredits handling in price customization
Also adds a mechanism to ensure that fee extensions are included when custom
pricing logic adds a custom fee, and fixes up the domain restore flow to
properly use the restore price.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142715136
2016-12-22 16:09:14 -05:00
mcilwain
720f03cc17 Wire in domain transfer custom pricing and add a test
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142593949
2016-12-22 16:07:39 -05:00
mcilwain
7e5c6edfe3 Make enum fields in ProtocolDefinition final
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142294958
2016-12-19 11:09:20 -05:00
mountford
9764ab0a56 Add missing dependency on Jackson2 library
The com.google.client.api.json.jackson2 package depends on the com.fasterxml.jackson.core library, but this was not properly reflected in the Nomulus build files. The problem was masked because the library was getting pulled in by other dependencies, but when they were removed, the bug came out.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142291622
2016-12-19 11:09:20 -05:00
mcilwain
f44557f34f Remove deprecated extra flow logic and TLD-specific pricing proxy
This also adds a domain update pricing hook to DomainPricingCustomLogic.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142286755
2016-12-19 11:09:20 -05:00
mountford
0afafeff03 Move VerifyEntityIntegrityAction to batch package
By moving []s into the batch package, which is not included in the frontend service, we pave the way to remove the dependency of frontend on the [] library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142265351
2016-12-19 11:09:20 -05:00
mountford
246098d8e8 Remove unneeded reference to [] libraries
The flows package no longer needs [].

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142263353
2016-12-19 11:09:20 -05:00
mountford
669c3dc975 Move the async [] classes out of the flows package
We should be able to remove the dependency on the App Engine [] library from the frontend service, since no []s actually run there. In order to do this, we need to remove the various []-reliant classes from the frontend service build. This CL begins the process by moving the two async "flows" to a different package which is not included in the frontend service.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142159568
2016-12-19 11:09:19 -05:00
Tom Johnson
b0ebeed5a5 Add @ReportedOn annotation for BigQuery exports
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142038227
2016-12-19 11:09:11 -05:00
mcilwain
6cdac0462a Mark enum field on CreditType as final
Enums should be immutable, so all fields on them should be final.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142025872
2016-12-19 10:34:14 -05:00
cgoldfeder
5b9219fbdd Add filter support to the test server
The lack of ObjectifyFilter means that in any tests using
RegistryTestServer the Objectify session cache persists
between "requests" in the same test method. This is wrong
but had not caused any failures because we didn't assert
anything that mattered. However, a CL I'm working on
asserts that there is a creationTime on a created resource,
which is set automatically on Datastore save, and therefore
is still null in the session cache's version of the resource
if you don't clear it before the next command. Fixing it here
separately from that CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141939330
2016-12-13 18:00:15 -05:00
mcilwain
c281f54def Add getter to CheckData
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141926948
2016-12-13 16:05:22 -05:00
Ben McIlwain
2a1526209a Use bin_ and genfiles_ directories derived from the ctx, not the configuration
For Bazel (open source Blaze), users can have multiple repositories
and we are moving towards having one bin/genfiles dir per repository.
This means that bin_dir and genfiles_dir need to be rule-specific, not
configuration-specific, since the configuration is not repository-specific.
ctx.configuration.bin_dir and ctx.configuration.genfiles_dir have been
deprecated and now we'd like to remove them entirely.

The new fields are only available in Bazel 0.4.0+.
Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141791797
2016-12-13 16:03:55 -05:00
jianglai
74d64f502e Modify create price custom logic to return FeesAndCredits
Previously DomainPricingCustomLogic#customizeCreatePrice takes in the create
price itself and modifies it. Change it to take in the entire FeesAndCredits (previously named EppCommandOperations) which may contain other fees related to domain creation,
such as EAP fees, and returns FeesAndCredits that may either change the
fees or add new type of fees.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141600614
2016-12-13 15:59:16 -05:00
mcilwain
a56a0677ba Refactor RDE import stuff into its own rde.imports package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141566236
2016-12-13 15:57:46 -05:00
mcilwain
58b7babc2b Fix Java 7 generic type inference issue in SyncGroupMembersAction
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141485405
2016-12-13 15:56:16 -05:00
mcilwain
d1d6539694 Fix Javadoc typo in RegistryConfig
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141318009
2016-12-07 15:19:43 -05:00
mcilwain
10f86d241a Remove documentation project title config option
Nothing in the Nomulus release was using it and it's of questionable utility at
best. Nomulus isn't likely to be renamed at this point anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141301871
2016-12-07 15:19:43 -05:00
mountford
50aad72383 Add retry logic to RDE upload
We experience intermittent exceptions when connecting to Iron Mountain. Just retrying is probably the easiest solution to the problem.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141221179
2016-12-07 15:19:43 -05:00
mcilwain
2620097599 Retry attempted syncs to Google Groups that fail
I also moved to a non-concurrent modification syncing model. It was adding more
complexity than was justified just to have two requests going simultaneously
instead of one. The API doesn't reliably allow much more than that anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141210192
2016-12-07 15:19:43 -05:00
kak
c496f369c1 Prefer Multimap interface types over implementation types.
This change is required before the migration to MultimapBuilder can be
completed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141208944
2016-12-07 15:19:35 -05:00
Wolfgang Meyers
f2faf49d58 Add XjcToDomainResourceConverter for RDE import
With some code cleanup/refactoring/formatting by Ben McIlwain.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141199855
2016-12-07 15:19:29 -05:00
mountford
fbbcf41503 Temporarily change RDE to ignore bad transfer data
Because RDE reads from the commit logs to get its data, the bad transfer data resulting from a bug in the system is currently preventing proper RDE operation even for domains which have been fixed in Datastore. This CL adds a check to see if the transfer data is messed up (i.e. it doesn't have valid gaining and losing registrars), and if so, omits it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141074673
2016-12-06 11:52:46 -05:00
dxy
11584c31d8 -------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140986569
2016-12-06 11:52:46 -05:00
mountford
c0d9b54872 Do not cancel pending transfers unless there is one to cancel
A previous CL inadvertently caused the system to always set the transfer status to SERVER_CANCELLED when deleting a resource, even if there was no transfer. This led to RDE problems.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140890919
2016-12-06 11:52:46 -05:00
mountford
7cf29366bc Add scrap tool to remove transfer data
We have wound up with a few domains with invalid transfer data; the transfer status is SERVER_CANCELLED, but the other data is missing. This tool should set the transfer data for the specified domain back to null in the database.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140883792
2016-12-06 11:52:46 -05:00
mountford
da711343f0 Improve RDE error logging
RDE logs somewhat inscrutable errors when XML validation of the output fails due to bad data in Datastore. This CL adds a little more information to help us track down this sort of problem in the future.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140872462
2016-12-06 11:52:46 -05:00
mcilwain
f227598920 Inject DnsQueue in DomainCreateFlow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140867232
2016-12-06 11:52:46 -05:00
mountford
c59b738b5b Inject RDAP help information in ConfigModule
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140849879
2016-12-06 11:52:46 -05:00
mcilwain
3740171bbf Update create logic to ignore signed marks unless in sunrise
This addresses an issue where the existing logic assumed that the presence of a
signed mark means the current flow is a sunrise/sunrush request, when this isn't
necessarily true. It's safe to ignore signed marks in other circumstances.

This is a combination of work by Justin Graham <justin.af.graham@gmail.com>,
Nick Felt, and me (Ben). It is based on the original PR located at:
https://github.com/google/nomulus/pull/41

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140784461
2016-12-06 11:52:46 -05:00
jart
59f4984083 Upgrade Nomulus to latest Closure Rules
Significant technical debt has been eliminated. The latest best
practices are also now adopted for dealing with runfiles and dealing
with files across repositories.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140762937
2016-12-06 11:52:46 -05:00
jianglai
79a72387ee Migrate getCreatePrice() call to DomainPricingLogic
Swap all calls to TldSpecificLogicProxy.getCreatePrice() to the counterpart in
DomainPricingLogic. Also makes necessary changes for testing to work, including
fake implementations of DomainPricingCustomLogic and
DomainCreateLofwCustomLogic.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140754334
2016-12-06 11:52:46 -05:00
mcilwain
f8b4c9eddb Add extensible custom logic to domain application create flow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140656367
2016-12-06 11:52:46 -05:00
jianglai
99c16dc345 Make domain pricing customizable
By refactoring TldSpecificLogicProxy (and renaming it to DomainPricingLogic) into
a FlowScope object that is injected into each flow, we can further inject a
DomainPricingCustomLogic into the pricer, which has hooks into each pricing
calls, e. g. getCreatePrice(), getRenewPrice(), etc.

The benefit of these customization hooks is that methods like getCreatePrice()
get called in multiple flows, such as DomainAllocateFlow,
DomainApplicationCreateFlow, and DomainCreateFlow. By customizing the return
value of getCreatePrice() itself, all of its callers gets the amended price.

This CL only includes the basic infrastructure needed, with no actual hooks
placed into each flow.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140616990
2016-12-06 11:52:46 -05:00
mcilwain
5f32d1bbeb Correctly set HTTP error status codes when list objects fails
This makes the associated nomulus tool commands correctly return error
exit codes when the server-side component fails. This improves
scriptability.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140543216
2016-12-06 11:52:46 -05:00
jianglai
b35ac10b7e Add extensible custom logic to the domain delete flow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140534389
2016-12-06 11:52:46 -05:00
lukes
8a8276e838 ​​​Remove html ambiguity from soy templates.
Soy is gaining support for parsing/validating html structure and as such a number of patterns will start getting rejected by the parser.  This change fixes newly errant soy templates by:

* transforming '<' characters that are not part of html tags to '&lt;'
* inserting whitespace following tag names so that they are unambiguous
* changing templates not rendering html to kind="text" so html rules don't apply
* fixing control flow such that all tags (and quoted attribute values) are completely defined within a single control flow block.  In some cases this required extracting {let..} vars or whole templates and in others it required duplicating conditions.
* removing stray unmatched quote characters in html tags.
* fixing incorrectly written html comments

LSC: https://docs.google.com/document/d/18MLrX8kUVzYGe1dBaSfh1kcQ_1UB02QHOk4KZtvHkIc/edit#

Tested:
    $ blaze test //third_party/java_src/gtld/java/google/registry/flows:all //third_party/java_src/gtld/java/google/registry/tools/soy:all

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140475284
2016-12-06 11:52:46 -05:00
mcilwain
2b7d580bb3 Run buildifier on codebase to format BUILD files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140362453
2016-11-28 18:15:21 -05:00
cgoldfeder
f5d0de61f2 Fix bad javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140389732
2016-11-28 17:43:10 -05:00
cgoldfeder
bc491fda75 Remove useless status in DomainDeleteFlow
Domains can't have LINKED status.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140389416
2016-11-28 17:41:40 -05:00
nickfelt
aa670e5df2 Remove extraneous modules from FlowComponent
This change removes ConfigModule from FlowComponent, since it's already present in all of the standard components that serve as "parents" to FlowComponent (i.e. it's in FrontendComponent, BackendComponent, ToolsComponent, and EppTestComponent).  ConfigModule should only ever be included in top-level components, so that it's possible to swap it out without having to make changes deep within subcomponent code.

This change also removes SystemSleeperModule, which belongs at the top-level component as well, and is present in BackendComponent and ToolsComponent but was absent in FrontendComponent and EppTestComponent.  I've added it to those two places.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140053552
2016-11-28 11:38:02 -05:00
mcilwain
5eb9702f05 Improve ListDomainsCommand to list domains on multiple TLDs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140053423
2016-11-28 11:36:17 -05:00
ctingue
35d88a9f8c Rethrow exceptions in ExpandRecurringBillingEventsAction
Also fixes bug in handling of future-dated Recurring billing events.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140048357
2016-11-28 11:34:30 -05:00
jianglai
9a616ccd7f Add extensible custom logic to the domain renew flow
This also adds a TODO in DomainCheckFlow to document the fact that as-of date is not overridden when passed to the custom logic.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140031318
2016-11-28 11:32:47 -05:00
mmuller
ddacd33c5e Retry RDE report on SocketTimeoutException
It's likely that either 1) we should be doing this for more than a
SocketTimeoutException - we probably want to do this in the case of a number
of different transient failures 2) we don't want to do this at all because it
happens in a background task that will get re-run anyway.

In any case, this seems like the right fix and it addresses a problem we see
occassionally.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139935190
2016-11-28 11:31:16 -05:00
mcilwain
b3907d5d90 Add Javadocs to parameters for DomainCreateFlowCustomLogic methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139912059
2016-11-28 11:29:46 -05:00
jianglai
998dae33ec Add extensible custom logic to the domain update flow
This also adds beforeValidation hook to DomainCreateCustomFlow.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139828346
2016-11-28 11:28:16 -05:00