Commit graph

76 commits

Author SHA1 Message Date
mmuller
e63351ec73 Sort flow docs by classname
This fixes non-determinism in the order of the generated classdocs, which
appears to be causing test failures for us now, presumably due to some subtle
environmental change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160296878
2017-07-10 11:25:16 -04:00
mountford
11e7374c0f Fix bug which allowed creation of hosts with superordinate domains in pending delete state.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154716883
2017-05-03 11:03:23 -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
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
ctingue
443e260f91 Disallow renaming of external hosts
EPP host spec section 3.2.5 requires that attempts to update hosts that are linked to different registrars must fail with error code 2305. This is complicated to do, as linked status is eventually consistent, and even more painful when checking links to those of different registrars.

This change forbids external-to-anything renames entirely.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150336754
2017-03-21 15:24:28 -04:00
nickfelt
e1c9395749 Simplify blocking of renews for domains in pending transfer
This tweaks the logic that prohibits domain renews during pending transfers to just use the regular verifyNoDisallowedStatuses() check instead of a special check on TransferData with a custom exception.  This is simpler and produces a better error message: we get "Operation disallowed by status: pendingTransfer" instead of "Object with given ID (foo.com) already has a pending transfer" (which is intended for use when denying a transfer request for an object already being transferred, not for this case).

For the record, we originally prohibited renews for domains in pending transfer because there's no good reason to do such a renew: b/12533793.  But in fact our transfer server-approve logic relies heavily on this behavior, because otherwise the domain's expiration time computed in cloneProjectedAtTime() will reflect the transfer year added to the post-renew expiration time, whereas all the transfer server approve entities (e.g. new autorenew billing event) will reflect the pre-renew expiration time at the moment the transfer was requested.  As such, it would be quite difficult to ever support a renew during pending transfer, since it would need to change many fields within the transfer server approve entities.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150325501
2017-03-21 15:21:28 -04:00
nickfelt
6a8b25360c Use StatusValue XML names in EPP error messages
This changes ResourceStatusProhibitsOperationException so that we print out the list of StatusValues using their XML names rather than the literal enum name, i.e. we use "pendingDelete" rather than "PENDING_DELETE".

This seems more correct given that EPP clients will be used to seeing the status values in the XML representation, and it also matches the existing ResourceHasClientUpdateProhibitedException that hardcodes "clientUpdateProhibited":
http://[]/third_party/java_src/gtld/java/google/registry/flows/exceptions/ResourceHasClientUpdateProhibitedException.java?l=22&rcl=146111211

Also reorganized related test methods and added some missing tests, including for ContactTransferRequestFlow which previously had none.  I also renamed the "clientProhibitedStatusValue" tests to instead say "statusValueNotClientSettable" to be clearer about what's being tested, and that it's not related to the "clientXXProhibited" statuses.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150248562
2017-03-21 15:14:02 -04:00
nickfelt
f28104ad03 Restrict domain transfer periods to 1 year
It turns out that this ICANN policy appears to prohibit transfers with
registration extensions other than 1 year (section A.8):
https://www.icann.org/resources/pages/policy-2012-03-07-en

This is backed up by the practical fact that we've never seen a registrar
request a transfer for any period other than one year.

And removing the support for multi-year transfers vastly simplifies
transfer logic and eliminates a bunch of annoying corner cases.  Users
still can achieve the same thing by doing a 1-year transfer plus a
manual renewal afterwards for the remainder of the desired extension.

This change leaves in place lots of infrastructure to support multi-year
transfers that is now obsolete (e.g. TransferData.extendedRegistrationYears).
This should all be cleaned up, but it's a lower priority than fixing the
gap itself and insulating ourselves against needing to handle any real
multi-year transfer case.  Once this CL goes in, we can start ignoring
extendedRegistrationYears entirely because it'll always be 1 year, which
makes the cleanup process easier.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150212864
2017-03-21 15:11:07 -04:00
cgoldfeder
9174855a47 Remove the ofy().load() inside of HostResource.cloneProjectedAtTime
In fact, completely eviscerate cloneProjectedAtTime (to be removed in
a followup CL) in favor of doing the projection of transfers and the
loading of values from the superordinate domain at call sites. This
is one of the issues that blocked the memcache audit work, since the
load inside of cloneProjectedAtTime could not be controlled by the
caller.

Note: fixed a minor bug where a subordinate host created after its superordinate domain was last transferred should have lastTransferTime==null but was previously reporting the domain's lastTransferTime.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149769125
2017-03-13 11:22:55 -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
mcilwain
9d9c527917 Reconcile FeesAndCredits handling in price customization
Also adds a mechanism to ensure that fee extensions are included when custom
pricing logic adds a custom fee, and fixes up the domain restore flow to
properly use the restore price.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142715136
2016-12-22 16:09:14 -05:00
mcilwain
3740171bbf Update create logic to ignore signed marks unless in sunrise
This addresses an issue where the existing logic assumed that the presence of a
signed mark means the current flow is a sunrise/sunrush request, when this isn't
necessarily true. It's safe to ignore signed marks in other circumstances.

This is a combination of work by Justin Graham <justin.af.graham@gmail.com>,
Nick Felt, and me (Ben). It is based on the original PR located at:
https://github.com/google/nomulus/pull/41

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140784461
2016-12-06 11:52:46 -05:00
mcilwain
9aa2f3b96e Make host flows only accept canonicalized host names as input
This now throws errors when a non-lower-cased, non-puny-coded, or non-canonicalized host name is passed in as an input parameter.

The approach we'll take is to first notify registrars which hosts we'll be renaming, then
issue EPP host update commands to effect those renames as superuser, then push this code
live to production.

This fixes #38 on GitHub.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138441130
2016-11-10 11:29:03 -05:00
mountford
baaaacd4f5 Add extra flow logic hooks for application delete and update
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138393251
2016-11-10 11:24:32 -05: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
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
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
cgoldfeder
049c636966 Add a missing verification to DomainApplicationUpdateFlow.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135712711
2016-10-11 11:27:53 -04:00
mcilwain
f9fe25f00a Use "Nomulus" name in documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135509458
2016-10-11 11:04:41 -04:00
mmuller
86d8f35f79 Reflow markdown flow documentation to 80 characters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135500481
2016-10-11 11:00:26 -04:00
cgoldfeder
a09d48a4a5 Decentralize how registry phase checks are done in flows
Very few flows actually check the phase. Push the checks down to the leaf
flows so that we can remove the inherited code from ResourceFlow and replace
it with utility methods. In the process, document and test two places that
throw the exception but did not previously test it.

This introduces a temporary hack in BaseDomainCreateFlow that does something
specific for DomainApplicationCreateFlow. It will go away literally tomorrow
when I flatten that flow.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135480538
2016-10-07 15:29:48 -04:00
cgoldfeder
886d6f8e17 Flatten the domain and domain application update flows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135282371
2016-10-07 14:34:06 -04:00
mmuller
35d5307706 Convert hyphen-bullets to asterisks in flows.md
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134817400
2016-10-03 16:18:30 -04:00
mmuller
ee5ebad832 Add flows.md to documentation directory
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134810786
2016-10-03 16:12:31 -04:00