Commit graph

4347 commits

Author SHA1 Message Date
mountford
c25cfa626b RDAP: Include remarks only in object classes
The APNIC conformance checker points out that, according to RFC 7483,
RDAP remarks should be included only as part of object classes such as
domains, nameservers and entities, not in help responses and so on.

Note that something is amiss here -- If RFC 7483 is read strictly, the
remarks boilerplate for domain, nameserver and entity search results
should appear not at the top level, as we currently do, but as part of
each constituent object. However, the conformance checker does not
seem to complain about that. So I have added this to the RDAP questions
list, and am leaving the boilerplate at the top level for now.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117557594
2016-03-23 22:38:08 -04:00
mcilwain
c8d655e416 Add ability to manually trigger contact group syncs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117549773
2016-03-23 22:38:08 -04:00
mcilwain
9f548674b7 Use fewer simultaneous connections to Directory API
Ten turns out to have been set too high; that will occasionally throw
500 Backend errors from the API (presumably having to do with
rate-limiting).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117549363
2016-03-23 22:38:08 -04:00
mountford
68c0f4647f RDAP: Add event records to responses
RFC 7483 defines a way to attach events (such as registration, renewal, etc.) to domains, nameservers and entities. The ICANN Profile calls out particular events: registration, expiration, last changed and last update. This CL implements all the ICANN-defined events except last update (defined to be the last update time of the database), which doesn't make so much sense in our system.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117546838
2016-03-23 22:38:08 -04:00
mcilwain
2293be4079 Automatically create mailing lists for registrars
This improves one of our gTech processes so they no longer have to remember to create Google Groups for a registrar after creating that registrar.

The ConfirmingCommand.verify() method is renamed to be more general purpose, so that it can do anything that follows naturally after a successful execution, such as creating Google Groups groups.

Minor refactoring is done around RegistryToolEnvironment handling for tests to make it more bullet-proof and general case.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117494277
2016-03-23 22:38:08 -04:00
nickfelt
5174c1c63f Improve RegistryToolEnvironment setup behavior
Here's an alternate approach that I think simplifies the existing
code quite a bit.  Now instead of doing:

  RegistryToolEnvironment.loadFromArgs(args);
  RegistryToolEnvironment.get().setup();

You just do one chained call:

  RegistryToolEnvironment.parseFromArgs(args).setup();

or call setup() on a known environment constant:

  RegistryToolEnvironment.ALPHA.setup();

This avoids having loadFromArgs() implicitly set the active env
(but *not* do setup) and then having setup() *not* set the active
env, both of which were confusing.  Now parseFromArgs() is only
responsible for parsing from args, and setup() both sets the env
as the active one and does the environment variable setup (which
also ensures that the RegistryToolEnvironment.instance field
doesn't get out of sync with the RegistryEnvironment value).

In addition, this CL adds a runCommandInEnvironment() method to
CommandTestCase and ensures that the UNITTEST environment is always
set before constructing the default command instance.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117492978
2016-03-23 22:38:08 -04:00
mcilwain
14c794aa45 Always clear ofy session cache in command tests
The previous code would not execute after failure tests that ended
with thrown exceptions, potentially causing issues with post-run
verification inside of tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117484219
2016-03-23 22:38:08 -04:00
mcilwain
99a50f7972 Remove EppResource.SharedFields following successful data migration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117412736
2016-03-23 22:38:08 -04:00
mcilwain
401df6c34a Set # of reducer shards on ExportDomainLists []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117403604
2016-03-23 22:38:08 -04:00
Justine Tunney
a31a626b16 Merge pull request #6 from wolfgangmeyers/java7-compatibility-fix
Make ForeignKeyIndex java 7 compatible
2016-03-16 21:26:52 -04:00
cgoldfeder
cd13aa8a96 Removes fixed TODO
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117278234
2016-03-16 21:20:25 -04:00
cgoldfeder
847dac792a Clean up duped servlets in web.xml files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117277821
2016-03-16 21:20:25 -04:00
mcilwain
702c5b9692 Annihilate the annihilator []
I am become Ben, annihilator of annihilators.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117275133
2016-03-16 21:20:25 -04:00
ctingue
d82ac03c8c Delete duplicate MR inputs files
This is cleanup from [] -- when I set up the hint, these files were recreated inadvertently. All other code is already fixed to use the classes in []/inputs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117270147
2016-03-16 21:20:25 -04:00
ctingue
77dd730400 Break out EppResourceInput subclasses
This frankenclass was starting to get a little cluttered, especially once I add the ChildEntityInput/Reader.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117266882
2016-03-16 21:20:25 -04:00
mcilwain
57fa57968d Rename Runnable classes from Tasks to Actions
This is cleanup relating to a naming decision that we made awhile ago
but never got around to.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117244827
2016-03-16 21:20:25 -04:00
cgoldfeder
5f7bf57cf9 Replaces uses of java.net.IDN with our Idn stand in class
java.net.IDN uses outdated IDNA2003. We've created a replacement
class that uses the modern UTS46 transitional standard via the
IDNA library. This fixes uses of IDN in the RDAP code.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117243868
2016-03-16 21:20:25 -04:00
jart
46e02c6bd1 Use rel="noopener" when appropriate
We're not vulnerable. But it's a good security practice.

https://mathiasbynens.github.io/rel-noopener/
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117240907
2016-03-16 21:20:25 -04:00
nickfelt
7e80b5646f Make Cancellation OneTime vs Recurring logic explicit
This CL does a very similar cleanup to Cancellation as the diffbase
does to GracePeriod - see []  It simplifes logic where we
used to overload methods to accept eitherw OneTime or Recurring billing
events refs, despite storing them in separate fields in the entity
(since BillingEvent is not a polymorphic superclass, just a Java-only
one, you can't store them as refs to BillingEvent).

That overloading was ultimately only there as a convenience/hack from
when we added Recurring events and didn't want to go back and change
everything.  It obfuscates what's really going on, requires extra
casting/loss of type-safety, and relies on indirect signals (e.g. the
Billing event reason being AUTO_RENEW) to guess what the right billing
event type is.  That latter aspect will likely no longer work in a
monthly billing world, and was brittle anyways (as came up in the
context of removing the AUTO_RENEW reason - see []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117165174
2016-03-16 21:20:25 -04:00
nickfelt
9786e6732f Make GracePeriod OneTime vs Recurring logic explicit
This CL cleans up some old crufy logic in GracePeriod that overloaded
methods to accept either OneTime or Recurring billing events refs,
despite storing them in separate fields in the entity (since
BillingEvent is not a polymorphic superclass, just a Java-only one,
you can't store them as refs to BillingEvent).

That overloading was ultimately only there as a convenience/hack from
when we added Recurring events and didn't want to go back and change
everything.  It obfuscates what's really going on, requires extra
casting/loss of type-safety, and relies on indirect signals (e.g. the
grace period type being AUTO_RENEW) to guess what the right billing
event type is.  That latter aspect will likely no longer work in a
monthly billing world, and was brittle in any case.

A coming CL will rip the same logic out of Cancellation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117164286
2016-03-16 21:20:25 -04:00
ctingue
d006506531 Drop unnecessary typecast in CidrAddressBlock
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117002905
2016-03-16 21:20:25 -04:00
jart
5d97f04ebe Automated g4 rollback of changelist 116996539.
*** Reason for rollback ***

Rollback --checks-only change

This isn't available in the open source release.

*** Original change description ***

Change --checks-only flag to --checks_only for consistency with other flags.

Tested:
    TAP --sample for global presubmit queue
    []
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117000962
2016-03-16 21:20:25 -04:00
nickfelt
f898d551e4 Remove unneeded type params in EppResourceInput nested classes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116997558
2016-03-16 21:20:25 -04:00
blickly
1685325d6d Change --checks-only flag to --checks_only for consistency with other flags.
Tested:
    TAP --sample for global presubmit queue
    []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116996539
2016-03-16 21:20:25 -04:00
Wolfgang Meyers
e97eb1eeef Make ForeignKeyIndex java 7 compatible
ForeignKeyIndex.java would not compile when building with bazel
and targeting 1.7. This change fixes the build issue.
2016-03-16 15:59:43 +00:00
jart
f2116093b1 Delete admin console
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116894352
2016-03-10 16:48:39 -05:00
jart
6772b2ef80 Move VerifyOteAction to tools/server
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116825910
2016-03-10 16:48:39 -05:00
jart
3eef39126d Add Registrar client ID to Braintree payment info
The client ID is passed as the "customer ID" to Braintree. In order for
this to work, someone needs to go into the Braintree website beforehand,
click on "New Customer" link, and create the customer record with a
matching ID.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116769955
2016-03-10 16:48:39 -05:00
mcilwain
dd633c9e72 Add [] to export domain lists to GCS
The ExportDomainListsAction [] has a cron entry that runs it twice per day.  It exports one flat text file per real (non-test) TLD to the "{project-id}-domain-lists" bucket in Google Cloud Storage, overwriting the existing ones in place.  Each file is a newline-delimited list of active (non-deleted) domains in that TLD.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116767987
2016-03-10 16:48:39 -05:00
jart
d6815fb55a Fix copyright header on repositories.bzl
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116688902
2016-03-10 16:48:39 -05:00
Justine Tunney
fc4333acc2 Merge pull request #1 from wolfgangmeyers/bazel-eclipse-file-generation
Eclipse file generation script
2016-03-09 15:48:29 -05:00
Wolfgang Meyers
3df31fa64f Eclipse file generation script
Simple python script to generate the .project and .classpath files
for eclipse. The script bundles all jar dependencies into a single
jar file, collects all auto-generated java files into a single
source folder and adds them to the eclipse classpath.
2016-03-09 12:26:47 -08:00
Justine Tunney
ce93c15b8c Merge pull request #2 from wolfgangmeyers/public-visibility-changes
Make additional targets publicly visible
2016-03-08 14:41:59 -05:00
jart
5b80d74988 Make external dependencies importable
This will make it easier for Donuts to do loose coupling of
repositories. Without this change, they would have to copy everything
from our WORKSPACE file by hand.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116674743
2016-03-08 14:18:03 -05:00
mcilwain
bee7f114fc Switch Google Groups to registry.google domain
Note that there is some configuration work necessary pre-push before this change will work.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116660866
2016-03-08 14:16:56 -05:00
mountford
7005a37b62 DNS Update: Change production cron job definition file to invoke the new readDnsQueue action
The new code pulls all pending update tasks, groups by TLD, and invokes PublishDnsUpdates for each group. It is running in Sandbox successfully, so we're going to try to move it to production. Both the old and new code have been in production for a while, so if there's a problem, we can revert just this CL to go back.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116546323
2016-03-08 14:13:26 -05:00
Wolfgang Meyers
cfe153e735 Make additional targets publicly visible
The admin console needs public visibility for additional targets.

//java/com/google/domain/registry/tools/params
 - Needed for the Whois test server
//java/com/google/domain/registry/whois
 - Needed for reusing WhoisHttpServer in the whois appengine module
//javatests/com/google/domain/registry/server
 - Needed for the Whois test server
2016-03-08 11:12:25 -08:00
jart
a063508b5b Make bazel build fully hermetic
We no longer reference @bazel_tools//third_party. All of our transitive
dependencies are now specified explicitly in our WORKSPACE file.

I also fixed the way that jar dependencies are exported, so we don't
break strict dependency checking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116421176
2016-03-04 21:13:06 -05:00
mountford
ab26b288c1 RDAP: Add boilerplate entries required by ICANN RDAP Profile
The ICANN RDAP Profile (dated 3 December 2015) requires certain boilerplate entries at the top level of the JSON object. Specifically:

1.4.4. The terms of service of the RDAP service MUST be specified in the
notices object in the topmost JSON object of the response. The notices
object MUST contain a links object [RFC7483]. The links object MUST
contain an URL of the contracted party providing the RDAP service.

1.4.10. An RDAP response MUST contain a remarks member with a description
containing the string “This response conforms to the RDAP Operational
Profile for gTLD Registries and Registrars version 1.0”.

1.5.18. A domain name RDAP response MUST contain a remarks member with
a title “EPP Status Codes”, a description containing the string “For
more information on domain status codes, please visit
https://icann.org/epp” and a links member with the
https://icann.org/epp URL.

1.5.20. A domain name RDAP response MUST contain a remarks member with
a title “Whois Inaccuracy Complaint Form”, a description containing
the string “URL of the ICANN Whois Inaccuracy Complaint Form:
https://www.icann.org/wicf” and a links member with the
https://www.icann.org/wicf URL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116389950
2016-03-04 16:25:25 -05:00
mcilwain
363c812d10 Change all uses of legacy sharedFields to use EppResource fields
This is the penultimate step of migrating away from sharedFields. The next step is to remove them entirely.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116364048
2016-03-04 16:24:19 -05:00
jart
675ec8f086 Remove repeated maven_jar()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116210057
2016-03-04 16:22:05 -05:00
jart
ddd45b22fb Give core registry libraries public visibility
This is so Donuts can create entirely separate Bazel repositories that
link against the Domain Registry codebase.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116182448
2016-03-04 16:20:50 -05:00
Justine Tunney
689c673a7c Add a 1-hour expiration to all Objectify memcache uses
This protects us from the edge case of potentially stale
memcache data due to a DeadlineExceededExeption, or possibly
from MemcacheServiceException. If memcache gets stale and
misses a write that went to Datastore, it will catch up in
at most one hour.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116174023
2016-03-04 16:19:40 -05:00
ctingue
8a68acb84d Fix style in DnsRefreshForHostRenameAction.java
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116165799
2016-03-04 16:18:25 -05:00
jart
6c6f70c24f Remove google_java_format dependency
This dependency is only needed by the internal version of Dagger, which
hasn't been rolled out to the public yet.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116097182
2016-03-04 16:13:57 -05:00
jakubvrana
1ecf3db5fc Use goog.dom.safeHtmlToNode instead of deprecated htmlToDocumentFragment.
goog.dom.htmlToDocumentFragment is going to be removed in [] It is removed because its usage can cause XSS.

More information: []

Tested:
    TAP --sample for global presubmit queue
    []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116081948
2016-03-04 16:12:49 -05:00
Justine Tunney
0ef0c933d2 Import code from internal repository to git 2016-03-01 17:59:16 -05:00