Rename existingResource flows variable to be specific to EPP resource type and replace some explicit checks with helper methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133774229
Also consolidates the DNS refresh functionality in AsyncFlowUtils that was
being used by HostUpdateFlow into AsyncFlowEnqueuer.
TESTED=I threw together some batch scripts to create dozens of contacts on
alpha and then request their deletion, and the [] ran fine and
successfully deleted them in batches.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133714691
Currently EapFee is a separate class that has no inheritance from either
BaseFee and Fee. With this CL its functionality is merged into the Fee class
and the type of the fee can be identified by the FeeType enum in the Fee class.
Future custom fees can follow the same pattern.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133627570
We almost certainly had intended to record a String representation of the
numeric Code all along, but a bad toString() method on the enum resulted
in the wrong thing happening. This is more evidence of why overriding
toString() on enums is bad.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133583683
Because we cannot weed out deleted domains in the query itself, the RDAP code must pull all domains with matching names, then throw out the deleted domains. So we don't know how many domains to fetch up front to fill up the desired maximum result set size. This CL adds a loop to attempt to fetch addition domains if the first fetch did not yield enough, while giving up after a while to avoid bogging down the system.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133420297
Added support to specify custom effective date to run the fee check command.
Such functionality is useful for TLDs with creation price as a function of
time, such as those with EAP. However the implementation is not limited EAP or
create price check. Any fee check can specify a date, as long as its XML schema
supports a date.
Currently conforming to fee extension v12, subject to schema changes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133420255
This removes the countless lines of the form "[null, []]" in registry_tool diffs
that are an artifact of the way we handle nulls in Objectify.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133409440
It is a bad idea to override toString() on enums to return something other than
the actual name of the enum.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133318012
There's so little meat here that there's not much
reason to break this cl up any further
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133171754
This allows handling of N asynchronous deletion requests simultaneously instead
of just 1. An accumulation pull queue is used for deletion requests, and the
async deletion [] is now fired off whenever that pull queue isn't empty,
and processes many tasks at once. This doesn't particularly take more time,
because the bulk of the cost of the async delete operation is simply iterating
over all DomainBases (which has to happen regardless of how many contacts and
hosts are being deleted).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133169336
The RFCs are ambiguous.
5733 (contacts):
3.2.4. EPP <transfer> Command
...the
<transfer> command MUST contain a <contact:transfer> element that
identifies the contact namespace. The <contact:transfer> element
contains the following child elements:
...
- A <contact:authInfo> element that contains authorization
information associated with the contact object.
However, the xsd explicitly marks it as optional:
<complexType name="authIDType">
<sequence>
<element name="id" type="eppcom:clIDType"/>
<element name="authInfo" type="contact:authInfoType"
minOccurs="0"/>
</sequence>
</complexType>
The language in 5731 (domains) is [] The only example given in both is for a transfer request, which is the one flow that obviously requires the authInfo.
We had decided that for transfer approve and reject, which are done by the losing client, requiring the authInfo is silly because it's available to that registrar from an <info> and there's no extra security in having them present it (although if they do present it we validate it). The question about cancel was whether the gaining client, which had to present the authInfo in the original transfer request, needs it again for cancel.
I can't come up with any reason this would be beneficial, and I'm making the decision: authInfo is not required on transfer cancel.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133168739
Other flows to come. This removes the need for
most of the flows to inject the command at all.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133163030
Although the delta implies that this is actually adding code, it's
better than it looks, because some of the stuff in ContactFlowUtils
is duplicating more generic methods in ResourceFlowUtils, which
can be deleted when the domain and host flows are cut over.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133149104
This allows us to inject an optional once, in FlowRunner, and
inject a non-null value in the flows (not done yet, after this
goes in).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133130485
There was very little meat in the contact hierarchy and it
flattened quiet easily.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133080191
Command allows for both one-off creation and bulk import of assignees via file (the latter will be used for the initial import from Play Store).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133048360
The exceptions created for generic problems with the flags extension (invalid flag, etc.) should be in a common location, so they can be used by all interested TLDs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133040831
This factors out a huge chunk of boilerplate that
would otherwise be in every single flow.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133014837
By duplicating rather than moving them, I can keep both versions
around while I port the flows over to the new flat form.
I could have made these g4 moves from the original sources, but
there's barely anything in these files and it didn't really seem
like it was adding anything useful.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132999387
Specifically:
- remove @RequestScope from EppMetric since it's only for components
- fix to call the better overload of toBigqueryTimestamp
- use the same UUID provider for BigQueryMetricsEnqueuer that already exists for
the VerifyEntityIntegrityStreamer
- minor cleanup in VerifyEntityIntegrityStreamer (inject projectId vs whole env)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132721794
Getting rid of builder boilerplate makes my heart sing. Since we can no
longer @Inject the Builder() constructor, this change adds a provider
in WhiteboxModule that calls a special builderForRequest() factory method,
which gets passed a request ID and Clock and preserves the existing
EppMetric magic that sets the start and end time for you.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132714432
This disentangles GaeUserCredentials and UserService, which lets us remove a
bunch of hacky and brittle code from LoginFlowViaConsoleTest.
Previously, GaeUserCredentials was constructed for a user, but then was still
directly calling UserService to check if the user was an admin. UserService
can be adjusted in tests (via AppEngineRule / LocalServiceTestHelper) but it's
a pain, especially to do dynamically within a single test file. The hacky
code in LoginFlowViaConsoleTest was working around that restriction.
With this CL, you can pass into GaeUserCredentials whether the user is an
admin or not (for testing) or construct one directly from a UserService object
(for production, and for convenience in tests using an AppEngineRule user).
Note that I also changed EppConsoleAction to @Inject UserService.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132696391
This fixes the proximate cause of b/31380927 and makes alpha frontend usable
again.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132675121
While working on an implementation of TLD-specific logic, it was realized that the extra logic methods would need access to the flow's HistoryEntry, so that things like poll messages could be parented properly.
Also, the update flow had not been fixed to perform the fee check.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132561527
This CL enhances various domain flows (check, create, delete, renew, restore, transfer, update) so that they invoke the appropriate methods on the object implementing the TLD's RegistryExtraFlowLogic (if any). TldSpecificLogicProxy is also updated to invoke RegistryExtraFlowLogic proxy (if any) to fetch the appropriate price. The tests use a made-up extra flow logic object which can be attached to a test TLD to make sure that the proper routines are being invoked.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132486734
We were trying to set the scopes too early in the creation of a
GoogleCredential. They aren't yet known at this point in the code and should be
an empty collection (and also not null, which yields an NPE).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132477868
The latter is the canonical way to call it; the former is not available in
public Guava (and is just a pass-through to fromNullable anyway).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132441956
The default production value of 10,000 was unnecessarily large for testing
purposes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132441792
This DistributionFitter is suitable for tracking the latency of network calls.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132400538