Commit graph

404 commits

Author SHA1 Message Date
Chris Povirk
5332ac4e4a Set compatible_with=appengine on GAE targets
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128475519
2016-08-02 19:09:11 -04:00
Greg Shikhman
6b5c00e143 Fix javadoc link to refer to correct annotation name
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128364461
2016-08-02 19:08:35 -04:00
Lai Jiang
c3e8ff7b21 Prevent orphan glue records from being published
When a domain refreshes, always delete all of its subordinate host
records and then add glue records for its in-bailiwick nameservers, if
the domain is in a publishable status. When a host refreshes, delete
its glue record (if any) and then refresh its superordinate domain. The
goal is to prevent A/AAAA records for hosts that are not used as
in-bailiwick nameservers from being published in the DNS.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128354008
2016-08-02 19:07:18 -04:00
Ben McIlwain
64a7aeda30 Tag Registrar.loadByClientId() with @Nullable
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128180138
2016-08-02 19:04:48 -04:00
Brian Mountford
64bcad3f21 Add XML support for new Flags EPP extension
For the .app discounting logic, we need a new extension which will let
registrars set, clear and query custom flags on a domain. Hopefully
this will be reusable for other custom TLDs later. This CL adds the
XSD, the associated classes for marshalling and unmarshalling, and some
marshalling tests, and links the classes into the system-wide extension
lists.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128178999
2016-08-02 19:03:26 -04:00
Chris Tingue
9c28534b64 Add --set_current_tld_state to UpdateTldCommand
This feature would have been useful earlier when I was changing the TLD
state on a sandbox TLD on-the-fly for testing purposes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128088578
2016-08-02 19:02:19 -04:00
ctingue
a3cade3e20 Add --set_current_tld_state to UpdateTldCommand
This feature would have been useful earlier when I was changing the TLD state on a sandbox TLD on-the-fly for testing purposes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128088578
2016-07-21 17:54:41 -04:00
Justine Tunney
e82a40a2fb Add WHOIS disclaimer text to ConfigModule
This fixes #23 for @parsoj by allowing a custom disclaimer to be
specified via dependency injection modules.

By making the disclaimer part of the dependency injection graph, it can
come from anywhere.

For example, if I was Donuts, I would have my own repository. I'd use an
external http_archive() repository for Domain Registry. Then I would
write my own Dagger @Component for each App Engine module. My Component
would have a list of Dagger Modules, which I copied from the Domain
Registry version. Then I would swap out ConfigModule with my own
DonutsConfigModule, which provides the same values.

So long as a method exists that @Provides @Config("whoisRegistry"), and
the module containing it is listed in the @Component, the dependency
injection graph becomes valid and complete for the whois package
(provided other dependencies are met.)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128082921
2016-07-21 14:55:38 -04:00
Brian Mountford
2c9567e183 Remove old DNS queue processing code.
The old DNS processing was performed by WriteDnsAction, which was invoked by the standard cron fanout action. The new code, which has been running for several months in production, uses ReadDnsQueueAction to do a custom fanout to PublishDnsUpdatesAction. We no longer need the old code, so it's time to remove it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127983115
2016-07-21 14:55:18 -04:00
Brian Mountford
b83b3b313f Support version 0.12 of the EPP Fee Extension
The corresponding version of the specification is 8.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127968603
2016-07-21 14:55:08 -04:00
Ben McIlwain
38e7b07c93 Remove the "mail" task queue
I can't find any remaining uses of it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127942602
2016-07-21 14:54:57 -04:00
Greg Shikhman
5522135f5a Change value type class to @AutoValue to fix errorprone warning
AutoValue classes by default do not allow null parameters, so I've removed the unnecessary null checks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127870611
2016-07-21 14:54:42 -04:00
Ben McIlwain
a879afa075 Delete the "export" task queue
Near as I can tell, it's no longer used by anything.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127863557
2016-07-21 14:54:12 -04:00
Brian Mountford
8443da5c5c Support multiple versions of the EPP Fee Extension
We want to support multiple versions of the fee extension, to allow new features while maintaining backward compatibility. This CL extends the framework and adds one new version, 0.11 (spec version 7), to the existing version 0.6 (spec version 3). A follow-on CL will add version 0.12 (spec version 8).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127849044
2016-07-21 14:53:50 -04:00
Wolfgang Meyers
ac6b147bf5 Add ContactResource import utility logic
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127765049
2016-07-19 10:48:47 -04:00
mountford
41817985ff RDAP: Implement new status codes
The RDAP community is adding new values to the list of valid status codes, so that all EPP status codes can map to corresponding RDAP ones. The RDAP code has been updated accordingly.

For more information, see https://tools.ietf.org/html/draft-ietf-regext-epp-rdap-status-mapping-01.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127718882
2016-07-19 10:45:06 -04:00
mountford
e72491e59b Replace to(Upper|Lower)Case with Ascii.to$1Case
The presubmits are warning that toUpperCase() and toLowerCase() are locale-specific, and advise using Ascii.toUpperCase() and Ascii.toLowerCase() as a local-invariant alternative.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127583677
2016-07-19 10:43:38 -04:00
mcilwain
71ab4a648b Handle nullness properly in some message/flow/poll code
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127543268
2016-07-15 14:58:57 -04:00
nickfelt
eed319990a Add top-level python directory to opensource repo
This adds a home in our opensource repo for python libraries and binaries,
under a top-level "python" directory.  Future CLs will relocate ICANN
reporting bits and pieces to new homes under this directory, and will use
the MOE configuration and python_directory_import rule defined here.

This approach is roughly modeled on the protobuf Bazel opensource project,
which also uses a top-level directory for various languages, and also uses
the "imports" parameter to exclude that directory in python module names:
  https://github.com/google/protobuf/blob/v3.0.0-beta-3/BUILD#L568
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127459882
2016-07-15 14:56:22 -04:00
Ben McIlwain
4ccc016e5c Disallow empty nameservers for domains in TLDs with whitelist
If a TLD has a whitelist on nameservers, domains in such TLD must have
at least one nameserver. Therefore creating domains with empty nameserver
is forbidden, as well as deleting the last nameserver on a domain. We
enforce this policy by checking the number of nameservers for the new resource
to makesure it is not zero if a whitelist exists.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127318320
2016-07-13 16:01:10 -04:00
mcilwain
aa2f283f7c Convert entire project to strict lexicographical import sort ordering
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127234970
2016-07-13 15:59:53 -04:00
ctingue
2caba95d28 Tidy up ExpandrecurringBillingEventsAction
Per nickfelt's suggestion on []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127193451
2016-07-13 15:58:34 -04:00
jart
7b9752c99d Forward declare namespaces only in JSDoc
Forward declares symbol. This is an indication to the compiler that the
symbol may be used in the source yet is not required and may not be
provided in compilation.

The most common usage of forward declaration is code that takes a type
as a function parameter but does not need to require it. By forward
declaring instead of requiring, no hard dependency is made, and (if not
required elsewhere) the namespace may never be required and thus, not be
pulled into the JavaScript binary. If it is required elsewhere, it will
be type checked as normal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127095620
2016-07-13 15:57:11 -04:00
mcilwain
0e511f0178 Remove regtype extension since we won't be using it
If we do end up needing it we can simply revert this commit.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127094676
2016-07-13 15:55:48 -04:00
mcilwain
cd23ece924 Rename TldSpecificLogicEngine to TldSpecificLogicProxy
This new name is a more accurate description of what the actual class
does.  TldSpecificLogicEngine is an interface that will be added in
the near future, implementations of which will provide custom per-TLD
logic.  The class being renamed is more properly a proxy that only
handles logic generic to all TLDs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127088913
2016-07-13 15:54:24 -04:00
ctingue
b74ab4bc27 Drop RegistryCursor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126937242
2016-07-13 15:53:00 -04:00
ctingue
458a673601 Remove cursor migration scrap tools
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126935942
2016-07-13 15:51:36 -04:00
mcilwain
3896dfbb4a Write list of iOS apps for IRDB to fetch to GCS
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126914056
2016-07-13 15:48:49 -04:00
ctingue
3dd342372e Add scaffolding for transfer in TldSpecific
For now, all transfer pricing = renew pricing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126914004
2016-07-13 15:47:25 -04:00
ctingue
262aab22b9 Add EAP fee to domain check flow
(Original from mmuller@: []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126911443
2016-07-13 15:45:59 -04:00
jart
5ebfb87651 Update Domain Registry to Closure Rules v0.2.3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126911095
2016-07-13 15:44:35 -04:00
Ben McIlwain
1ed77d5572 Fix a bug when updating a domain without changing its registrant
When updating a filed other than the registrant for a domain, a null
registratantContactId is passed to the registrant whitelist validator, causing
an excpetion because null is not an element in the whitelist (if it exists).
Added logic to handle null registrantContactId.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126817310
2016-07-13 15:43:13 -04:00
nickfelt
7cd125a7ab Downgrade truly minor TODO to a mere comment
It's not worth keeping a P4 bug open for this.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126731333
2016-07-13 15:24:35 -04:00
shikhman
aa1b5229a0 Create Stackdriver module and inject it into backend module
This adds Stackdriver as a DI module into the registry codebase. This is a
necessary prerequisite for using Stackdriver based monitoring. For now, I'm
only adding it to the backend module as it will be more work to add it to the
frontend module.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126730925
2016-07-13 15:22:19 -04:00
mcilwain
bb87b6e74f Remove outdated regtype comment
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126416855
2016-07-01 13:45:32 -04:00
mcilwain
38bd9d7b4d Add TldSpecificLogicEngine to open source release
It's now being depended on by other parts of the codebase.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126415327
2016-07-01 13:44:14 -04:00
ctingue
273fc0014d Add EAP fees to domain create flow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126411200
2016-07-01 13:42:58 -04:00
ctingue
d6bd2d56cd Return expiry date along with the EAP fee
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126407427
2016-07-01 13:41:38 -04:00
ctingue
9f731ba4d0 Clean up BaseFeeResponse.setFee() and call sites
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126229075
2016-07-01 13:38:57 -04:00
nickfelt
01698059f6 Fix flow double-init bug by removing @FlowScope on provideFlow()
See [] for details, but basically, @FlowScope causes the Flow instance produced by flowProvider.get() in FlowRunner to be the same each time it's called, which leads to the instance being re-used when a transactional retry (e.g. for a ConcurrentModificationException) causes a flow to be attempted more than once.  Flow is not meant to be re-used and certain flows fail at runtime when this happens, so the effect is that a CME now aborts most EPP requests, which is bad.

This is a bit of a hacky fix; finding a better one is tracked in []

== TESTING ==
This is very hard to test because there isn't really a clean way to trigger a CME from within a flow's execution without hardcoding in assumptions about what a given flow is doing when it runs, and we can't easily supply a custom Flow for testing while also exercising the Flow daggerization process (since this bug only appears due to the specific way that dagger constructs the Provider<Flow>).  Ideally a fix would improve the testability here as well.

For now, I've manually tested this change by pasting code into FlowRunner that explicitly throws a ConcurrentModificationException after running the flow (similar to DryRunException), but only on the first transaction attempt.  With @FlowScope on provideFlow(), this change reproduces the UnsupportedOperationException issue in many tests; once it's removed (i.e. with this CL submitted) the problem goes away.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126226066
2016-07-01 13:36:15 -04:00
ctingue
65f920594b Fix minor items on recurring billing expansion MR
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126060671
2016-07-01 13:32:17 -04:00
Ben McIlwain
372bf5718e Fix import to use canonical Preconditions package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125990307
2016-07-01 13:30:58 -04:00
Wolfgang Meyers
bdfa97b0ae Add XjcToContactResourceConverter
XjcToContactResourceConverter is, as it name suggests, an inverse of
ContactResourceToXjcConverter. This utility class is designed to
support the TLD data import feature.

EXTERNAL_REVIEW_URL=https://github.com/google/domain-registry/pull/19
GIT_AUTHOR=Wolfgang Meyers <wolfgang@donuts.co>
(With some minor changes by Ben McIlwain.)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125985714
2016-07-01 11:38:05 -04:00
Ben McIlwain
9eeb0c43a1 Change import to reference canonical implementation of checkArgument
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125984267
2016-06-27 16:48:41 -04:00
gak
a47cc2a85c Migrate @Provides methods to @Binds methods where possible.
@Binds is a much more efficient way to delegate one binding to another in that:
  * The @Binds method does not need to be invoked
  * It does not generate an additional Provider implementation
  * An additional Provider does does not need to be instantiated
Future changes to Dagger's component processor will add even further benefits.

More information: []

ATTENTION REVIEWERS: This migration is being done with global approval.  Per-project approval is not required.

Tested:
    TAP train for global presubmit queue
    []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125980758
2016-06-27 16:47:18 -04:00
nickfelt
a4091594d0 Add new JSON logging to FlowRunner for EPP activity reporting
We've been using the very fragile newline-delimited legacy logging
statement in FlowRunner for ICANN reporting for a long time.  While
this is bad in a few ways, the worst is that the parsing of this
logging statement is extremely fragile (e.g. adding/removing fields
can easily break the parsing).  This is in fact part of what broke the
ExportLogsServlet parsing last fall ([] and forced us to
recover by manually parsing the log statement (and its XML) in
BigQuery.  It also broke again in [] where we were relying
on matching the logging classname, since matching on 'EPP Command'
was considered insufficiently narrow.

This introduces a new JSON-format logging statement to FlowRunner
that fixes both of these problems:

 1) it replaces the newline-delimited "format" with a JSON-based
    format, so that we can add new fields much more easily and
    reliably support logging more structured data

 2) it replaces the short 'EPP Command' signature with a much more
    targeted 'EPP-REPORTING-LOG-SIGNATURE' signature so that we can
    use that alone for matching, rather than relying on the class
    name in the log message

What this doesn't fix is the fact that we still need to parse the
XML in BigQuery; we should fix this by logging the parts of the XML
that ICANN reporting needs explicitly, but that'll be a subsequent
change, since while the existing approach is gross, it's actually
much less fragile than just matching the log statement itself.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125902976
2016-06-27 16:45:55 -04:00
ctingue
14522eac0c Cut RegistryCursor over to global cursors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125797729
2016-06-27 16:44:35 -04:00
nickfelt
6fa1c2d91c Refactor SessionMetadata and TransportCredentials toString() methods
This cleanups up the toString() methods of all implementations of
these interfaces, as pre-work for adding tests against the legacy
logging statement in FlowRunner used for ICANN reporting, so that we
can validate against any changes to that log statement in the future.

It removes system hash codes since those aren't really safe to rely on
in test code and they really don't help with debugging anyway.  It
also standardizes SessionMetadata.toString() a bit and regroups
methods on that interface so all the getters are together.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125686039
2016-06-27 16:43:12 -04:00
Ben McIlwain
84eb3c8666 Upgrade apache_sshd CL #2: Update to v1_2_0
This changelist makes the newly added v1_2_0 the default and fixes incompatibilities
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125609347
2016-06-27 16:41:48 -04:00
ctingue
744648b5d3 Create scrap tool for deleting old RegistryCursors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125597754
2016-06-27 16:40:22 -04:00