Commit graph

779 commits

Author SHA1 Message Date
cgoldfeder
b71e47a4fb Javadoc fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146160470
2017-02-02 16:48:54 -05:00
cgoldfeder
7ea3db8980 Fix an annoying Javadoc nit
Even though the outer class is imported, a Javadoc reference to
a nested class needs to be fully qualified (or imported on its
own, which our style guide prohibits).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146160210
2017-02-02 16:47:28 -05:00
cgoldfeder
50c5f856a2 Document StatusValue better and add per-resource restrictions
This generalizes the "LINKED can't be anywhere" idea into more
targeted restrictions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146158204
2017-02-02 16:46:02 -05:00
cgoldfeder
ddffbb0b61 Remove unnecessary filter on LINKED
We already have an @OnLoad in EppResource that removes LINKED
from any status values, so there's no reason to filter in info.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146146501
2017-02-02 16:41:39 -05:00
cgoldfeder
e15f75854f Remove empty method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146146386
2017-02-02 16:40:10 -05:00
mmuller
ecbe2662ac Convert request factory components into a module
Move all of the code to create the request factories into
RequestFactoryModule.  Also add the --force_http_connection flag to allow us
to force the use of HTTP connections instead of HTTPOverRPC for our internal
connections.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146116640
2017-02-02 16:35:36 -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
565497a6d4 Change DomainInfoFlowCustomLogic to use the new resData objects
Warning: This is a breaking change to custom logic for domain info.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146033749
2017-02-02 16:23:41 -05:00
Ben McIlwain
517e374925 Remove duplicate RegistryConfig code section from mangled merge 2017-01-30 16:55:33 -05:00
mcilwain
813f837956 Re-add Stackdriver metrics code
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146000275
2017-01-30 15:03:53 -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
a8aeff96f6 Ignore empty custom configuration YAML files
We're shipping default custom configuration files that only contain a
comment, so the system should work in that case the same as if the file
didn't exist at all.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145594737
2017-01-30 15:03:53 -05:00
cgoldfeder
0b1781b110 Make LINKED into a virtual status value
* Remove LINKED when loading an EppResource
* Enforce that you can't add it to a resource
* Ignore LINKED on xjc import of contacts and hosts

After running ResaveAllEppResourcesAction we will no
longer have persisted LINKED statuses in datastore.

In the process of writing this I discovered that RDAP
treats LINKED like any other status value and returns
the persisted value rather than the derived one. Since
this is an existing bug and is orthogonal to the changes
in this CL, I am addressing it in a separate CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145585227
2017-01-30 15:03:53 -05:00
cgoldfeder
4a730e0c9e Handle LINKED correctly in RDAP
LINKED is a virtual status that needs to be computed on the fly
when creating an RDAP response.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145583415
2017-01-30 15:03:53 -05:00
cgoldfeder
8071a1bdb5 Remove buildWithoutImplicitStatusValues
This was used in DomainInfoFlow to return a DomainResource with no
nameservers without making INACTIVE show up. It was nominally used
in DomainApplicationInfoFlow for the same reason, but that's just
an artifact of the old flow hierarchy since applications never have
INACTIVE set anyways. In either case, now that we have the DomainInfo
return object instead of returning DomainResource directly from the
flow, it's better handled within the flow.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145582317
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
shikhman
9adfd7a353 Switch PO number for Google Domains for 2017
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144764336
2017-01-30 15:01:35 -05:00
mcilwain
579e4cb74e Remove TLD parameters from WHOIS command factory methods
The small efficiency increase in not having to look up the TLDs again
did not justify making the externally extensible API more complicated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145465971
2017-01-25 12:25:54 -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
mcilwain
124011a8ce Add Optional types to fix Java 7 WHOIS build breakage
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145452302
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
shikhman
d3fe6be385 Remove ECatcher from GAE code
It's superceded by Stackdriver Trace.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145440930
2017-01-25 12:25:41 -05:00
cgoldfeder
78c07c0ebd Remove an unused parameter in DomainApplicationInfoFlow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145435546
2017-01-25 12:25:41 -05:00
Justin Graham
f3388326d6 Add FlowMetadata (containing isSuperuser) to custom flow logic
This also bypasses signed mark validation during domain creation if
the flow is being executed as superuser.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145435268
2017-01-25 12:25:34 -05:00
cgoldfeder
d5160213e5 Get rid of cloneWithLinkedStatus
Now that we return an Info object rather than the resource itself,
there's no reason for the cloning pattern.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145426484
2017-01-25 12:25:05 -05:00
cgoldfeder
2bb61b82f4 Simplify the logic for checking for finding linked contacts/hosts.
This is preparatory refactoring for the next CL, which gets rid
of cloneWithLinkedStatus

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145424322
2017-01-25 12:25:05 -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
cgoldfeder
15ba52988b Remove LINKED from the disallowed statuses for contact/host delete
LINKED is supposed to be a virtual status that gets added/removed
when needed. It's mistakenly been persisted to datastore on many
resources, but the persisted value is meaningless and may not
represent reality at all. There is no reason to check for LINKED
status before kicking off a delete, since the smoke test and
[] will catch all actual linked objects, and the LINKED
status can be causing false positives for objects that are no
longer LINKED.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145422457
2017-01-25 12:25:05 -05:00
Ben McIlwain
d16971c34f Migrate away from deprecated Executor method
Among the Futures methods that run user callbacks, those that don't take
an Executor will be deleted.  This CL migrates them to the counterparts
that take MoreExecutors.directExecutor() as such Executor in the
parameter list, exactly the way that the old method works.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145358533
2017-01-25 12:21:13 -05:00
nickfelt
be4c62ccf1 Make BigqueryCommand use application default creds
This fixes a long-standing bug b/26016322 to move BigqueryCommand off of using a service account to access the Bigquery API.  It's now using Application Default Credentials, which can be easily auto-installed on a machine by running 'gcloud auth application-default login' and clicking through the OAuth consent screen.

The old method was a pain because:

1) individual users of the tool each needed to know to download and store a private key for the service account, and specify the key file via a CLI flag
2) BigQuery actions taken via the tool (e.g. load or query jobs) were listed as belonging to the service account, making them harder to find in the UI or for debugging, and difficult to audit (no idea which engineer invoked the tool)
3) within Google, this meant extra whitelisting headaches

The new method also isn't perfect because Application Default Credentials obtained via gcloud are supposed to be used primarily for local testing, and don't support setting any custom scopes.  However, we don't need custom scopes for this, and the smoother flow is worth it.

In the longer term, once the CLI is using OAuth to talk to the app itself, we'll be able to switch to the "best practice" option of also using those credentials for talking to the BigQuery API.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145120770
2017-01-25 12:21:07 -05:00
ctingue
0c2b1d1b32 Filter synthetic OneTimes from billing SQL
Fix [] this filter was in the incorrect place.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144875580
2017-01-25 10:46:09 -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
8b61dcc6d0 Remove RoidSuffixes entirely
We no longer care about ROID suffix uniqueness in a post-Registry-2.0-migration
world, and the Registry cache is sufficient for efficiently grabbing the ROID
suffix for TLDs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144483726
2017-01-18 11:08:21 -05:00
ctingue
07010150b0 Remove PurgeSyntheticBillingEventsAction
Effectively a revert of [] now that synthetic billing events have been verified in production.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144473744
2017-01-18 11:06:44 -05:00
ctingue
f30b87d40e Add ExpandRecurringBillingEventsAction cron job
Note that this merely starts this MR on a daily schedule -- the billing queries that ultimately consume the synthetic OneTime events are filtering out the events at this time, so we're still relying on query-time expansion of Recurrings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144450565
2017-01-18 11:03:32 -05:00
mcilwain
8f8d67a17b Inject the BigQuery streaming metrics queue
This makes local development easier by allowing a stub to be injected for the
queue.

Based on Justin Graham's PR: https://github.com/google/nomulus/pull/51

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144439454
2017-01-13 10:29:36 -05:00
mcilwain
f7e84b56a0 Relax uniqueness constraint on ROID suffixes
The command still enforces uniqueness (which is fine), but by changing the cache
from a BiMap to a Map, we can support non-unique suffixes if they happen to be
configured as data. The only reason the cache was ever a BiMap in the first
place was to support the Registry 2.0 migration, which was finished a year and a
half ago. It's only being read one way now, so a Map is fine.

See https://github.com/google/nomulus/pull/53 for context.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144381946
2017-01-13 10:28:08 -05:00
mcilwain
66a02856c4 Use strict email address validation in SendEmailUtils
It probably should have always been like this, but the Nomulus test recently
started failing without it for some reason.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144343479
2017-01-12 14:17:57 -05:00
mcilwain
0c6cd4d7b7 Fix missing @CopyAnnotations by upgrading to AutoValue 1.4-rc2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144332981
2017-01-12 14:16:29 -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
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
cgoldfeder
96a71ded91 Fix some comment typos
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144238812
2017-01-12 14:10:24 -05:00
mcilwain
a5d5c9e2fd Support creation of EPP fee objects using custom descriptions
This is a reasonable thing that custom code might want to do (Donuts already has
a use case).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144216929
2017-01-12 14:08:56 -05:00
ctingue
3ee98988c5 Add TODOs in SQL files for recurring billing expansion
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144133707
2017-01-12 14:05:57 -05:00
shikhman
e981bad0b3 Rename all encoding methods to start with the word encode for consistency
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143973446
2017-01-12 13:58:31 -05:00
Justin Graham
2a3a17d653 Add signed mark parameter to Create flow afterValidation extension point
This is the follow up PR for #49. It adds an additional parameter to DomainCreateFlowCustomLogic.AfterValidationParameters: a nullable signed mark id.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143966945
2017-01-09 12:17:55 -05:00