Commit graph

1138 commits

Author SHA1 Message Date
mcilwain
d3e9ebad16 Remove deprecated singular DNS writer field and update tooling
Note that even though the nomulus command line tool now supports multiple
DNS writers for all subcommands, this still won't work quite yet because
the DNS task queue format migration from [] is still in progress.
After next week's push that migration will be complete and we can remove
the final restriction against only having one DNS writer per TLD.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162490399
2017-08-01 16:50:49 -04:00
guyben
8ff1102223 Add the ability to get_keyring_secret the public key from key pairs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162399452
2017-08-01 16:49:29 -04:00
mcilwain
f771b32ece Fix checkApiServletClientId placeholder in production config sample
It should not be multiline, as registrar client ids are single short-ish identifiers with no spaces allowed. There's no way for them to span multiple lines.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162389442
2017-08-01 16:48:09 -04:00
mcilwain
d9613cf69a Add sanity check on commit log deletion
I know the query that finds commit logs already should ignore commit logs
that are too young, but this adds an explicit sanity check for safety's
sake, so we don't have to depend solely on an indexed query for safety.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162386413
2017-08-01 16:46:50 -04:00
guyben
268abbc383 Add option for dry run
The dry run does all the steps except the deletion. All the counters will
return the same values they would have returned on an actual run.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162379609
2017-08-01 16:45:28 -04:00
bbilbo
700148ae45 Add missing space between {$productName} and 'and'
Soy doesn't automatically add a space after a macro if it is the last element in
the line (https://screenshot.[].com/mTPYqE086Qk).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162376247
2017-08-01 16:44:06 -04:00
mcilwain
b671dd6451 Make dry run parameter documentation more understandable
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162373834
2017-08-01 16:42:42 -04:00
guyben
882db28ee0 Set the number of map shards to 20
This change is motivated by the sandbox run where we saw the backend instances overwhelmed by the 100 default shards to the point where they couldn't even answer a simple status request.

Production has 50 backend instances, so 20 will leave a lot of spare for other tasks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162357857
2017-08-01 16:41:19 -04:00
mcilwain
4a921973ea Add capability to sync DNS using multiple writers if configured
This is written in such a way that it can safely handle task items in the
old format so long as the DNS writer to use for the given TLD is unambiguous
(which it is for now, until we allow multiple DNS writers to be configured).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162293412
2017-08-01 16:38:36 -04:00
guyben
e224a67eda Change @Auth to an AutoValue, and created a set of predefined Auths
We want to be safer and more explicit about the authentication needed by the many actions that exist.

As such, we make the 'auth' parameter required in @Action (so it's always clear who can run a specific action) and we replace the @Auth with an enum so that only pre-approved configurations that are aptly named and documented can be used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162210306
2017-08-01 16:33:10 -04:00
Ben McIlwain
5966d8077b Migrate TestVerb.withFailureMessage to use withMessage instead
Also updates Truth version to 0.34 where the replacement method was added.

More information: []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161970305
2017-08-01 16:30:24 -04:00
guyben
bfde7dac0b Add info printouts for lock acquisition / release
Trying to debug lock acquisition issues with RdeStaging.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161966189
2017-08-01 16:29:01 -04:00
bbilbo
7d7048ac12 Declare types in Optional.absent() usage
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161865295
2017-08-01 16:26:18 -04:00
bbilbo
9688638c75 Use History Entry type for flows in VerifyOteServlet
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161855429
2017-08-01 16:24:55 -04:00
larryruili
4887811fc3 Add activity reporting SQL query generation code
This allows us to have a modular view of all tables used in activity reporting, to facilitate generating reports in BigQuery.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161849007
2017-08-01 16:23:31 -04:00
mcilwain
37f33e5e7a Migrate plural DNS writers field to being the canonical one
After this point all data is migrated to use the new canonical
plural version, and subsequent code changes can be made that use
multiple writers.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161673486
2017-08-01 16:12:42 -04:00
mcilwain
24587491c9 Make re-save environment entities command use batching
This makes it take a lot less time to run (roughly a 10X speedup).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161666391
2017-08-01 16:10:00 -04:00
jianglai
b235565eef Fix the build on MacOS
The build on MacOS fails (https://github.com/google/nomulus/issues/67) due to different syntax for sed on BSD vs. Linux.

See this StackOverflow discussion: https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux

Also adds a newline between @SuppressWarnings annotation and the class definition.

Note that MacOS support is best-effort only.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161661181
2017-07-12 11:03:50 -04:00
mcilwain
77b8729ec6 Add example OAuth client id to production sample YAML file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161583881
2017-07-12 11:03:50 -04:00
mountford
3372ed718a Add documentation about OAuth2 client id configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161571961
2017-07-12 11:03:50 -04:00
guyben
944d7a91d1 Update DeleteOldCommitLogs to only delete unreferenced logs
Now instead of deleting "all logs older than X", we delete "all logs older than
X that don't have any EppResource.getRevision()" pointing to them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161455827
2017-07-12 11:03:50 -04:00
Lai Jiang
e293590520 Revert "Add vim file ignore rule, and make build work on MacOS"
This reverts commit 9a53cba74d.
2017-07-11 22:04:03 -04:00
Lai Jiang
9a53cba74d Add vim file ignore rule, and make build work on MacOS 2017-07-11 22:02:38 -04:00
jianglai
a7aeb1924a Revert "Build on OS X"
Wait for proper push with cleaner solution.

This reverts commit 6469d58d98.
2017-07-11 14:45:10 -04:00
Lai Jiang
6469d58d98 Build on OS X 2017-07-11 00:20:31 -04:00
mcilwain
4d5b6845b7 Add plural DNS writers field to Registry entity
This is the first step in a multi-step data migration to allow multiple
DNS writers per TLD. The overall process looks like this:

1. Add a plural DNS writers field with backfill (this commit).
2. Deploy it.
3. Run the ResaveEnvironmentEntitiesCommand to populate this new field
   on all entities.
4. Update the code to use the new field everywhere.
5. Deploy it.
6. Delete the now-unreferenced, old deprecated singular value field.

This process is rollback-safe.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161253436
2017-07-10 11:45:13 -04:00
bbilbo
b39f368ea3 Fix typo in comment
Comment says publix suffix instead of public suffix

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161236147
2017-07-10 11:42:39 -04:00
guyben
1f25a862e6 Set KmsKeyring as the default Keyring
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161113761
2017-07-10 11:40:02 -04:00
jianglai
0013312f5c Export billing account map to registrar sheet
The billing account map will be serialized in the following format:

{currency1=id1, currency2=id2, ...}

In order for the output to be deterministic, the billing account map is stored as a sorted map.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161075814
2017-07-10 11:37:23 -04:00
mcilwain
80f8f5ac7f Add basic logging for async operation processing time
We're already storing this as a metric, but on a registry of our
scale these operations tend to only happen on a daily-ish basis,
for which seeing results in logs is easier to deal with than metrics
(and also still very light-weight).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160552291
2017-07-10 11:31:56 -04:00
larryruili
4130a8a75e Create ICANN report upload action
This is the first step in moving the current []cron-Python reporting scripts
into App Engine, as an official part of the Nomulus package. This copies the
structure of RDE uploads, with a few changes specific to monthly reporting.

I've left some TODOs related to actually testing it on the ICANN endpoint, as we're still not sure how files to be uploaded will be staged, and whether we can actually ping their endpoint on valid ports (80 or 443).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160408703
2017-07-10 11:27:58 -04:00
bbilbo
f721bda16d Update UpdateDomainCommand to use FormattingLogger
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160299234
2017-07-10 11:26:37 -04:00
mcilwain
dccc99787e Add TLDs parameter to refresh DNS action
This will allow us to migrate one TLD at a time by refreshing all zones
on the specified TLD after dual-writing is enabled.

Note that the TLDs parameter is required, which seems reasonable given
that almost all imagined use cases would be on a by-TLD basis.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160294546
2017-07-10 11:23:57 -04:00
bbilbo
bbdf9bfc38 Refactor CreateDomainCommand and add UpdateDomainCommand
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160282921
2017-07-10 11:22:39 -04:00
mcilwain
30d5d05fdf Refactor/rename refresh all DNS action
I'm moving it out of the scrap folder too because there's nothing else
in there and we do want to retain this indefinitely because it's a useful
tool for performing DNS writer migrations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160168902
2017-07-10 11:18:41 -04:00
mountford
5a31be12ba RDAP: Allow domain and nameserver queries with no initial string under certain circumstances
Up to now, our search wildcard rules have been that there must be an initial string of at least two characters. If a wildcard is present after that, it can optionally be followed by a suffix specifying the TLD (for domains) or domain (for nameservers). So domain queries can look like:

example.tld
ex*
ex*.tld

and nameserver queries can look like:

ns1.example.tld
ns*.example.tld
ns*

But you can't do a domain query for *.tld, nor a nameserver query for *.example.tld. It would be nice to support such queries, and the presence of a valid TLD or domain makes them relatively efficient. This CL relaxes the restrictions to allow wildcards with no initial string if the suffix is present. For nameservers, the suffix must be a valid domain in the system, to avoid having to loop through all nameservers.

A side effect of the changes is to fix a shortcoming in the logic which caused wildcard nameserver searches to fail if the specified domain suffix referred to an external domain.

Entity searches are not affected, since they do not support suffixes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159856563
2017-07-10 11:16:03 -04:00
guyben
59dc3de3f3 Add MapReduce Input for CommitLogManifest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159749707
2017-07-10 11:13:23 -04:00
cpovirk
7b8681c092 Set compatible_with on individual targets rather than use default_compatible_with.
I'm making this change ONLY for packages with targets that I'll be removing the appengine constraint from. default_compatible_with is fine in general; I just want to separate the default_compatible_with->compatible_with CLs from the CLs that remove compatible_with.

This is part of the cleanup after []

Tested:
blaze build --nobuild

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159713533
2017-07-10 11:09:26 -04:00
mountford
02a5e3d20f Remove /_dr security constraint from web.xml files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159610409
2017-06-21 10:08:40 -04:00
mountford
9d96072e01 Remove requireLogin action attribute
The affected actions have been changed to check that the user is logged in by [] so this attribute is no longer needed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159572365
2017-06-21 10:04:05 -04:00
lukes
e94ba8d2af Delete private="true" from .soy files
private="true" has never done very much unfortunately. There is an alternate
way to mark templates as private by setting 'visibility="private"' which does
get enforced both by the soy compiler and by custom per-language strategies in
the various backends.

Unfortunately, it isn't possible to safely migrate from one to the other since
users may be calling these templates from server side soy which enforces
visibility via a runtime exception.  So they are just being deleted.

LSC: https://docs.google.com/document/d/1aOM_tBmanDQolF8mAuB0y29yB76cmYS5qOVYBAzFzyw/edit#

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159565458
2017-06-21 10:00:53 -04:00
mountford
2b7f78db98 Change registrar console login code in preparation for removing requireLogin
We are going to remove the requireLogin attribute from the action attribute, because it is specific to the UserService API. This is used by four actions:

ConsoleUIAction
RegistrarSettingsAction
RegistrarPaymentSetupAction
RegistrarPaymentAction

Instead, these four actions will now check the login status directly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159562335
2017-06-21 09:56:10 -04:00
nickfelt
17697388b8 Fix stale naming in KmsModule binding for KmsConnection
And also change it to use @Binds.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159506945
2017-06-21 09:54:36 -04:00
nickfelt
c41cf9142a Remove FixDomainTransferDataCommand
Scrap tool is no longer needed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159500743
2017-06-21 09:53:03 -04:00
Ben McIlwain
fd1051f90a Remove temporary @OnLoad used for setting period in DomainApplication
Now that the registration period has been added to DomainApplication, we
can remove this @OnLoad that was populating it for objects that were
missing the period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159464438
2017-06-21 09:51:28 -04:00
nickfelt
fc78fd7d4a Update transfer data fixing command to fix one more domain
I happened to notice that one domain affected by b/33289763 had existing transfer data, so in that case the data got overwritten to look like a server cancellation (a year after the transfer request, so obviously wrong) rather than creating invalid transfer data, and hence wasn't picked up in the previous fixes.  See b/33289763#comment32 for more details.

This CL renames the RemoveDomainTransferDataCommand used to fix the errors to FixDomainTransferDataCommand and changes its behavior to instead reset the TransferData to a server-approval result.  It also changes it to load domains by ROID because loadByForeignKey() fails for deleted domains.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159273225
2017-06-21 09:49:53 -04:00
jianglai
d1ef4b9c37 Allow partial update of billing account map
When doing update_registrar, it is now possible to only specify the currencies and the account ids that need updating.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159262119
2017-06-21 09:48:19 -04:00
mountford
7d2f53a6fe Remove xsrfScope and xsrfProtection authentication attributes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159121132
2017-06-21 09:46:40 -04:00
Ben McIlwain
580c41f2d6 Make the superuser flag bypass TLD access checks
The --superuser command in the nomulus command-line tool should be
bypassing checks on whether the passed-in registrar client ID has access
to the TLD in question, but currently it is not.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158974462
2017-06-14 10:43:50 -04:00
jianglai
3a02e6fb11 Add fine level logging methods
We currently only have one method for fine level logging. Add another three so that fine level logging can be called just like other levels.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158760803
2017-06-14 10:40:49 -04:00