Commit graph

477 commits

Author SHA1 Message Date
mcilwain
ffcbdbf37b Set method to POST on actions called from cron fanout
The default is to support GET, which doesn't work with cron fanout which only
uses POST.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134284855
2016-09-26 13:50:03 -04:00
dxy
e0c93e5986 Add a command to generate zone data from zoneman
Zone files generated on GCS with this command will be used by a MR (to be implemented in a separate CL) for comparing zone data between zoneman and datastore.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134134401
2016-09-26 13:48:36 -04:00
cgoldfeder
afb2811704 Flatten the domain renew flow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134120002
2016-09-26 13:45:39 -04:00
mcilwain
afa6648cf7 Fix Java imports across entire codebase to be compliant
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134119822
2016-09-26 13:44:11 -04:00
nickfelt
c3723bfa2f Refactor GetEppResourceCommand hierarchy
This refactors the GetEppResourceCommand hierarchy a bit so that instead of
using the type param on the class to do implicit loading (which doesn't
work that well any more for domain applications anyway), we just do the
loading in each child class and rely on the parent class only for printing
and setting common flags.

I did this to make it possible for loadByForeignKey() to have strong typing
(in a future CL), but I think this changes stands on its own merits for
making the logic here more straightforward and actually somewhat shorter.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134115072
2016-09-26 13:41:14 -04:00
nickfelt
9dde013066 Clean up LoadAndResaveCommand
This refactors LoadAndResaveCommand a bit so that it's more straightfoward
and just switches on an enum to determine the resource type.  This has the
pro of actually making the command line flag friendlier anyway.

Also changed how it handles a non-existent (or non-active) resource so that
it throws an IAE rather than silently doing stageEntityChange(null, null).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134113671
2016-09-26 13:39:46 -04:00
nickfelt
0bc6e7b728 Tidy up RefreshDnsAction
This reworks the logic in RefreshDnsAction by factoring out a few
helper methods so the core logic is simpler and more straightforward.

Also added a couple tests to DnsInjectionTest that seemed worth having
for symmetry.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134110706
2016-09-26 13:38:14 -04:00
mmuller
1b4e73a50f Fix duplicate '/**' at the beginning of class javadocs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134109886
2016-09-26 13:36:45 -04:00
jianglai
de7fb7a202 Add type parameters to suppress Eclipse error message
Eclipse (with Guide) is bothering me very much that it cannot infer the intended
type for ImmutableList.of() from the argument type that the calling function
defines. Adding explicit type parameters to get rid of the annoying exclamations
marks in Eclipse.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134105086
2016-09-26 13:35:14 -04:00
cgoldfeder
8d4234090e Mark DomainDeleteFlow final like all the other flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134101058
2016-09-26 13:33:43 -04:00
cgoldfeder
dbb3977bcf Delete some of the old hierarchical flow files
These have already been totally replaced by flattened flows.
There are a few left that will get deleted when the remaining
flat flows go in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134077510
2016-09-26 13:29:46 -04:00
jianglai
add9474e9a Change EAP fee billing event reason to EARLY_ACCESS
The reason field is 1:1 mapped to skus in billing reports. Need to add a new reason for EAP for this type of billing event for reporting to work correctly. Also map that reason to the correct SKU.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134005364
2016-09-26 13:28:07 -04:00
jianglai
b783acfcc6 Support date and notAfter in fee extension response v12
When custom effective date is passed in the check command, the response should
contain that date as an acknowledgemant that the check is performed at a time
different from now.

Also when the fee(s) returned contains a validDateRange (i. e. EAP fees that
are only valid during a certain period), the response will contain a notAfter
field which is the date after which the quoted fee(s) are no longer valid. (i.
e. the earliest of the end dates of all fees that would expire.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133989775
2016-09-26 13:24:57 -04:00
cgoldfeder
863eac3b11 Flatten the domain delete flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133989378
2016-09-26 13:23:26 -04:00
cgoldfeder
096877f03e Unify two exceptions that mean the same thing
These were historically separate due to the old flow
structure, but now they should be one exception.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133984858
2016-09-26 13:21:54 -04:00
mcilwain
21a98b899c Replace loadByUniqueId() with methods that don't overload unique id
It is replaced by loadByForeignKey(), which does the same thing that
loadByUniqueId() did for contacts, hosts, and domains, and also
loadDomainApplication(), which loads domain application by ROID. This eliminates
the ugly mode-switching of attemping to load by other foreign key or ROID.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133980156
2016-09-26 13:20:22 -04:00
cgoldfeder
025a4ae012 Flatten the domain check flows
Also pull out a small bit of common functionality across contact and host checks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133977324
2016-09-26 13:17:04 -04:00
mountford
b5e421cee3 RDAP: Display summary data for search result items
It appears to be standard RDAP practice when returning result sets for domain, nameserver and entity searches to give only summary data for each result item. Any information that can be gleaned from the object itself is included, but related resources are not included. For a domain, for instance, the domain information is included, but nameservers, entities and events (which come from history entries) are suppressed. In their place, there is a standard boilerplate remark in the object indicating that only summary data is included, and that the user should query the item directly to get the full data. Note that summary data is used only for searches; direct queries for an item will still return full data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133973835
2016-09-26 13:15:31 -04:00
cgoldfeder
740d49e22e Contact authInfo should not be visible to all registrars in <info> flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133960014
2016-09-22 14:30:05 -04:00
mcilwain
4813ed392b Rename "clientIdentifier" to "clientId" almost everywhere
It's best to be consistent and use the same thing everywhere.  "clientId" was
already used in more places and is shorter and no more ambiguous, so it's the
logical one to win out.

Note that this CL is almost solely a big Eclipse-assisted refactoring. There are
two places that I did not change clientIdentifier -- the actual entity field on
Registrar (though I did change all getters and setters), and the name of a
column on the exported registrar spreadsheet. Both would require data
migrations.

Also fixes a few minor nits discovered in touched files, including an incorrect
test in OfyFilterTest.java and some superfluous uses of String.format() when
calling checkArgument().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133956465
2016-09-22 14:30:05 -04:00
cgoldfeder
0564bcdbc9 Add javadoc to contact/host flows and mark them final
Also make minor javadoc tweaks to domain transfer flows
to match what we are changing in contact/host flows.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133955677
2016-09-22 14:30:05 -04:00
cgoldfeder
a69fc769af Flatten the domain info flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133955573
2016-09-22 14:30:05 -04:00
cgoldfeder
1b34f1e326 Flatten the domain transfer flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133906420
2016-09-22 14:30:05 -04:00
Hans Ridder
2d46c7c27c Make RDE SSH key identity injectable
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133883090
2016-09-22 14:29:55 -04:00
Wolfgang Meyers
28eeda189d Add map reduce job for contact import
Some additional changes were made by Ben McIlwain.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133875824
2016-09-22 14:29:20 -04:00
cgoldfeder
aed3c0f0d0 Fix nits on flows:
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
2016-09-22 14:12:34 -04:00
cgoldfeder
df70da48a2 Minor cleanups in host flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133760258
2016-09-22 14:10:56 -04:00
mcilwain
2dcac3ca68 Cut over to batched async deletion for contacts/hosts
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
2016-09-22 14:08:14 -04:00
mcilwain
65ff6b45d1 Add documentation on poll messages and an outline of Code structure
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133713736
2016-09-22 14:06:32 -04:00
jianglai
77571e2063 Refactor Fee class to support EAP fee
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
2016-09-22 14:03:01 -04:00
cgoldfeder
0518f63aad []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133597433
2016-09-22 14:01:29 -04:00
mcilwain
b1e1dd0f47 Remove toString() method on Result.Code and fix metrics recording
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
2016-09-19 12:11:44 -04:00
mountford
aa2af68af0 RDAP: Add result set sizing logic for domain name searches
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
2016-09-19 12:10:14 -04:00
jianglai
743ff99ca3 Support custom effective date for fee check command
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
2016-09-19 12:08:46 -04:00
mcilwain
aa7c05cb8b Improve pretty-print diffing of Datastore entities
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
2016-09-19 12:06:54 -04:00
cgoldfeder
841be34d18 Nits in poll flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133345254
2016-09-19 12:05:08 -04:00
mcilwain
c6e9779af1 Fix Result.Code enum values to use UPPER_CAMEL naming
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133324460
2016-09-19 12:02:56 -04:00
mcilwain
823bdc721f Don't override toString() on enums
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
2016-09-19 12:01:21 -04:00
cgoldfeder
4a723576d5 Flatten and inject the poll flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133302791
2016-09-19 11:59:48 -04:00
mcilwain
c35de8144f Improve logging/reduce shard count on async deletion []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133280141
2016-09-19 11:56:37 -04:00
cgoldfeder
949a360f46 Inject clientId into LoggedInFlow
(take two)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133206842
2016-09-19 11:51:11 -04:00
cgoldfeder
516b5663a5 Flatten the hosts flows
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
2016-09-19 11:49:37 -04:00
mcilwain
00ea99960a Improve efficiency of async contact and host deletion with batching
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
2016-09-19 11:47:55 -04:00
cgoldfeder
75d9268ecd Resolve an old TODO by doing nothing
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
2016-09-19 11:46:14 -04:00
mcilwain
0afc83c8f9 Fix build by upgrading to latest version of AutoValue libs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133164502
2016-09-14 16:37:36 -04:00
cgoldfeder
65ef712f35 Inject targetId into contact flows
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
2016-09-14 16:37:36 -04:00
cgoldfeder
01e2e0141d Simplify the use of the fee extension a little
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133149148
2016-09-14 16:11:56 -04:00
cgoldfeder
1ee02108ae Crush out shared code in contact flows, especially transfer
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
2016-09-14 16:10:18 -04:00
cgoldfeder
3978b4f169 Get rid of @Nullable on the injected client id
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
2016-09-14 16:08:38 -04:00
cgoldfeder
99af33328d Flatten the contact flows
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
2016-09-14 16:07:02 -04:00