Commit graph

44 commits

Author SHA1 Message Date
mcilwain
bf068e61d9 Move the environment configuration YAML files into the main JAR
This allows configuration to work properly from the nomulus tool.

TESTED=I built and ran it against several environments, and all worked
properly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146697124
2017-02-06 16:46:52 -05:00
mcilwain
61230b035c Finish YAMLification of last necessary config values
There are still some options in RegistryConfig that can't be configured
in YAML, but it's not clear why anyone would need to change them from
their default values.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146482435
2017-02-03 12:37:38 -05:00
mcilwain
4031988409 Fix connection error in nomulus tool caused by YAML configs
This is a temporary work-around that fixes the tool for all of our
environments. Next up I'm working on a generalizable way to get this
working by adding some kind of configuration between environment name
and App Engine project ID. The current configuration system doesn't
quite work for that because it's all based on a separate config per
environment, whereas the tool needs to be able to access all
environments. Either we bundle all configs that currently go into
WEB-INF/ with nomulus and have it select based on the -e flag, or we
make it a separate configuration.

TESTED=I built and ran locally and was able to successfully run
commands against alpha, production, and sandbox.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146481850
2017-02-03 12:36:17 -05:00
mcilwain
8e9b2d3483 Convert Braintree configuration to YAML
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146477578
2017-02-03 12:34:52 -05:00
mcilwain
636da9f7f0 Convert yet more configuration options to YAML
With a particular focus on custom logic and caching.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146258446
2017-02-02 17:05:28 -05:00
mcilwain
a061f74ee7 Move more environment-specific settings into YAML configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146164592
2017-02-02 16:57:13 -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
Ben McIlwain
517e374925 Remove duplicate RegistryConfig code section from mangled merge 2017-01-30 16:55:33 -05:00
shikhman
37a4f389ef Fix incorrect description in javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145836628
2017-01-30 15:03:53 -05:00
shikhman
3f9c53b850 Refactor Stackdriver-over-REST specific code to a different package
Downstream users who use gRPC rather than REST don't want to pull down
rest-related dependencies.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145834701
2017-01-30 15:03:53 -05:00
jianglai
4fed3a9ae6 Daggerize ExportSnapshotServlet and CheckSnapshotServlet
Eradicate the last remnants of un-injectable servlets!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145598002
2017-01-30 15:03:53 -05:00
mcilwain
f647ea1190 Move registry policy settings and some others into YAML config
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145571850
2017-01-30 15:03:53 -05:00
mcilwain
efedc03d45 Move more configuration options into YAML config files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145452311
2017-01-30 15:03:53 -05:00
mcilwain
16f51f0a5c Add initial implementation of YAML config file
This implements the basic framework that allows global YAML
configuration, per-environment custom configuration, and unit-
test-specific configuration.

TESTED=I deployed to alpha, ran some EPP commands through the
nomulus tool, and verified no errors.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145422680
2017-01-30 15:03:53 -05:00
mcilwain
6c11ac5392 Move more configuration options into YAML config files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145452311
2017-01-25 12:25:54 -05:00
Justin Graham
bb3a0c78c5 Add framework for customizable WHOIS commands
With some additional changes by Ben McIlwain.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145447136
2017-01-25 12:25:49 -05:00
mcilwain
b5cf58bf2c Add initial implementation of YAML config file
This implements the basic framework that allows global YAML
configuration, per-environment custom configuration, and unit-
test-specific configuration.

TESTED=I deployed to alpha, ran some EPP commands through the
nomulus tool, and verified no errors.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145422680
2017-01-25 12:25:05 -05:00
mcilwain
a28e0b3ff7 Use enum instead of boolean for TMCH CA mode
Also more narrowly scopes a catch block in TmchCertificateAuthority.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144744847
2017-01-18 11:11:35 -05:00
mcilwain
9f142c6767 Remove the util package's dependency on the config package
This allows us to use util methods from within config, which is a useful thing
to be able to do for, e.g., being able to log errors while loading configuration.
It makes sense that the util package should be at the very base of the
class inheritance hierarchy; config seems logically higher than it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144324273
2017-01-12 14:14:51 -05:00
mcilwain
eaec03e670 Move ConfigModule and LocalTestConfig into RegistryConfig
This is the final preparatory step necessary in order to load and load
configuration from YAML in a static context and then provide it either via
Dagger (using ConfigModule) or through RegistryConfig's existing static
functions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143819983
2017-01-09 12:01:09 -05:00
mcilwain
d3397e991e Remove the old RegistryConfig paradigm entirely
We are now ready to begin configuration using YAML, mediated by ConfigModule.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143818507
2017-01-09 12:01:09 -05:00
mcilwain
c5c74961bb Make all but one field on RegistryConfig static
The next step will be to get rid of RegistryConfig descendants and RegistryConfigLoader entirely.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143812815
2017-01-09 12:01:09 -05:00
mcilwain
25a8bbe890 Deprecate more fields in RegistryConfig
This primarily addresses issues with TMCH testing mode and email sending utils.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143710550
2017-01-09 11:59:04 -05:00
mcilwain
c35c3a678b Change commit log bucket counts in tests
I'm setting it to three buckets across all tests, because the default one bucket
wasn't realistic enough, and allowed some tests to pass that shouldn't have,
essentially by accident.

This also changes RegistryConfig from being an interface to being an abstract
base class. The medium term goal here is to have it be a static class so that it
can provide fields from the YAML-derived POJO in situations where Dagger
injection isn't feasible.

The expected end state is as follows:

default-config.yaml -- The master config file that provides defaults for all
values.

nomulus-config.yaml -- A per-environment config file that overrides the defaults
from the previous file.

YamlConfig.java -- The POJO that the aforementioned YAML files are deserialized
into.

RegistryConfig.java -- Contains a static, memoized instance of YamlConfig and
provides static methods for getting some of those values.

ConfigModule -- Will become a static inner class of RegistryConfig, using Dagger
to provide most of the fields from the memoized YamlConfig instance. This way,
all configuration will be coming from a single place: RegistryConfig.java.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143567288
2017-01-09 11:59:04 -05:00
mcilwain
0b112f17a7 Move ROID suffix handling from RegistryConfig to ConfigModule
This is the first in a decently long series of commits to delete RegistryConfig
entirely and centralize all configuration in ConfigModule using Dagger. Once
this is done, then the text-based YAML configuration work can begin in earnest.

Note that the configuration settings from TestRegistryConfig will be moving
into ConfigModule.LocalTestConfig. This way they can be referred to in a static
context from test and test utility helpers, rather than having to be injected
everywhere, which we don't typically bother with for tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143473089
2017-01-09 11:59:04 -05:00
mcilwain
d1d6539694 Fix Javadoc typo in RegistryConfig
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141318009
2016-12-07 15:19:43 -05:00
mcilwain
10f86d241a Remove documentation project title config option
Nothing in the Nomulus release was using it and it's of questionable utility at
best. Nomulus isn't likely to be renamed at this point anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141301871
2016-12-07 15:19:43 -05:00
ctingue
fab8ca8414 Move injectable config values into ConfigModule
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138903917
2016-11-15 10:58:20 -05:00
ctingue
83cbf5a01f Fix warnings nits from RegistrarAction rename
([]

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137833414
2016-11-02 15:19:34 -04:00
mmuller
bbd20ec71d Convert RegistrarServlet to RegistrarAction
Convert to an action and remove ResourceServlet, JsonTransportServlet and
JsonTransportServlet, all of which exist only to support it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137519385
2016-11-02 15:19:34 -04:00
jianglai
d355aebe01 Fix a few incorrect mentions of Nomulus
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136079699
2016-10-14 17:00:32 -04:00
jianglai
71d7a382f3 Change all references to Domain Registry to Nomulus
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136068582
2016-10-14 16:58:07 -04:00
shikhman
f76bc70f91 Preserve test logs and test summary output for Kokoro CI runs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135494972
2016-10-14 16:57:43 -04:00
mcilwain
3b02d77ceb Rename 'registry_tool' to 'nomulus'
This changes everything with external visibility beyond the codebase
(i.e. the name of the compiled binary and the documentation that refers
to it). It does not change a lot of things internal to the codebase,
i.e. the "RegistryTool" class didn't change its name. We can rename that
in a subsequent CL if we want to.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135022087
2016-10-04 09:59:54 -04:00
mcilwain
d853e59c7f Cut over to batched DNS refreshing on host renames
TESTED=I deployed it on alpha, renamed some hosts, and verified that
the [] ran as expected.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134991941
2016-10-03 16:42:24 -04:00
mcilwain
1dcc5e5cc6 Remove non-batch async contact/host deletion actions
They have been superseded by DeleteContactsAndHostsAction.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134424453
2016-10-03 15:47:58 -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
Wolfgang Meyers
d3d33ccfdc Add escrow file import validation logic
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129116064
2016-08-02 19:22:30 -04:00
Justine Tunney
3f471a32e2 System property loader for RegistryConfig
This change allows registries to customize the values returned by
RegistryConfig methods without needing to edit Domain Registry code in a
forked repository. This is accomplished by defining a custom
RegistryConfig implementation and specifying its name as a system
property in appengine-web.xml.

This change also open-sources the production configuration values that
Google has chosen to use for these methods. TestRegistryConfig was
hitherto used for production configuration in the open source world,
which is misleading and inappropriate, considering it tunes values such
as the number of commit log buckets to 1.

Another important benefit of this change is that it helps registry_tool
work out of the box in the open source world.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129022675
2016-08-02 19:17:19 -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
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
Wolfgang Meyers
c83a0c4d95 Add configurable escrow file import GCS bucket
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123760355
2016-06-06 13:31:10 -04:00
Michael Muller
c458c05801 Rename Java packages to use the .google TLD
The dark lord Gosling designed the Java package naming system so that
ownership flows from the DNS system. Since we own the domain name
registry.google, it seems only appropriate that we should use
google.registry as our package name.
2016-05-13 20:04:42 -04:00
Justine Tunney
5012893c1d mv com/google/domain/registry google/registry
This change renames directories in preparation for the great package
rename. The repository is now in a broken state because the code
itself hasn't been updated. However this should ensure that git
correctly preserves history for each file.
2016-05-13 18:55:08 -04:00
Renamed from java/com/google/domain/registry/config/RegistryConfig.java (Browse further)