Commit Graph
5402 Commits
Author SHA1 Message Date
Ben McIlwainandGitHub 575192016f Change rotatePrimaryCert type to primitive boolean (#3205)
Change the rotatePrimaryCert field in CreateOrUpdateRegistrarCommand
from object Boolean to primitive boolean. Since the field is initialized
to default false and used as a presence-based switch without tri-state
semantics, primitive boolean accurately reflects its behavior and avoids
unnecessary object wrapper overhead.

BUG= http://b/537308816
nomulus-20260811-RC00
2026-08-10 22:03:26 +00:00
Pavlo TkachandGitHub 76bd13ddf0 Remove EppProxyProtocolHandler from the pipeline (#3202) nomulus-20260807-RC00 nomulus-20260808-RC00 nomulus-20260809-RC00 nomulus-20260810-RC00 proxy-20260810-RC00 2026-08-06 23:53:11 +00:00
Juan CelhayandGitHub 8cbf3242a7 inject proxy image into cd manifests (#3203) 2026-08-06 23:51:54 +00:00
Pavlo TkachandGitHub b1f2eb5921 Rename EPP Server container (#3201) nomulus-20260806-RC00 2026-08-05 20:11:32 +00:00
gbrodmanandGitHub 4f332d397e Add tld,domain_name idx on Domain for RDAP searches (#3200)
this allows us to quickly serve requests like "*.tld" which we need to
order to allow for cursored results

b/535250462
2026-08-05 19:55:01 +00:00
gbrodmanandGitHub c9a82f1322 Streamline large synch blocks in list/TMCH CA loading (#3183)
For reserved/premium lists:
Use double-check locking so that subsequent calls to get the entire map
of entries don't need to even check the locking object. This makes
things quicker and removes lock-tracking overhead.

For TMCH CA:
we can just remove the synchronization block entirely. Everything inside
of it is either constants (e.g. ROOT_CERTS) or a Guava loading cache
(CRL_CACHE) which takes care of synchronization for us anyway.
nomulus-20260805-RC00
2026-08-04 20:06:53 +00:00
gbrodmanandGitHub fabf0c07b2 Tighten control on Marksdb URL hostname (#3198)
this doesn't really matter but eh, a URL shouldn't be able to be like,
ry.marksdb.org.attacker.com

b/535251045
2026-08-04 19:42:38 +00:00
Pavlo TkachandGitHub aa54f9ddc9 Add epp server to cloud build deploy (#3197) 2026-08-04 19:13:32 +00:00
gbrodmanandGitHub 92edbfbde2 Skip unnecessary domain reads in Spec11Pipeline (#3196)
We can just grab the fields we need from the original query. There's no
point in making a ton of extra lookups.
2026-08-04 18:45:06 +00:00
Weimin YuandGitHub b1e127798f Refactor LoadTestAction for usability (#3192)
Calculates the delay seconds automatically. This value helps ensure that
all EPP requests are enqueued before the scheduled test start time.
Since queue insertion is much slower than dispatch, this is essential to
maintain a stable QPS rate.

Also parallelizes queue insertion using a thread pool. This reduces the
delay for enqueuing the requests.

BUG=http://b/533414332
2026-08-04 18:41:54 +00:00
gbrodmanandGitHub 3474cd6e9b Batch DNS refresh requests on host renames (#3181)
Some hosts can have more than 100k domains linked to them so we probably
don't want to insert all those entries at once.
nomulus-20260804-RC00
2026-08-04 02:36:50 +00:00
gbrodmanandGitHub 1fc4a281c0 Add an IncrementalMetric for sync-cache-action runs (#3195)
This is configured to run every 5 minutes. We need to make sure that the
cache doesn't get too out of date, otherwise we'll be serving stale
data. We'll add an alert that fires if SUCCESS or NOT_CONFIGURED hasn't
happened recently.
2026-08-03 20:17:12 +00:00
Juan CelhayandGitHub 9a420a69b0 Add pre and post deploy steps to Cloud Deploy delivery pipeline (#3187)
* Fix image replacement in cd (#3186)

* read sql jobs from ar

* revert release change

* flatten file path for sql jobs

* no source to sql command

* add automation to pipeline

* fix automation

* fix replica seize for backend and console in partial phases
2026-08-03 18:34:47 +00:00
Pavlo TkachandGitHub a3421f2999 Update IPs name to match reserved for epp-server (#3194) nomulus-20260803-RC01 2026-08-03 13:42:58 +00:00
Pavlo TkachandGitHub 72c610688a Remove canary release build for epp server (#3193) nomulus-20260801-RC00 nomulus-20260802-RC00 proxy-20260803-RC00 nomulus-20260803-RC00 2026-08-01 02:02:07 +00:00
Ben McIlwainandGitHub b5ae51a036 Do not apply reserved list to domain restore (#3191)
Per ICANN's Expired Registration Recovery Policy, all gTLD registries must
offer a Redemption Grace Period (RGP) of 30 days during which deleted
domains may be restored. Registry reservation lists should not block
domain restore commands during the RGP.

This change removes the reserved list check in DomainRestoreRequestFlow,
reverting the behavior originally added in CL 72341125 (July 2014) that
explicitly disallowed restoring reserved domains. Unit tests have been
updated to confirm restoring reserved domains succeeds for standard
registrar accounts.

BUG=b/539548743
TAG=agy
CONV=d5dff534-f924-4bba-a58e-74091dc5f496
nomulus-20260731-RC02 nomulus-20260731-RC03
2026-07-31 17:23:37 +00:00
gbrodmanandGitHub 92b684d7ec Only forbid DISABLED registrars in the console (#3188)
PENDING registrars may just need to add contacts etc in order to be
enabled, and they should be able to use the console to do so.
nomulus-20260730-RC02 nomulus-20260730-RC03 nomulus-20260730-RC01 nomulus-20260731-RC00 nomulus-20260731-RC01
2026-07-30 20:57:43 +00:00
Pavlo TkachandGitHub 49cecf6776 Update cloud build release with new epp service (#3189) 2026-07-30 19:49:40 +00:00
gbrodmanandGitHub 4cc3fc9cd2 Use native query for registrar-users console user query (#3182)
This means we don't have to load all users and filter them out later. In
practice this doesn't matter because the user table is relatively small
(a few hundred) but 1. who knows what can happen in the future? 2. this
makes the code analysis tools happier
nomulus-20260730-RC00
2026-07-29 22:30:07 +00:00
Juan CelhayandGitHub 74f441765e Fix image replacement in cd (#3186) 2026-07-29 19:37:12 +00:00
gbrodmanandGitHub 0ce83c8b2d Change syncRemoteTask scheduled task to be a POST (#3185)
Turns out before we were using GET for everything. The action is, and
should remain, a POST on the back end so let's call that.
2026-07-29 18:52:59 +00:00
Juan CelhayandGitHub fc4246ea95 Add pre- and post- deploy tasks for SQL schema verification and deployment (#3184) nomulus-20260729-RC00 2026-07-29 02:00:51 +00:00
Ben McIlwainandGitHub 29def8d78d Make losing client ID optional in bulk transfers (#3169)
When executing bulk domain transfers with an explicit list of domain names or
a domain names file, enforcing by losing registrar ID is often unnecessary
and redundant (b/537294004).

This commit makes --losing_registrar_id an optional command-line parameter
and updates BulkDomainTransferAction and BatchModule to handle an optional
losing sponsor ID. Existing behavior is preserved when the parameter is
explicitly supplied.

BUG= http://b/537294004
2026-07-29 02:00:39 +00:00
Pavlo TkachandGitHub 0c79414a31 Harden EPP connection limits and idle timeouts (#3179)
This change hardens the EPP GKE entry point against a connection hoarding Denial of Service (DoS) vulnerability (b/534930905).
We resolve this by restricting pre-login connections to a short idle timeout and enforcing pod-local connection caps:
1. Removed certificate-based connection quota tracking. IP limits are now enforced pre-login, and authenticated Registrar ID limits are enforced post-login.
2. Implemented a 10-second scheduled timeout task during the pre-login phase. If the client does not successfully authenticate within 10 seconds of TLS handshake completion, they are disconnected.
3. Added a new response header 'Nomulus-Logged-In-Registrar' set by the backend EppRequestHandler upon successful login. EppServiceHandler monitors this header inline to perform registrar quota upgrades and cancel the pre-login timeout task.
4. Hardened EppProxyProtocolHandler to validate incoming IPs from the PROXY protocol header to prevent IP spoofing and smuggling, falling back to the TCP source IP on validation failures.
2026-07-28 19:59:51 +00:00
gbrodmanandGitHub ea7d5d4a5e Enforce OT&E accounts existing in the console gSuite domain (#3178)
This is non-production so it's not a huge deal but in general, we should
restrict the OT&E users so that they only exist within the workspace
that we control. Other users that are created using the console already
follow this format.

b/534932209 for more info
2026-07-28 19:24:09 +00:00
Juan CelhayandGitHub 553fa1dc14 Use environment custom worker pool for deploy step in cloud deploy (#3180) 2026-07-28 19:08:26 +00:00
Juan CelhayandGitHub c36087dc93 generate servertrids using securerandom behind feature flag (#3163) 2026-07-28 16:00:55 +00:00
gbrodmanandGitHub bc44e095d4 Forbid subordinate host changes when superord domain is locked (#3171)
This is not explicitly called out that I could find in the RFCs, however
it is very clear from the RFCs that hosts are subordinate to their
domains and it stands to reason that updates to a subordinate host are
updates to the superordinate domain.

Section 1.1 of RFC 5732 specifies:

```
host name "ns1.example.com" has a subordinate relationship to domain
name "example.com". EPP actions (such as object transfers) that do not
preserve this relationship MUST be explicitly disallowed.
```

Allowing host updates (e.g. renames) opens up situations where this
relationship could be severed. We add analogous prohibitions on deletion
and creation of subordinate hosts as well.

b/534930957
nomulus-20260725-RC00 nomulus-20260726-RC00 proxy-20260727-RC00 nomulus-20260727-RC00 nomulus-20260727-RC02 nomulus-20260727-RC01 nomulus-20260728-RC00
2026-07-24 19:27:00 +00:00
gbrodmanandGitHub 355e8ba423 Don't claim that only one abuse contact is allowed (#3173)
nowhere in the RFCs does it say that only one contact is allowed, and
indeed there are many situations where it's actually an array of
contacts. We have a bunch of registrars that already have multiple abuse
contacts. I'm not sure why the comment originally claimed this, but it's
from years and years ago.

b/534931561
2026-07-24 17:01:09 +00:00
gbrodmanandGitHub dca5a010d5 Update registrar-update auth block for allowed TLDs + rlock (#3175)
Verified in support docs 2.19 and 2.33 that agents should have the
ability to edit allowed TLDs but should not have the ability to edit
whether registry lock is allowed. This reflects that.

b/534931470
2026-07-24 15:52:51 +00:00
gbrodmanandGitHub 147e7dabcb Also skip inline style optimization in sandbox (#3177) 2026-07-24 15:52:44 +00:00
gbrodmanandGitHub 0b8025d3db Disallow adding ADMIN contacts via console (#3160)
this is a potential security issue if we give users who only have
EDIT_REGISTRAR_DETAILS access to become admin PoCs, which can have a
different set of permissions.
2026-07-24 15:11:06 +00:00
Ben McIlwainandGitHub 9c4a558d7b Censor domain authcode by default in tools (#3170)
When inspecting domain entities with tools like GetDomainCommand, displaying
plaintext authentication codes is unnecessary and presents a security risk
for credential exposure in logs and bug ticket comments (b/537293980).

This commit modifies GetDomainCommand to redact sensitive authcodes by
default using an in-memory entity builder snapshot while preserving database
records. An optional --show_authcode flag with arity 1 is introduced to
explicitly display authcodes when required for transfer authorization.

BUG= http://b/537293980
2026-07-24 14:26:38 +00:00
Ben McIlwainandGitHub 7347dbf762 Add arity to registrar_request boolean flags (#3168)
Define arity 1 on requestedByRegistrar options in BulkDomainTransferCommand
and DeleteDomainCommand to accept explicit false arguments without parsing
failures. Up-to-date tests verify space-separated and equals argument syntax.

BUG= http://b/537308816
2026-07-24 14:26:34 +00:00
gbrodmanandGitHub 53b6044ff8 Fix CSP directive in production (#3176)
In prod, when loading the console, we were failing to get some
scripts/styles with the error "Executing
  inline event handler violates the following Content Security Policy directive 'script-src
  'self''. Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-
  ...') is required to enable inline execution. Note that hashes do not apply to event
  handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword
  is present. The action has been blocked."

We fix this by disabling inline-critical optimization for prod in the
angular file.

In addition, the web.xml header values are comma-separated -- we forgot
one comma before.
nomulus-20260724-RC00
2026-07-23 21:00:18 +00:00
Juan CelhayandGitHub 12ab7f47e2 Fix oversized postal-address fields (#3165) 2026-07-23 14:29:54 +00:00
gbrodmanandGitHub d3a1d0709e Only grant IAP access to the console for new users (#3167)
Currently we grant users IAP_SECURED_WEB_APP_USER_ROLE access to the
entire project upon creation if there is no preexisting group set up for
them to use. These users only need to be able to access the console, so
we should restrict it to the console.

If there is a group (which we do have in our prod + sandbox
configuration) then we just add them to that group instead and that
group controls all the privileges. So this is a no-op for our setup.

We prioritize the group -- if both the group and the IAP service ID are
specified, we'll still just add them to the group

b/534931170
nomulus-20260723-RC00
2026-07-22 16:53:41 +00:00
gbrodmanandGitHub f0fae9898b Fix GCS gradle hash verification in Cloud Build (#3174) nomulus-20260722-RC03 nomulus-20260722-RC01 nomulus-20260722-RC02 2026-07-22 13:09:09 +00:00
Weimin YuandGitHub 302faa21dd Fix host_create template in load test (#3172)
The hosts created by load test is intentionally non-subordinate. They
must not have IP addresses.
nomulus-20260721-RC04 nomulus-20260722-RC00 nomulus-20260721-RC03
2026-07-21 21:21:58 +00:00
Pavlo TkachandGitHub b187193e79 Migrate external EPP proxy to integrated Nomulus EPP server (#3126)
* Remove proxy, add new service

* Consolidate MetricReporter under single listener
nomulus-20260721-RC02 nomulus-20260721-RC01
2026-07-21 19:04:33 +00:00
gbrodmanandGitHub b1c6e07fa2 Only allow console actions on live registrars (#3162)
DISABLED registrars aren't allowed to do anything. This should
include console actions.
2026-07-21 16:22:33 +00:00
gbrodmanandGitHub 718ed29070 Run Address validation on GSON deserialization too (#3166)
we should run these checks when we deserialize from json objects, not
just when we use the builder to construct it. We did something similar
for TLD recently.
2026-07-21 14:00:36 +00:00
gbrodmanandGitHub a2f0035f89 Mitigate XSW in SMD verification (#3148)
There's a bit of a mismatch between the bit that parses the Java object
and the bit that validates the XML. The parser parses the Java root
node, however the validator follows the reference in a (valid) signature
to *any* node, which can be hidden elsewhere.

To fix this robustly:
- Enforce that the XML signature Reference URI matches the root element ID precisely
- Assert that exactly one <smd:signedMark> element exists in the DOM
- Don't allow additional signed marks elsewhere in the XML just in case
nomulus-20260721-RC00
2026-07-20 16:52:11 +00:00
Weimin YuandGitHub 7e0489e5f9 Sanitize and parse logged TLDs using JSON arrays (#3164)
In FlowReporter, we extract TLDs from EPP domain commands and log them under 'tld' and 'tlds' metadata fields to generate ICANN activity reports. Previously, invalid or extremely long TLD names (such as email addresses or long domain labels in non-validated XML payloads) could break downstream log parsing.

To prevent this issue, this change does the following:

1. Java Sanitization:
   Introduces `toLogSafeLabel(...)` in `DomainFlowUtils`, which converts ASCII to lowercase, replaces any character outside of `[a-z0-9.-]` with `-`, and limits the length to 63 characters (appending '...' if truncated). FlowReporter now uses this method on guessed TLDs before logging them.

2. SQL Modernization:
   Upgrades `epp_metrics.sql` and `epp_metrics_test.sql` to use BigQuery's native `JSON_EXTRACT_STRING_ARRAY(json, '$.tlds')` instead of the legacy `SPLIT(REGEXP_EXTRACT(JSON_EXTRACT(...)))` workaround. Because the native function extracts clean string elements, it removes the need to strip quotation marks with additional regexes and prevents parsing failures on commas, spaces, or nested structures.

SQL change tested in BigQuery.

BUG=http://b/535230985
nomulus-20260718-RC00 nomulus-20260719-RC00 nomulus-20260720-RC00 proxy-20260720-RC00
2026-07-17 19:42:00 +00:00
gbrodmanandGitHub d29a98bdd3 Handle RegistryLock unlock edge case with doubly-applied lock (#3159)
We allow admin locks to overwrite already-applied locks. In the case
where that happens in between an unlock request and an unlock
completion, we shouldn't allow the unlock completion to go through.
2026-07-17 17:36:26 +00:00
gbrodmanandGitHub d6dd95b052 Only delete Workspace accounts if we created them (#3161)
Just in case, we should check to make sure that we created the
account-with-no-registrars before we delete it.
2026-07-17 16:10:34 +00:00
gbrodmanandGitHub 6b74924067 Handle too-large requests/responses (#3147)
100 MB is kind of arbitrary, but it's as good as any other limit.

D.1 numbers 1, 8, 9
2026-07-17 16:10:20 +00:00
gbrodmanandGitHub 71e9bc95a7 Use cache for RDAP searches for host by superord domain (#3145)
this allows us to only do one query instead of looping over the hosts
and doing queries one by one, while still leveraging the cache.
2026-07-17 14:33:48 +00:00
gbrodmanandGitHub bf54a0d0c4 Add index to rlock email address (#3150)
We sometimes query by this. The table is very small but eh, just in case
nomulus-20260717-RC00
2026-07-17 03:47:53 +00:00
gbrodmanandGitHub 2a04b9be9b Reload SINGLE_USE ATs to avoid cache race conditions (#3157) 2026-07-17 03:47:48 +00:00