Commit graph

91 commits

Author SHA1 Message Date
mcilwain
11da64bee2 Deny non-active registrars access to non-free EPP commands
Registrars that are PENDING or SUSPENDED should not have access to
EPP commands that cost money, as in either case it's not likely we'd
actually be able to get payment from said registrar. For this reason
we already prevented access to the domain create flow for non-active
registrars. This commit extends that to other commands that cost
money, including renewals, restores, and transfer requests.

Note that implicit autorenews will still occur for suspended
registrars, as in our point-in-time data model there's no good way
to prevent them. So when a registrar is suspended for non-payment,
the game plan is to get all of their domains transferred out to a
registrar that will pay as soon as possible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223173677
2018-12-03 19:10:45 -05:00
jianglai
3daf62a486 Remove the use of InjectRule in IdnLabelValidatorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217707263
2018-10-22 18:54:53 -04:00
mcilwain
f43125bb04 Add a RESERVED billing event flag for creates of reserved domains
This is an additional signal we can use for the billing/invoicing pipeline that
will be helfpul in targeting invoice rows that may need adjustment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217524250
2018-10-22 18:38:23 -04:00
mcilwain
1586813398 Bypass EAP fees for anchor tenants
Note that the check flow does not yet handle any kind of allocation token
handling at all. Step 2 will be to add allocation token handling there, so a
RESERVED_FOR_ANCHOR_TENANT or RESERVED_FOR_SPECIFIC_USE domain will show as
available instead of reserved if the right token is specified using the
extension. Then once that's done, we can use that information to adjust the
price accordingly as well.

Right now the behavior with a domain check is that reserved domains always show
as reserved, even if they're anchor tenants.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215599350
2018-10-08 16:59:29 -04:00
mcilwain
8ddbf88151 Remove the deprecated MISTAKEN_PREMIUM reservation type
It doesn't do anything that ALLOWED_IN_SUNRISE doesn't do, and there's no point
in having two separate types when we can simply keep track of the semantic
difference between the two by using different lists (as we have for .soy).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212997752
2018-09-14 21:28:23 -04:00
mcilwain
1b3df82fb3 Allow creation of reserved domains using allocation tokens
Unlike anchor tenants, these domains can be registered for any number of years,
but only during GA, as third parties cannot register domains pre-GA except
through the anchor tenant program.

Since this is new functionality, unlike creation of anchor tenants, there is no
fallback provided to send codes through the domain authcode; they must be sent
using the allocation token extension.

And note that, like with anchor tenants, providing the domain-specific
allocation token overrides any other reserved types that might apply to that
domain.

No changes are necessary to the domain application create flow because of the
above restriction to GA.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212310701
2018-09-11 14:17:08 -04:00
mcilwain
7b87ba41c7 Delete all Limited Release Program (LRP) code
We never used it and don't have any plans to use it going forward. All
conceivable parts of its functionality that we might use going forward have
already been subsumed into allocation tokens, which are a simpler way of
handling the same use case that are also standards-compliant.

Also gets rid of the hideous ANCHOR_ prefix on anchor tenant EPP authcodes
that was only ever necessary because of overloading the authcode for
anchor tenant creation. Going forward it'll be based on allocation tokens,
so there's no risk of conflicts.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209418194
2018-08-20 14:28:16 -04:00
mcilwain
d2f849ac0f Add new reserved domain creation from allocation tokens mechanism
Note that this gets rid of anchor tenant codes in reserved lists (yay!), which
are no longer valid.  They have to come from allocation tokens now.

This removes support for LRP from domain application create flow (that's fine,
we never used it and I'm going to delete all of LRP later).  It also uses
allocation tokens from EPP authcodes as a fallback, for now, but that will be
removed later once we switch fully to the allocation token mechanism.

This doesn't yet allow registration of RESERVED_FOR_SPECIFIC_USE domains using
the allocation token extension; that will come in the next CL.  Ditto for
showing these reserved domains as available on domain checks when the allocation
token is specified.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209019617
2018-08-20 14:22:06 -04:00
mcilwain
4b99fae1dd Properly handle NAME_COLLISION domains in start-date sunrise
Domains that are reserved with type NAME_COLLISION can be registered defensively
during sunrise only, but DNS can never resolve for them. Correspondingly, we
need to apply the SERVER_HOLD status for such registrations. We also send the
registrar a poll message informing them of this act.

This brings us up to feature parity with end-date sunrise (implemented in
DomainAllocateFlow), which already has all of this handling.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205277728
2018-08-10 13:44:25 -04:00
Ben McIlwain
658f31933c Add metrics for the new Check API
New metrics are necessary because the new API no longer wraps
an EPP flow, therefore does not get metrics for free.

Metrics include
 - An EventMetric for processing time
 - An IncrementableMetric for request count, with
   availability (available/reserved/registered) and
   pricing (standard/premium) fields

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199708592
2018-06-18 17:44:04 -04:00
Ben McIlwain
c61f36502e Add a new check API that does not wrap the domain check EPP flow
Copied class and test from CheckApiAction. All unit tests passing.

Remaining work: add metrics

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198916177
2018-06-06 15:05:30 -04:00
jianglai
e5538cfe35 Handle missing expected fee type in domain create
Also added a couple of more tests to make sure that we cover all edge cases.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195872013
2018-05-17 21:52:35 -04:00
jianglai
82ded21b9e Make EAP fee description check more flexible
Currently we determine fee type from the fee extension description by checking if the format string of the FeeType contains the description we received. The formatting string for EAP is "Early Access Period, fee expires: %s", so the fee description generated by a domain check command, like "Early Access Period, fee expires: 2022-03-01T00:00:00.000Z", is not recognized as EAP.

This CL adds the ability to add arbitrary extra description strings to the FeeType for a description to match against. It also changes the match to "the given description contains any of the strings from the list of format string plus extra description strings".

For EAP, we added an extra description string "Early Access Period", so any fee description that contains "Early Access Period" will be matched to EAP FeeType, including the specific description (that contains the expiry time) that we send in a domain check.

Also improved error message on multiple fee type matching.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194149162
2018-05-05 23:26:33 -04:00
mcilwain
ceed5bdd1c Make return value of ClaimsListShard.getClaimKey() Optional
It was nullable all along, but wasn't tagged as such, and thus it was
possible to misuse the method from its call sites.

Also adds an assertion about no NORDN tasks being enqueued in a failing
domain create test for a required signed mark.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187649865
2018-03-06 19:15:52 -05:00
guyben
24799b394d Allow the same LaunchPhase to be used for both start-date and end-date sunrise
Also changed the name of "verifyRegistryStateAllowsLaunchFlows" to "verifyRegistryStateAllowsApplicationFlows", because there are now launch flows that don't use applications (start-date sunrise).

Finally, added a test to showcase the "super-user" power that EPPs with Anchor Tenants have. There's no change in behavior in that regard in this CL - we just add a test to make it explicit.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187517199
2018-03-06 19:12:56 -05:00
mcilwain
ce136f9285 Add short-term host/contact caching for high-QPS domain mutations
After investigating common domain create/update command usage
patterns by registrars, we noticed that it is frequent for a
given registrar to reuse both hosts (using a standardized set of
nameservers) as well as contacts (e.g. for privacy/proxy
services). With these usage patterns, potential per-registrar
throughput during high volume scenarios (i.e. first moments of
General Availability) suffers from hitting hot keys in Datastore.

The solution, implemented in this CL, is to add short-term
in-memory caching for contacts and hosts, analogous to how we are
already caching Registry and Registrar entities.  These new
cached paths are only used inside domain flows to determine
existence and deleted/pending delete status of contacts and
hosts. This is a potential loss of transactional consistency, but
in practice it's hard to imagine this having negative effects, as
contacts or hosts that are in use cannot be deleted, and caching
would primarily affect widely used contacts and hosts.

Note that this caching can be turned on or off through a
configuration option, and by default would be off. We'd only want
it on when we really needed it, i.e. during a big launch.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187093378
2018-03-06 19:05:20 -05:00
mcilwain
cb80a0df1e Batch contact/host loads when checking pending delete
I'm actually surprised that we had this in our code, as it seems like a huge
oversight, but we were individually loading each and every referenced contact
and host during domain/application create/update/allocate flows. Loading them
all as a single batch should reduce round trips to Datastore by a good deal,
thus improving performance.

We aren't giving up any transactional consistency in doing so and the only
potential downside I can think of is that we're always loading all contacts/
hosts instead of only some of them, in the rare case that one of the earlier
contacts/hosts is actually in pending delete (which allowed short-circuiting).
However, the gains from only making one round-trip should swamp the potential
losses in occasionally loading more data than is strictly necessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186656118
2018-03-06 18:50:04 -05:00
jianglai
ff221fba96 Validate individual fee types
Currently we validate the fee extension by summing up all fees present in the extension and comparing it against the total fee to be charged. While this works in most cases, we'd like the ability to individually validate each fee. This is especially useful during EAP when two fees are charged, a regular "create" fee that would also be amount we charge during renewal, and a one time "EAP" fee.

Because we can only distinguish fees by their descriptions, we try to match the description to the format string of the fee type enums. We also only require individual fee matches when we are charging more than one type of fees, which makes the change compatible with most existing use cases where only one fees is charged and the description field is ignored in the extension.

We expect the workflow to be that a registrar sends a domain check, and we reply with exactly what fees we are expecting, and then it will use the descriptions in the response to send us a domain create with the correct fees.

Note that we aggregate fees within the same FeeType together. Normally there will only be one fee per type, but in case of custom logic there could be more than one fee for the same type. There is no way to distinguish them as they both use the same description. So it is simpler to just aggregate them.

This CL also includes some reformatting that conforms to google-java-format output.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186530316
2018-03-06 18:48:39 -05:00
guyben
b0cbc0f60d Add the START_DATE_SUNRISE phase
The START_DATE_SUNRISE phase allows registration of domains only with a signed mark. In all other respects - it is identical to the GENERAL_AVAILABILITY phase.

Note that Anchor Tenants bypass all checks, and are hence able to register domains without a signed mark.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185534793
2018-02-20 15:45:27 -05:00
mcilwain
98a61b8181 Add the ability to require premium fee acking for a registrar
When enabled for a registrar, all EPP operations on premium domains that have
costs (e.g.  creates, renews, transfers) will fail unless the EPP fee extension
is used to explicitly ack the amount of fee as part of the EPP transaction.

This ack is required regardless of whether premium fee acking is required at
the registry level. No data migration is necessary since false is the desired
default for this new attribute.

This CL also contains some slight refactoring of static utility methods used to
perform fee verification; there was short-circuiting at call-sites in two
places when what was really needed was two methods, one implementing additional
functionality on top of the other, and calling the inner method in the places
where short-circuiting had previously been necessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184229363
2018-02-01 22:07:11 -05:00
mcilwain
315e6d57bf Make EppInput.getSingleExtension() return Optional, not @Nullable
This makes it harder to use it incorrectly by accident.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181795813
2018-01-19 14:40:10 -05:00
mcilwain
ebfa27b3ad Require fee extension when registering domain in EAP
Failing to use the fee extension during EAP can result in charges to registrars
that are radically different than what they may have been expecting.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177597883
2017-12-01 22:14:06 -05:00
mcilwain
e2db3f914e Clean up some code quality issues
This removes some qualifiers that aren't necessary (e.g. public/abstract on interfaces, private on enum constructors, final on private methods, static on nested interfaces/enums), uses Java 8 lambdas and features where that's an improvement

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177182945
2017-12-01 22:14:06 -05:00
mcilwain
2aa897e698 Remove unnecessary generic type arguments
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175155365
2017-11-21 18:17:31 -05:00
mountford
326cf698e0 Don't validate RDAP nameserver names using validateDomainName
The nameserver may be external, in which case its TLD will not appear in our
list of valid TLDs, and the search will be rejected erroneously.

Tests for letter case canonicalizations also added at reviewer's suggestion.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171985702
2017-10-24 16:53:47 -04:00
mcilwain
c0f8da0c6e Switch from Guava Optionals to Java 8 Optionals
This was a surprisingly involved change. Some of the difficulties included
java.util.Optional purposely not being Serializable (so I had to move a
few Optionals in mapreduce classes to @Nullable) and having to add the Truth
Java8 extension library for assertion support.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171863777
2017-10-24 16:53:47 -04:00
mcilwain
5edb7935ed Run automatic Java 8 conversion over codebase
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171174380
2017-10-10 12:09:41 -04:00
mcilwain
1c4e79f99e Don't allow non-active registrars to create domains or applications
Specifically, this prevents suspended registrars from creating domains or applications. Pending registrars already can't perform these actions because they get an error message when attempting to log in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170481338
2017-10-04 16:16:45 -04:00
mcilwain
d73ef66352 Remove temporary handling of invalid billing events
The bad prober domain data has since been deleted, so we no longer need
to handle the case where these Keys point to entities that don't exist.

This mostly reverses []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168687701
2017-09-20 10:27:17 -04:00
larryruili
3809ff59a5 Filter cancellation records for only cancellable records
Previously, I would cancel all the records associated with HistoryEntry that's
available for cancellation. This could cause unexpected behavior if we
cancelled a historyEntry which itself had cancelled records (in effect we would
negate the negation unintentionally). This is easily remedied by only
cancelling records which want to be cancelled.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167204383
2017-09-12 15:51:50 -04:00
larryruili
16e8286dca Record domain transaction for domain transfers
This is the last of many cls adding explicit logging in all our domain
mutation flows to facilitate transaction reporting.

The transfer process is as follows:
GAINING sends a TransferRequest to LOSING
LOSING either acks (TransferApprove), nacks (TransferReject) or does nothing
(auto approve). For acks and autoapproves, we produce a +1 counter for GAINING
and LOSING for domain-gaining/losing-successful for each registrar, to be
reported on the approve date + the transfer grace period. For nacks, we produce
a +1 counter for domain-gaining/losing-nacked for each registrar.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166535579
2017-08-29 17:17:07 -04:00
larryruili
7ee8bc9070 Record domain transaction for domain deletes
This is the third of many cls adding explicit logging in all our domain
mutation flows to facilitate transaction reporting.

We add a +1 counter for either grace or nograce deletes, based on the grace period status of the domain. We then search back in time for DOMAIN_CREATE, DOMAIN_RENEW and DOMAIN_AUTORENEW HistoryEntries off the same resource that happened in their corresponding grace periods (5, 5 and 45 days respectively). All transaction records for these events are then given -1 counters to properly account for cancellations in the NET_CREATE and NET_RENEW fields.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166506010
2017-08-29 17:15:38 -04:00
bbilbo
e786c8d6ff Add better testing of domain and host creation using multi-part TLDs
Added validation on domain creation, preventing a domain from being created if
it equals an existing TLD. Added domain create tests for domains using
multi-part TLDs that shared suffixes and prefixes. Added host create tests for
hosts using multi-part TLDs that shared suffixes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164297749
2017-08-29 15:47:50 -04:00
mcilwain
d536cef20f Make Registrar load methods return Optionals instead of Nullables
This makes the code more understandable from callsites, and also forces
users of this function to deal with the situation where the registrar
with a given client ID might not be present (it was previously silently
NPEing from some of the callsites).

This also adds a test helper method loadRegistrar(clientId) that retains
the old functionality for terseness in tests. It also fixes some instances
of using the load method with the wrong cachedness -- some uses in high-
traffic situations (WHOIS) that should have caching, but also low-traffic
reporting that don't benefit from caching so might as well always be
current.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162990468
2017-08-01 16:58:59 -04:00
mcilwain
f5f383dc38 Temporarily add null handling for autorenew billing events
These shouldn't ever be null, but we have some bad data in production
for prober TLDs left over from the Registry 2.0 transition. Ignoring
null values here is required to finish cleanup for this old data, which
currently cannot even be deleted because it's throwing an NPE when
trying to update these values.

This commit will be reverted after the bad data is cleaned up, likely
sometime next week.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158546840
2017-06-14 10:36:13 -04:00
cgoldfeder
ae039aa0d8 Remove all vestiges of memcache
Memcache is already off but now it's not in the code anymore.

This includes removing domain creation failfast, since that is actually
slower now than just running the flow - all you gain is a non-transactional
read over a transactional read, but the cost is that you always pay that
read, which is going to drive up latency.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158183506
2017-06-14 10:28:24 -04:00
cgoldfeder
c9d7e75946 Cache Registrars in memory
This replaces the memcache caching, which we think is overall a bad idea.
We load all registrars at once instead of caching each as needed, so that
the loadAllCached() methods can be cached as well, and therefore will
always produce results consistent with loadByClientIdCached()'s view of the
registrar's values. All of our prod registrars together total 300k of data
right now, so this is hardly worth optimizing further, and in any case this
will likely reduce latency even further since most requests will be
served out of memory.

While I was in the Registrar file I standardized the error messages for incorrect
password and clientId length to be the same format, and cleaned up a few
random things I noticed in the code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156151828
2017-05-17 12:26:11 -04:00
cgoldfeder
f1129ea2b1 Make DomainInfoFlow (and application info) explicitly hit memcache
TESTED=For all tests, I added @Cache to DomainBase because otherwise the tests will
    fail. We aren't ready to do this in prod yet, which is why the tests have a TODO
    in them. The new tests fail if you change line 134 in Ofy to not use memcache
    and either use the unchanged original flow code, or use the new
    inlined code and change loadWithMemcache() to load(). They pass with the new
    inlined code that calls loadWithMemcache(), as long as the @Cache is added to
    DomainResource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154457655
2017-05-03 10:49:38 -04:00
cgoldfeder
9e61f1d6ef Make failfastForCreate for domain and application creates explicitly hit memcache
TESTED=For all tests, I added @Cache to DomainBase because otherwise the tests will
    fail. We aren't ready to do this in prod yet, which is why the tests are still
    marked @Ignore. The new tests fail if you change line 134 in Ofy to not use memcache
    and either use the unchanged original DomainCreateFlow code, or use the new
    inlined code and change loadWithMemcache() to load(). They pass with the new
    inlined code that calls loadWithMemcache(), as long as the @Cache is added to
    DomainResource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154224748
2017-04-26 11:16:33 -04:00
jianglai
87a9d27299 Remove domain create restriction check in non-create flows
Since domain create restriction only applies to closed TLDs, flows like domain application create and domain application update does not apply, as the TLD never goes through sunrise period. Removing checks for domain create restrictions in these flows.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152260673
2017-04-10 13:31:11 -04:00
mcilwain
b03bd3b525 Remove UNRESERVED as a reservation type
This is a follow-up to Lai's refactoring of the get reservation types
code to return a set rather than a single type. Since we're always
returning a set now, the more natural way to represent a label that is
not reserved is to return an empty set rather than a set containing
UNRESERVED.

Also fixes some minor style issues I ran across regarding static
importing and test method naming that I ran across (no logic
implications).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151132116
2017-03-27 13:31:33 -04:00
nickfelt
ec4ffe53f0 Clean up flow validation of registration periods
This tidies up some logic in the flows that checks registration periods, so that in the create flows we're consistently checking that the requested number of years is <= 10 right away (DomainCreateFlow was deferring it until very late, including after custom logic ran, for no good reason I can see).

It also refactors the validateRegistrationPeriod() overload used by DomainRenewFlow to take the newExpirationTime directly, and just check to ensure that it's >= to now.plusYears(10) (with leap-safety just in case).  This is a much simpler check than before, which recomputed the newExpirationTime separately from the logic used by DomainRenewFlow itself (always dangerous) and did a more convoluted and unnecessary comparison involving extendRegistrationWithCap().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151002960
2017-03-27 13:04:19 -04:00
jianglai
37440d6b29 Add nameserver validation in domain update related flows
When updating domains, make sure that if the domains are nameserver restricted, the updated nameservers set on the domains are still consistent with the restriction.

When updating domains of a domain created restricted TLD, validate if the domain is still on the reserved list with nameserver restricted reservation. If it is not, there's likely some conflicting states of the domain that needs to be reconciled (e. g.the domain is removed from the reserved list after being created). Throws an exception in this case.

Also added missing tests for TLDs with nameserver whitelist.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150781935
2017-03-27 12:58:19 -04:00
jianglai
620d698479 Add validation during domain creation for locked down TLDs
During domain create/applicationcreate/allocate, domains that are on the reserved list(s) with nameserver restricted reservation type must set nameservers that are part of the allowed nameservers for that domain in the reserved list(s) applied to that TLD.

Additionally a boolean is added to Registry to indicate if a TLD is restricting domain create. If it is, only domains that are nameserver restricted can be registered.

For consistency with a similar feature that validates a TLD-wide nameserver whitelist, the per-domain nameserver validation is performed even when the operation is in super-user mode. Similarly, if a domain is nameserver restricted, nameservers must be supplied (i. e. the nameservers set cannot be empty) when registering the domain.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150641269
2017-03-21 15:42:23 -04:00
nickfelt
70fbdccea2 Restrict domain transfer pricing to 1 year
This CL restricts domain transfer pricing lookups (on domain check and info) to
only support a 1-year period for inquiring about transfer fees.  That treatment
matches what we do for domain restores, which are also always one year.  This is
a followup to [] which disallowed actual transfer request flows from
specifying multi-year periods.

Since it's no longer necessary, this CL also changes the domain transfer pricing
logic to drop the years parameter, including removing the parameter from the
custom pricing logic TransferPriceParameters object.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150367839
2017-03-21 15:33:29 -04:00
jianglai
ebcdae7361 Return all applicable reserved list entries associated with a label
Instead of only returning the most severe one, return all applicable ones. This is because the reserved list has grown to a list of types that are not strictly comparable but orthogonal to each other. We can no longer depend on the fact that the most severe type incorporates all properties of those beneath it. Therefore returning all of them and treat them one by one in the calling site is the correct behavior.

Due to constraint imposed in eppcom.xsd, during domain checks the response can only contain a reservation reason of fewer than 32 characters, therefore we are returning the message for the type with highest severity, in case of multiple reservation types for a label.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149776106
2017-03-13 11:22:56 -04:00
ctingue
53262d82bb Add period restriction to domain flows
Specifically, Domain[Create,Allocate,ApplicationCreate]Flow

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147458283
2017-02-14 12:14:04 -05:00
Wolfgang Meyers
b9222759dc Refactor common domain transfer logic into a utility class
These methods will also be used for RDE imports (in a follow-up).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146955581
2017-02-08 17:42:51 -05:00
mmuller
b70f57b7c7 Update copyright year on all license headers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146111211
2017-02-02 16:27:22 -05:00
cgoldfeder
b0bcc1bb3d Create *InfoData objects instead of reusing *Resource objects
This is probably best from a code-cleanliness perspective anyways,
but the rationale is that tightly coupling the resources to the
info responses was a straightjacket that required all status
values and fields to be directly available on the resource. With
this change, I already was able to get rid of the preMarshal()
hackery, and I will be able to get rid of cloneWithLinkedStatus()
and most of the contents of cloneProjectedAtTime() for non-domains.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144252924
2017-01-12 14:11:51 -05:00