Commit graph

550 commits

Author SHA1 Message Date
ctingue
b29d11f0de Fix CreateLrpTokensCommand to not split lines on double-quoted comma
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137722530
2016-11-02 15:19:34 -04:00
mmuller
3928ccf03f Rename and reorder RegistrarAction
Rename RegistrarAction to RegistrarSettingsAction and reorder class contents
according to local style.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137554457
2016-11-02 15:19:34 -04:00
cgoldfeder
b3a166b0c4 Remove an unnecessary constructor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137539751
2016-11-02 15:19:34 -04:00
mountford
5f691d6329 Enable built-in session cleanup in alpha and sandbox
App Engine provides a servlet which deletes up to 100 expired _ah_SESSION entities from DataStore. This CL adds a cron job to call the servlet every 15 minutes in both alpha and sandbox. Assuming all goes well, we will turn it on in production.

I originally learned about this servlet here:

http://www.radomirml.com/blog/2011/03/26/cleaning-up-expired-sessions-from-app-engine-datastore/

But it appears that we do not need a servlet definition, just a cron entry.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137533532
2016-11-02 15:19:34 -04:00
mountford
78a36925f4 Remove commitAdditionalLogicChanges(), part 1
Now that the flows are flattened, the commitAdditionalLogicChanges() call, which used to come later in the flow to actually save the Datastore objects, is now happening right after the performAdditionalXXXLogic() call. So we can instead just do the saves in performAdditionalXXXLogic(), and get rid of the separate call. As a first step, this CL simply makes commitAdditionalLogicChanges() a private method that gets called internally by the extra logic manager. Later, we can move the saves into their proper position, affecting only the extra logic class itself.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137529991
2016-11-02 15:19:34 -04:00
mmuller
bbd20ec71d Convert RegistrarServlet to RegistrarAction
Convert to an action and remove ResourceServlet, JsonTransportServlet and
JsonTransportServlet, all of which exist only to support it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137519385
2016-11-02 15:19:34 -04:00
mmuller
2e4273c4f4 Genericize Google Drive Links
Replace the two drive links on the "contact us" page with values that can be
driven from the config.  The drive links are the link to the technical
documentation folder and the link to the registrar's transaction activity
reports.  The former is a straightforward static replacement, but the latter
is derived from a per-registrar Google Drive id which must be formatted using
a template from the config module.

Note: This currently requires adding the transaction activity URL template to
the old-style RegistryConfig class instead of the daggerized ConfigModule
because this is the easiest way to pass it though to the non-daggerized
RegistrarServlet.  In an upcoming CL, I'll convert RegistrarServlet to
RegistrarAction and then I'll be able to make this template injectable.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137518466
2016-11-02 15:19:34 -04:00
ctingue
c89a902b72 Add metadata parameters to CreateLrpTokensCommand
As part of this change, built out a KeyValueMapParameter from the existing TransitionListParameter in order to enable other Map types in commands (two of which are used in CreateLrpTokensCommand).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137476564
2016-11-02 15:19:34 -04:00
cgoldfeder
1dbc5f6bb0 Replace command.applyTo() with inlined builder operations
These are much easier to understand.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137446273
2016-11-02 15:19:34 -04:00
cgoldfeder
b84d7f1fb5 Remove LoggedInFlow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137444791
2016-11-02 15:19:34 -04:00
mountford
8b068250d6 Change DomainApplication to store period instead of year
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137426843
2016-11-02 15:19:34 -04:00
mountford
60cb1b4dfb Add extra flow logic hook for application create
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137396935
2016-11-02 15:19:34 -04:00
nickfelt
bc0116f3a0 Add EPP controller logging for XML unmarshalling failures
This will make it much easier to detect issues with bad EPP XML (e.g. the one in the loadtest action fixed in [] based on the request logs, since otherwise the only indication of what went wrong is the EPP response returned to the client, which we don't store anywhere.

Now we'll get log messages that look like this:

google.registry.flows.EppController handleEppCommand: EPP request XML unmarshalling failed - "Syntax error at line 2, column 7: cvc-elt.1: Cannot find the declaration of element 'epp'.": (EppController.java:59)
{"clientId":"CharlestonRoad","resultCode":2001,"resultMessage":"Command syntax error","xmlBytes":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI\/Pgo8ZXBwLz4K"}
========================================
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epp/>
========================================
google.registry.flows.EppXmlTransformer$GenericSyntaxErrorException: Syntax error at line 2, column 7: cvc-elt.1: Cannot find the declaration of element 'epp'.
	at google.registry.flows.EppXmlTransformer.unmarshal(EppXmlTransformer.java:89)
	at google.registry.flows.EppController.handleEppCommand(EppController.java:56)
	at google.registry.flows.EppRequestHandler.executeEpp(EppRequestHandler.java:37)
	at google.registry.flows.EppToolAction.run(EppToolAction.java:33)
        <snip>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137363446
2016-11-02 15:19:34 -04:00
ctingue
21c0b43af0 Fix missing LRP token during LRP period behavior
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137321673
2016-11-02 15:19:34 -04:00
nickfelt
1ac0832c79 Fix double-URL-encoding bug in LoadTestAction
This was inadvertently introduced in [] - the original code manually URL-encoded the XML, but the TaskOptions.param() method does that for you, so now we're double-URL-encoding the XML and as a result the actual /_dr/epptool invocation is failing with a syntax error (which was somewhat hard to diagnose, since it logs nothing and returns HTTP 200 in that case - to be fixed separately).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137321114
2016-11-02 15:19:34 -04:00
mountford
748dd34385 Save number of years in DomainApplication
Right now, DomainApplicationCreateFlow checks to make sure that the registration period is in years, but doesn't store it in the DomainApplication explicitly. Instead, when DomainAllocateFlow runs later, it goes back to the XML in the HistoryEntry to get the number of years. Corey suggests that it would be cleaner to store the number of years in the DomainApplication. This is stage one of a data migration; we store the value, but don't actually read it anywhere except in tests. If we have any outstanding domain applications, we will then need to write a scrap tool to populate the years field, after which we can start relying on the field.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137317739
2016-11-02 15:19:34 -04:00
ctingue
1b7cee61a5 Enable command name autocomplete for nomulus tool
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137299749
2016-11-02 15:19:34 -04:00
cgoldfeder
198558901d Remove old json logging from flows
This was meant for log replay and has long been ignored/useless.
As part of this, remove execution time from EppResponse since this
was the only thing consuming it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137293734
2016-11-02 15:19:34 -04:00
ctingue
5f8a95d853 Add additional LRP tests for non-application phases
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137292394
2016-11-02 15:19:34 -04:00
mountford
e40db46822 Add extra flow logic for Restore
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137191080
2016-11-02 15:19:34 -04:00
dxy
a4d78afd70 Rename CloudDnsModule to CloudDnsWriterModule for consistency
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137070028
2016-11-02 15:19:34 -04:00
mcilwain
e40b363612 Fix Bazel visibility rules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136887420
2016-10-24 11:57:00 -04:00
mcilwain
8e5bd45976 Fix bugs in load test action so that it actually works
This adds XSRF tokens so that the epptool request succeeds, adds better logging for debugging load test requests, adds better validation, and improves documentation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136885117
2016-10-24 11:57:00 -04:00
jart
2e81de9954 Make essential Bazel packages publicly visible
This allows separate Bazel projects to reference Nomulus as an external
repository. They can then copy the []
directory structure into their own project and customize the Action
and Module lists for the GAE modules in their own deployment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136863886
2016-10-24 11:57:00 -04:00
nickfelt
38a3d038c0 Change some Bazel deps back to earlier supported versions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136862675
2016-10-24 11:57:00 -04:00
mountford
aecca10989 Add additional specific PricingEngineProxy methods
We already had methods to return just the create or just the renew price. I added more to return just the premium flag or just the fee class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136833071
2016-10-24 11:57:00 -04:00
Wolfgang Meyers
4cfe107475 Add mapreduce for RDE hosts import
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136766682
2016-10-24 11:56:53 -04:00
mountford
fd1c68ffb9 Use TldSpecificLogicProxy to fetch renew price in DomainRenewFlow
The renew flow was still using PricingEngineProxy directly, meaning that it did not pick up on any TLD-specific pricing logic. Fixed this, and added tests to make sure.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136757922
2016-10-24 10:47:23 -04:00
ctingue
ae7933da57 Add RFC references to EppResource Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136747145
2016-10-24 10:45:45 -04:00
mcilwain
0b4c3e56d6 Temporarily revert phase two of migration away from ReferenceUnions
*** Reason for rollback ***

This code is fine, and I will be resurrecting it unaltered next week.  It's only being rolled back for operational reasons related to the timing of our internal pushes.

*** Original change description ***

Switch over to non-ReferenceUnion fields on DomainBase

This is the second phase of a three phase migration to remove
ReferenceUnions. As of the end of this phase, ReferenceUnions are no longer read
from in any active code paths, but are still written to in case a rollback to
the previous version is necessary. The third and final phase will remove the
ReferenceUnions entirely.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136642759
2016-10-24 10:39:22 -04:00
mcilwain
0f8e398c00 Fix ResaveAllEppResourcesAction to use the tools service
It's provided in ToolsRequestComponent, so it absolutely should be running on
the tools service. This was just a flat-out bug.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136630743
2016-10-24 10:37:49 -04:00
dxy
67ec725b63 Update an obsolete URL in the web console
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136608203
2016-10-19 13:09:57 -04:00
cgoldfeder
475203532e Flatten the domain and application create flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136601151
2016-10-19 13:08:33 -04:00
nickfelt
48e5a4423c Consolidate web.xml security constraints
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136472751
2016-10-18 12:10:08 -04:00
nickfelt
b1beefab4c Fix nomulus tool AppEngineConnection behavior
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136471276
2016-10-18 10:56:26 -04:00
nickfelt
afa4d66601 Remove final on @ParametersDelegate field
Compile-time constant inlining may interfere with JCommander's processing if a field is made final - @ParametersDelegate fields are particularly misleading.  Remove the one instance of that and add warning comments elsewhere.  See

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136469351
2016-10-18 10:37:33 -04:00
jianglai
cbe6d2b520 Resolve some deprecation warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136399461
2016-10-18 10:32:47 -04:00
ctingue
1f5a8d5542 Fix off-by-one issue in SheetSynchronizer
This doesn't change the end result of a successful run, though this is what a typical flow looks like prior to this fix:

Consider a sheet with 10 data rows (+ 1 header row = 11). A 10-row data set will call worksheet.setRowCount(10), which truncates the last row of the existing sheet. This row will eventually be added again in the last for loop, but if the synchronizer fails mid-sync, this last row will remain dropped. This fix will prevent this last row from being dropped.

This doesn't fix the broader issue of SheetSynchronizer not behaving transactionally -- that's a different can of worms.

See the linked bug for an instance where the synchronizer failed mid-run and dropped a data row as a result.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136398109
2016-10-17 18:06:43 -04:00
mcilwain
361a53a3c9 Switch over to non-ReferenceUnion fields on DomainBase
This is the second phase of a three phase migration to remove
ReferenceUnions. As of the end of this phase, ReferenceUnions are no longer read
from in any active code paths, but are still written to in case a rollback to
the previous version is necessary. The third and final phase will remove the
ReferenceUnions entirely.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136388057
2016-10-17 18:02:29 -04:00
ctingue
d9dbf2ec1a Fix spelling in Javadoc for SheetSynchronizer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136387503
2016-10-17 18:00:59 -04:00
mmuller
ebeded4c74 Use params from epp_session.js
Use bundled params instead of passing individual arguments through
epp_session.js.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136384801
2016-10-17 17:59:28 -04:00
mountford
f1ad34b12f Fix RDAP quirks uncovered during documentation
There's no reason not to allow a one-character search string when there are no wildcards. And the ROID validity pattern did not allow underscores, which was causing problems with our ROIDs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136256605
2016-10-17 17:53:18 -04:00
mcilwain
861fd60d2c Begin migration away from ReferenceUnions
It is important to get at least this one commit in before the public Nomulus
release so that none of our public users will have to go through this data
migration (although we will have to).

The migration strategy is as follows:

1. Dual-write to non-ReferenceUnion fields in addition to the current
ReferenceUnion fields in use, and add new indexes (this commit). Deploy.
2. Run the ResaveAllEppResourcesAction backfill [].
3. Switch all code over to using the new fields. Dual-write is still in effect,
except it is now copying over the values of the new fields to the old
fields. Switch over all BigQuery reporting scripts to use the new
fields. Deploy.
4. Remove all of the old code and indexes. Deploy.
5. (Optional, at our leisure) Re-run the ResaveAllEppResourcesAction backfill
[] to delete the old obsolete fields.

Note that this migration strategy is rollback-safe at every step -- new data is
not read until it has already been written out in the previous step, and old
data is not removed immediately following a step in which it was still being
read, so the previous step is safe to roll back to.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136196988
2016-10-14 17:52:01 -04:00
ctingue
3c36b6b928 Clean up billing MR work
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136196221
2016-10-14 17:47:46 -04:00
mmuller
84bbb9a7c0 Genericize "Contact Us" page
Parameterize integration, support and announcement email addresses and contact
phone number, make static parameters flow through the system in a consistent
manner.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136183813
2016-10-14 17:41:55 -04:00
ctingue
6a4088a8b6 Update Domain Registry maven dependencies
These are used to test our open-source build under the Kokoro Jenkins
environment ([]

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136182927
2016-10-14 17:40:24 -04:00
mountford
4b4a0cb1c1 Fix nomulus help anachronism.
list_hosts no longer differentiates between hosts by TLD.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136180967
2016-10-14 17:38:53 -04:00
mcilwain
6636e02d57 Clean up and consolidate some unused queues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136170276
2016-10-14 17:37:21 -04:00
nickfelt
e6ba5687b1 Migrate writeLockTimeout field out of DnsQueue
This makes the usage of DnsQueue.create() safer, since we're no longer
forced to hardcode a copy of the @Config("dnsWriteLockTimeout") value
within that method.  That value is only needed for leaseTasks(), which
is only called in one place (ReadDnsQueueAction), so we can just pass
it in from that callsite.

Also removes an unused overload of leaseTasks() that allowed specifying
a tag, which is a feature we no longer need.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136162491
2016-10-14 17:00:33 -04:00
cgoldfeder
17475fe7e8 Remove spurious @Nullable
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136160050
2016-10-14 17:00:33 -04:00