Commit graph

566 commits

Author SHA1 Message Date
cgoldfeder
ec73b5ec1c Minor comment fix
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138119838
2016-11-10 11:16:55 -05:00
mountford
994747a8e5 Enable built-in session cleanup in production
[] enabled the built-in App Engine session cleanup servlet in alpha and sandbox, and it appears to be deleting expired sessions at the expected rate of 100 every 15 minutes. So enable it for production as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138071390
2016-11-10 11:13:52 -05:00
cgoldfeder
8256120b3a Simplify the fee extensions.
I added shared base classes to all of the Fee extension types that
make it possible to fully ignore the version in the flows. (You
ask for a FeeCreateCommandExtension, for example, and you get one
without having to worry about which). This is an improvement over
the old code that asked you to provide a list of possible fee
extensions and then ask for the first one in preference order.

As part of this I was able to make the Fee implementation a bit
simpler as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137992390
2016-11-10 11:09:23 -05:00
cgoldfeder
2dd703ef3a Refactor authInfo validation
1) Don't do ofy().load() inside a model class (in DomainAuthInfo)
2) Move the one use of verify into the one caller in ResourceFlowUtils
3) Hosts don't support authInfo, so remove useless code

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137984809
2016-11-10 11:07:54 -05:00
mcilwain
f95f27ed72 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=137951076
2016-11-02 15:19:34 -04:00
jianglai
59d998954c Use correct <a> tag syntax in javadoc @see tag
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137946021
2016-11-02 15:19:34 -04:00
mcilwain
e7d3725f51 Revert change to Guava 20 until we get it working properly
*** Reason for rollback ***

This broke the Nomulus build.

*** Original change description ***

Update opensource Guava to version 20

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137945645
2016-11-02 15:19:34 -04:00
mcilwain
1627bd4975 Revert Guava 20 features until we get the build working properly
*** Original change description ***

Remove deprecated methods with Guava 20 release

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137945126
2016-11-02 15:19:34 -04:00
cgoldfeder
053538b1b5 Turn Flow into an interface and inject all its fields
This concludes your flow flattening experience. Please
fill out a flow flattening satisfaction survey before
exiting.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137903095
2016-11-02 15:19:34 -04:00
jianglai
82b0bff9b5 Remove deprecated methods with Guava 20 release
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137849843
2016-11-02 15:19:34 -04:00
ctingue
73e88b2391 Automated g4 rollback of changelist 137841045.
*** Reason for rollback ***

Not necessary for the time being (will do a more comprehensive update at a later date).

*** Original change description ***

Update errorprone to 2.0.14

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137844619
2016-11-02 15:19:34 -04:00
ctingue
883f194e0f Update errorprone to 2.0.14
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137841045
2016-11-02 15:19:34 -04:00
ctingue
83cbf5a01f Fix warnings nits from RegistrarAction rename
([]

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137833414
2016-11-02 15:19:34 -04:00
ctingue
a244202267 Update opensource Guava to version 20
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137832517
2016-11-02 15:19:34 -04:00
mmuller
fa05c82b11 Fix registrar settings method name
Fix RegistrarSettingsAction method name in FrontendComponent (this got left
behind in the rename CL).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137732524
2016-11-02 15:19:34 -04:00
mountford
da3e855b19 Add temporary @OnLoad to set period in DomainApplication
We are adding the registration period to DomainApplication. For the moment, add an @OnLoad which, if the period is missing, populates it from the EPP XML. This can be removed once we have resaved all applications.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137723098
2016-11-02 15:19:34 -04:00
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