Commit graph

1520 commits

Author SHA1 Message Date
jianglai
db60f0fd12 Create canary records in proxy zones
This allows for the creation of records like epp-canary.registr.google.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199850436
2018-06-18 17:50:15 -04:00
mcilwain
ddf55005c3 Allow nomulus list_domains to query any number of TLDs
This limit did not exist prior to [] which added the ability to limit
the size of the list. I didn't think that we needed to be able to query more
than 30 TLDs at any one time so I got rid of batching, but it turns out we do
need this ability for domain_watcher. So I'm re-adding batching, which is a
little bit more complicated now that we're also limiting and sorting by creation
time.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199826414
2018-06-18 17:48:44 -04:00
guyben
5aeee19699 Send out Lordn during start-date sunrise
Also prevents signed marks from being used in non-sunrise TldStates.

Currently, we send out a Lordn update only when there's a ClaimNotice, or if
we're in end-date sunrise.

But EPPs can contain a SignedMark instead of a ClaimsNotice for trademarked
domains - in which case we aren't sending out Lordn update. This also applies
to start-date sunrises.

We also change the SignedMark behavior for superusers. Currently, if a
mismatched signed mark is given as superuser, we accept it. That causes
problems when we want to send the Lordn update.

Instead - we no longer allow superusers to give a mismatched SignedMark (just
as we don't allow users to give a bad ClaimNotice). A super user can still
create a domain WITHOUT a signed mark - but if one is provided, it must match.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199783411
2018-06-18 17:45:44 -04:00
Ben McIlwain
658f31933c Add metrics for the new Check API
New metrics are necessary because the new API no longer wraps
an EPP flow, therefore does not get metrics for free.

Metrics include
 - An EventMetric for processing time
 - An IncrementableMetric for request count, with
   availability (available/reserved/registered) and
   pricing (standard/premium) fields

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199708592
2018-06-18 17:44:04 -04:00
larryruili
1c71487e5d Set EAP billing event to one-year period
This is consistent with how we treat RESTORE billing events as well- in
general, fees are considered to be amortized over the course of a year (by the
invoicing team).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199684843
2018-06-18 17:42:29 -04:00
guyben
ea08661598 Upload to GCS before uploading to FTP
Currently we encode and upload the deposite to GCS and the FTP server at the
same time. This makes debugging harder as there are many possible points of
failure, some of which are external and some internal.

In this CL we start by encoding + uploading the deposit to GCS, and once
that's done we copy the data from GCS to the FTP server. This will (hopefully)
allow us to distinguish between errors on the FTP server and errors with the
GCS connection.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199643208
2018-06-18 17:39:36 -04:00
mcilwain
228e4f6c95 Update LORDN comments to account for start-date sunrise
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199619121
2018-06-18 17:38:07 -04:00
jianglai
27fce55654 Restrict contact info commands to owning registrars
Superuser can also execute contact info commands. AuthInfo is no longer checked in the input and always displayed in the output as the only ones who can get a response are the sponsoring registrar and super user.

Also corrected a Javadoc in which '@' should have been escaped (see https://reflectoring.io/howto-format-code-snippets-in-javadoc/)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199521153
2018-06-18 17:36:42 -04:00
mcilwain
19f58f5557 Use @Binds instead of @Provides for DnsWriter
It's just a pass-through, so @Binds is more efficient.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199514776
2018-06-18 17:32:56 -04:00
mcilwain
37095f82e9 Delete MultiplyingCloudDnsWriter
Now that the large zone re-signing test is complete, we no longer need it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199507075
2018-06-18 17:31:28 -04:00
larryruili
7487639e62 Enhance transfer logic for transaction reporting
Explicit transfer acks/nacks reverse the roles for transaction reporting
tabulation- this adds a quick check to account for this going forward.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199474444
2018-06-06 15:19:01 -04:00
mcilwain
5c7a20797e Default clientId to registry's registrar in domain lock commands
All domain locks we've processed so far are as a result of the URS process, for
which the clientId is always that of the registry's registrar. So it makes sense
to default to that value, while still retaining the option to specify it if
required in case we ever support registrar-requested registry locks in the
future.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199350120
2018-06-06 15:17:36 -04:00
mcilwain
897690119e Add a nomulus renew_domain command
This may come in handy when dealing with URS requests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199332085
2018-06-06 15:16:09 -04:00
jianglai
643b30d31f Redact WHOIS output instead of removing the fields altogether
See https://www.icann.org/resources/pages/gtld-registration-data-specs-en/#appendixA for details on how certain fields are redacted.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199295355
2018-06-06 15:14:38 -04:00
mcilwain
e1bcc2e64d Add relevant exception message for checkArgumentNotNull usage
I ran into this while writing some other code and having the exception message
would have made it easier to debug.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199292321
2018-06-06 15:13:10 -04:00
mcilwain
7c0b8cab0b Add premium support to nomulus create_domain command
Premium prices are automatically detected and set, with an informational
message displayed to the user prior to executing the command.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199223541
2018-06-06 15:11:44 -04:00
jianglai
61f6e666b1 Enforce no logging in production environment
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199156367
2018-06-06 15:10:15 -04:00
Ben McIlwain
c61f36502e Add a new check API that does not wrap the domain check EPP flow
Copied class and test from CheckApiAction. All unit tests passing.

Remaining work: add metrics

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198916177
2018-06-06 15:05:30 -04:00
guyben
9d2b1e7572 Consolidate all Set parameter parsing
Currently, we have two different ways to parse a "set" parameter:
key=value1&key=value2&key=value3...
and
keys=value1,value2,value3

This is error prone for several reasons:
- different parts of the code must be "synchronized" to use the same style (the
  place that creates the request, and the place that parses the request)
- for the key=value1&key=value2, we often use the same key name for the single
  value and the set value. This can result in subtle bugs where part of the
  code will successfully read the key assuming there's only one key (and will
  get the first key=value1, ignoring the rest)

Here we transition everything to the keys=value1,value2,value3 method. This one
was chosen because:
- it's shorter
- it's more intuitive for users
- the key name is plural, differentiating it from the singular key=value that
  other requests might need

-----------------------------------

To make sure there are not "transition issues", we will continue to support
(with warnings) the key=value1&key=value2 parameter parsing until we're sure we
haven't forgotten to update any part of the code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198810681
2018-06-06 15:04:02 -04:00
jianglai
3960207502 Log source IP when logging is enabled
We will only enable logging for non-production environment, so there shouldn't be any privacy concerns by enabling this.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198744739
2018-06-06 15:02:31 -04:00
jianglai
af8b050446 Tweak log message a bit
SERVER and CLIENT is a bit hard to understand.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198721870
2018-06-06 15:01:00 -04:00
jianglai
c0a7bde95e Remove deprecated PublishDetailReportAction
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198624767
2018-06-06 14:59:30 -04:00
mcilwain
593dcc3000 Add more RDE upload informational logging
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198587342
2018-06-06 14:53:37 -04:00
jianglai
70b13596e4 Migrate to Flogger (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as
safe as possible and should be easy to review and submit.

No changes should be necessary to the code itself prior to submission,
but small changes to BUILD files may be required.

Changes within files are completely independent of each other, so this CL
can be safely split up for review using tools such as Rosie.

For more information, see []
Base CL: 197826149

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198560170
2018-05-30 12:18:54 -04:00
jianglai
0d2fb3a8f0 Fix legacy logging bug from FlowRunner
We've moved completely to the JSON based reporting framework. The legacy logging statement is only for human consumption, therefore removing the comments. Also fixes a bug where the last argument is not used due to the formatter only expecting 7 arguments.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198558998
2018-05-30 12:18:54 -04:00
jianglai
1f1705aaa6 Migrate to flogger (red)
This is a 'red' Flogger migration CL. Red CLs contain changes which are
likely not to work without manual intervention.

Note that it may not even be possible to directly migrate the logger
usage in this CL to the Flogger API and some additional refactoring may
be required. If this is the case, please note that it should be safe to
submit any outstanding 'green' and 'yellow' CLs prior to tackling this.

If you feel that your use case is not covered by the existing Flogger API
please raise a feature request at []and
revert this CL.

For more information, see []
Base CL: 197826149

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198463651
2018-05-30 12:18:54 -04:00
jianglai
65ac28fae5 Increate GKE cluster upgrade timeout time to 30m
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198322158
2018-05-30 12:18:54 -04:00
jianglai
4be4fb0082 Migrate to Flogger (yellow)
This is a 'yellow' Flogger migration CL. Yellow CLs should be mostly safe
but include changes that are notable for one reason or another. Manual
intervention may be required to address small issues.

The comments in this CL indicate cases where suggested code changes
should be double checked, or even modified. There may even be cases where
files outside this CL are affected by changes to things such as logger
visibility. However if a change does not have an associated comment then
it should be safe.

For more information, see []
Base CL: 197826149

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198097990
2018-05-30 12:18:54 -04:00
mcilwain
92190f8699 Merge the check_domain_fee nomulus command into check_domain
I'm tired of running check_domain only to then realize I needed to run
check_domain_fee instead because the domain ended up being premium. We require
the use of the fee extension to register domains on all of our TLDs anyway so we
might as well always be sending the fee extension when checking domains
too. There's no additional harm in sending along the fee extension (it only
sends back additional information that is often useful), so just make that the
default and remove the extra unnecessary command.

Note that check_domain_claims can't be merged in too because it fundamentally
works differently. It doesn't query the availability of domain names for
registration, just whether they're trademarked.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198097326
2018-05-30 12:18:54 -04:00
mcilwain
674a914afc Add flag to delete domain immediately in nomulus too
We've already had the need to do this on a few occasions, so it's best to make
it easy rather than requiring hand-generated XML all the time.

Also normalizes the boolean --registrar_request parameter to not have arity=1.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198093829
2018-05-30 12:18:54 -04:00
mcilwain
373b4feeb1 Remove unused singular DNS queue deleteTask method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197981823
2018-05-30 12:18:54 -04:00
mcilwain
8f456bcf64 Clarify when to use cache (or not) when loading premium lists
You don't want to use the cache when loading them for the purposes of updating
them, but you definitely do still want to use the cache when checking the
price of individual domains.

In [] the cache clearing of premium lists on update was removed. This
is a good thing in aggregate because the cache is per-instance and thus
misleading, but it also caused us to not be able to update the same premium
list twice within an hour because the second update would hit a "PremiumList
was concurrently edited" exception, owing to first loading the stale version
from the cache for the purposes of updating it. Now we bypass the cache for
that purpose.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197768142
2018-05-30 12:18:54 -04:00
jianglai
fc60890136 Migrate to internal FormattingLogger in preparation of migration to Flogger
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197744904
2018-05-30 12:18:54 -04:00
jianglai
86dd6bd59e Add ability to show full WHOIS output in nomulus command
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197731992
2018-05-30 12:18:54 -04:00
mcilwain
ac500652ac Add "pubapi" App Engine service for check API, WHOIS, and RDAP
The migration plan is as follows:
1. This CL, which adds the new "pubapi" service that serves the check API, WHOIS, and RDAP.
2a. Update our public facing sites to switch over to use the new service.
2b. (either order) Rewrite the check API to remove dependencies on flows.
3. ... eventually, once the frontend service is no longer being hit by this traffic, remove its handling of these public endpoints.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197716346
2018-05-30 12:18:54 -04:00
jianglai
a5abb05761 Migrating to fluent logging (red)
This is a 'red' Flogger migration CL. Red CLs contain changes which are
likely not to work without manual intervention.

Note that it may not even be possible to directly migrate the logger
usage in this CL to the Flogger API and some additional refactoring may
be required. If this is the case, please note that it should be safe to
submit any outstanding 'green' and 'yellow' CLs prior to tackling this.

If you feel that your use case is not covered by the existing Flogger API
please raise a feature request at []and
revert this CL.

For more information, see []
Base CL: 197331037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197503952
2018-05-30 12:18:54 -04:00
jianglai
05f166918f Migrating to fluent logging (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as
safe as possible and should be easy to review and submit.

No changes should be necessary to the code itself prior to submission,
but small changes to BUILD files may be required.

Changes within files are completely independent of each other, so this CL
can be safely split up for review using tools such as Rosie.

For more information, see []
Base CL: 197331037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197466715
2018-05-30 12:18:54 -04:00
larryruili
3983f32795 Add more valid response codes to Lordn
3618 and 3619 were probably added after the fact, see
https://tools.ietf.org/id/draft-lozano-tmch-func-spec-09.txt for the
authoritative source.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197405129
2018-05-30 12:18:54 -04:00
jianglai
0cb303ed7f Fix proxy metrics instrumentation bug
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197209531
2018-05-30 12:18:54 -04:00
jianglai
68b24f0a54 Migrate to internal FormattingLogger in GCP proxy in preparation of migration to Flogger
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197199265
2018-05-30 12:18:54 -04:00
jianglai
053c52e0bd Add Flogger to GCP proxy
This adds a dummy flogger logging statement in the GCP proxy to ensure that it
works.

TESTED=Deployed to alpha and verified that flogger works. Also passed FOSS
tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196899036
2018-05-30 12:18:54 -04:00
mcilwain
c989911526 Batch NORDN pull queue task deletions
They were failing because the maximum App Engine task batch size is 1,000, and
we currently have more than 4,000 tasks in the pull queue. We keep re-uploading
those to NORDN because we're unable to delete the tasks after successful upload,
so the leases expire and they get processed again.

Also renames TaskEnqueuer to TaskQueueUtils to reflect its newly expanded role.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197060903
2018-05-17 21:52:35 -04:00
jianglai
1248a7722b Enable logging in sandbox GCP proxies
This makes it easier to debug issues. There are no privacy concerns in sandbox.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197045576
2018-05-17 21:52:35 -04:00
mcilwain
b8d7d9da29 Don't delete the old premium list yet after updating to a new one
The issue is that the premium list cache is configured to persist for 60
minutes. So after updating the list, checks/creates for up to the next 60
minutes could still be referring to the old list. That's fine and dandy, unless
you delete the old premium list immediately (*bad*), which makes all domains
appear to now be non-premium for as long as the cache lasts. The reason deleting
the premium list entries makes names appear as non-premium is that a load-by-key
existence check with the domain label itself is used to determine if a name is
premium.

I also removed a misleading cache update statement, which doesn't do what it
appears to be doing (it appears to fix this issue) because cache is
instance-level, and so even if the premium list were updated from the frontend
instance only one of 100 instances would have its cache updated. But it's
updated from the tools service anyway, so it's guaranteed to not be a shared
cache with any instance serving EPP traffic.

On a sidenote, I introduced this bug on 2014-10-27 in [] The domain
label list refactor was my Noogler project.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197033604
2018-05-17 21:52:35 -04:00
jianglai
0fb845e81a Remove no quota leased warning from quota handler inactive callback
When EPP SSL handshake is unsuccessful, #channelInactive is called but there are no quotas to return, because quotas are only leased upon the first #channelRead. There is no need to log a warning and throw an exception in this case because the handshake exception would have been thrown already. Throwing a second exception just crowds the log.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197016756
2018-05-17 21:52:35 -04:00
jart
44890c2964 Fix registry_ear_file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196918963
2018-05-17 21:52:35 -04:00
jianglai
e5f4b5a17b Add Flogger to GCP proxy
This adds a dummy flogger logging statement in the GCP proxy to ensure that it
works.

TESTED=Deployed to alpha and verified that flogger works. Also passed FOSS
tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196899036
2018-05-17 21:52:35 -04:00
mcilwain
807ab2b27b Reduce prod/sandbox frontend manual instance count from 100 to 30
100 is way overkill with manual scaling.  30 is most likely still overkill too,
but we want to tune incrementally rather than all at once.  Note that at 30
instances we're expecting around 3 QPS per instance, which is still an order
of magnitude less than each instance can actually handle.

This also fixes the instance type on sandbox to be the same as on prod.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196875876
2018-05-17 21:52:35 -04:00
mountford
36439d02b3 RDAP: Add clarification about formatting of embedded vCard addresses
Gustavo Lozano confirmed that street addresses should be formatted as a string
if there is only one line, or an nested array of strings if there is more than
one. Luckily we already do it this way, so we just need to update the comment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196845222
2018-05-17 21:52:35 -04:00
larryruili
c7ca0ea2aa Update open-source Guava to 25.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196835918
2018-05-17 21:52:35 -04:00