1
0
mirror of https://github.com/google/nomulus synced 2026-01-05 13:07:04 +00:00
Commit Graph

4116 Commits

Author SHA1 Message Date
gbrodman
4e21152f04 Add TestCacheExtension in ResourceFlowTC to fix flakes (#1749)
Basically, what's happening here is that some flow tests are adding
things to the claims list cache which is stored statically, meaning that
some other tests can pick those up when they shouldn't. By adding the
extension in RFTC, it'll clear out the caches after each test.
nomulus-20220819-RC00
2022-08-18 15:04:29 -04:00
gbrodman
22193474d5 Add Flyway and golden files for console User object (#1747) nomulus-20220818-RC00 2022-08-17 16:48:14 -04:00
Pavlo Tkach
efd5244ebd Add email notification when DNS update fails (#1734) nomulus-20220817-RC00 2022-08-16 12:59:08 -04:00
gbrodman
87e5d19fe5 Allow anchor tenant creation via allocation token behavior (#1735)
* Allow anchor tenant creation via allocation token behavior

This also enforces that non-superusers cannot create registrations on
trademarked names prior to the sunrise period, even if they have an
allocation token with ANCHOR_TENANT behavior.
nomulus-20220816-RC00
2022-08-15 12:42:16 -04:00
Lai Jiang
bbb6174c9f Remove InjectExtension (#1739)
It is only used to set the clock used by Ofy, and it admits itself being
an ugly hack...

Also applied IntelliJ suggestions on touched files.
nomulus-20220815-RC01 nomulus-20220815-RC00 nomulus-20220814-RC00 nomulus-20220813-RC00
2022-08-12 14:56:53 -04:00
gbrodman
2b826651e6 Create a registry lock permission and corresponding account manager role (#1740)
* Create a registry lock permission and corresponding account manager role

This allows us to distinguish between standard account managers and
users that might have the registry lock permission. This will make the
registry lock password-setting flow easier (user can reset their
password iff they have the REGISTRY_LOCK permission, instead of having a
separate boolean) and allows us to easily determine whether or not a
user should have access to registry lock views in the UI.
2022-08-12 12:18:09 -04:00
Lai Jiang
e4132db8ed Delete SetClockExtension (#1738)
We no longer write to commit logs, and the ReplayExtension that this
extension is supposed to be used with is already deleted.
nomulus-20220812-RC00
2022-08-11 13:16:30 -04:00
Pavlo Tkach
45d90e7c68 Extend IP validation test with message verification (#1736) nomulus-20220811-RC00 2022-08-10 13:27:55 -04:00
sarahcaseybot
028005906a Add allocation token to transfer command (#1737) nomulus-20220810-RC00 2022-08-09 15:18:23 -04:00
sarahcaseybot
78d78e21cb Add CurrentPackageToken to Domain table (#1720)
* Add allocation token to Domain table

* Add tests

* Change column name

* change test names
2022-08-09 11:23:21 -04:00
Lai Jiang
2f3ac2e43b Remove unused columns in BillingCancellation (#1721)
We stopped using these columns after BillingVKey is removed in
https://github.com/google/nomulus/pull/1710.
nomulus-20220809-RC00
2022-08-08 10:28:30 -04:00
gbrodman
632e3831e5 Add caches to ClaimsListDao and ClaimsList (#1731)
We cache the ClaimsList Java object for six hours (we don't expect it to
change frequently, and the cron job to update it only runs every twelve
hours). Subsequent calls to ClaimsListDao::get will return the cached
value.

Within the ClaimsList Java object itself, we cache any labels that we
have retrieved. While we already have a form of a cache here in the
"labelsToKeys" map, that only handles situations where we've loaded the
entire map from the database. We want to have a non-guaranteed cache in
order to make repeated calls to getClaimKey fast.
nomulus-20220808-RC00 nomulus-20220807-RC00 nomulus-20220806-RC00
2022-08-05 17:29:59 -04:00
Ben McIlwain
9ff25f9a67 Make domain transfers use (and retain) the renewal price/behavior (#1701)
* Use the new renewal price logic in transfer flow

* Fix build

* Add renewal handling on all transfer flows

* Merge branch 'master' into transfer-retain-renewal-price

* Merge branch 'master' into transfer-retain-renewal-price

* Add more tests
2022-08-05 15:53:27 -04:00
gbrodman
eb1a314666 Add base object classes for new user/role permissioning model (#1707)
* Add base object classes for new user/role permissioning model

- Adds the permissions themselves
- Adds the six roles that a user may have -- three global, three
  per-registrar
- Adds the mapping from role -> set of permissions
- Adds a UserRoles object to encapsulate the answer to the question of
  "does this user have this permission?"
- Adds a User class as a base to show how we will use the new UserRoles
  object
2022-08-05 14:18:16 -04:00
Ben McIlwain
0e182546f9 Rename HostResource -> Host (#1733)
* Rename HostResource -> Host
2022-08-05 10:28:45 -04:00
Pavlo Tkach
ad06ba2e1e Extend registrar allowed IPs auth exception text with IP address (#1726) nomulus-20220805-RC00 nomulus-20220804-RC00 2022-08-03 15:24:00 -04:00
Lai Jiang
c903ed4c13 For some reason after the upgrade to Gradle, the core.jar file is no (#1730)
longer included in the generated WAR, even though the deploy_jar
configuration is specified as a dependency.

I could not figure out a way to tweak the configuration dependency to
have core.jar pulled into the .war, so I decided to just explicitly pick
it from its known location.

TESTED=deployed to alpha and verified that the instances can start.
nomulus-20220803-RC02
2022-08-03 10:26:44 -04:00
Ben McIlwain
f6d2a7ff91 Rename DomainContent -> DomainBase (#1729)
* Rename DomainContent -> DomainBase

This is a follow-up to PR #1725 which renamed DomainBase to Domain. Now, the
class naming hierarchy has the same structure as ContactBase/HostBase.
nomulus-20220803-RC01 nomulus-20220803-RC00
2022-08-02 17:21:17 -04:00
Pavlo Tkach
35530616d6 Add docker prerequisite to install guide (#1728) 2022-08-02 16:20:59 -04:00
Ben McIlwain
ede919d7dc Rename DomainBase -> Domain (#1725)
* Rename DomainBase -> Domain

This was a long time coming, but we couldn't do it until we left Datastore, as
the Java class name has to match the Datastore entity name.

Subsequent PRs will rename ContactResource to Contact and HostResource to Host,
so that everything matches the SQL table names (and is shorter!).

* Merge branch 'master' into rename-domainbase
2022-08-02 16:03:30 -04:00
Lai Jiang
827b7db227 Make Kythe run work with Gradle 7 (#1727)
The fix is based on b/240627423. I tested locally and was able to build
with the -PenableCrossReferencing=true flag successfully.

TESTED=run the kythe GCB pipeline locally.
2022-08-02 13:19:47 -04:00
Lai Jiang
1aefd9a78d Remove ofy support from BillingEvent (#1710)
This PR turns out to be more massive than I would have liked but it
  deals with all billing event related stuff, which are more or link all
  intertwined:

  * Remove all billing events as Ofy entities.
  * Add a temporary annotation to allow BillingEvent's ID to be
    auto-allocated by ofy while not lacking the Ofy @Id annotation.
  * Remove Modification, which is only used in ofy.
  * Remove BillingVKey, as we do not need to store the ofy key parent
     information anymore. The VKey for a billing event now just contain
     its primary key, and can be converted by VKeyConverter.
  * Remove BigQuery related code in the billing pipeline.

  Note that after BillingVKey is removed, several columns in
  BillingCancellation are no longer needed. The change to database schema
  will be handled in https://github.com/google/nomulus/pull/1721 after
  this PR is deployed to production.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1710)
<!-- Reviewable:end -->
2022-08-02 11:36:28 -04:00
Ben McIlwain
950d12577f Revert "Upgrade App Engine Standard to Java 17 w/ bundled APIs (#1714)" (#1724)
* Revert "Upgrade App Engine Standard to Java 17 w/ bundled APIs (#1714)"

This partially reverts commit d8e77e2ab2 (it keeps
intact unrelated version upgrades).

We need to temporarily revert this because Spinnaker isn't quite yet playing
nice with the new <app-engine-apis> configuration option in appengine-web.xml
(it seems like this was added recently and Spinnaker is still stuck on App
Engine SDK version 1.9.82 which predates it). Hopefully we can get that
dependency updated in Spinnaker soon and then we can re-upgrade to Java 17.
nomulus-20220802-RC00 nomulus-20220801-RC00 nomulus-20220731-RC00 nomulus-20220730-RC00
2022-07-29 16:08:36 -04:00
sarahcaseybot
5d559085d7 Flyway files for adding current_package_token column to Domain table (#1719)
* Flyway files for adding allocationToken column to Domain table

* Rename column to current_package_token

* Update er diagram

* Add foreign key to DomainHistory
2022-07-29 12:35:43 -04:00
Ben McIlwain
268c1048cc Delete the BackfillRegistrarBillingAccounts scrap command (#1722) 2022-07-29 11:40:11 -04:00
Ben McIlwain
74e22089fe Remove the withoutBackup methods from TransactionManager (#1723)
* Remove the withoutBackup methods from TransactionManager

This doesn't do anything in Cloud SQL (it was for Ofy only).
2022-07-29 11:39:56 -04:00
Ben McIlwain
9914d4d04e Fix environment specification error message in build.gradle :deploy (#1717)
* Fix environment specification error message in build.gradle :deploy
nomulus-20220729-RC00 nomulus-20220728-RC02
2022-07-28 15:24:31 -04:00
gbrodman
f006605753 Don't include deleted domains in the ICANN reporting total_domains field (#1713)
This shouldn't matter for billing or anything like that because the
actual actions performed that month are still correct, but before this
PR we're including all domains ever created in the total_domains number,
including deleted domains

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1713)
<!-- Reviewable:end -->
nomulus-20220728-RC01 nomulus-20220728-RC00
2022-07-27 16:24:43 -04:00
Ben McIlwain
d8e77e2ab2 Upgrade App Engine Standard to Java 17 w/ bundled APIs (#1714)
* Upgrade App Engine Standard to Java 17 w/ bundled APIs

Note that this doesn't yet upgrade our actual Gradle scripts to use a more
recent of Java (that will happen separately); this solely affects the GAE
instances.

I followed the instructions here:
https://cloud.google.com/appengine/docs/standard/java-gen2/services/access

And note that I removed threadsafe true from appengine's XML config because
that doesn't do anything anymore and was just throwing errors (the new
instances handle multiple requests in parallel by default, no configuration
necessary).
2022-07-27 15:00:10 -04:00
Ben McIlwain
7197f9258c Add gnupg2 dependency to install guide (#1716) nomulus-20220727-RC00 2022-07-26 18:31:45 -04:00
Ben McIlwain
0f1a257a3d Fix else if on separate line causing compilation warning (#1715) 2022-07-26 17:03:47 -04:00
Michael Muller
343263cc19 Fixed distutils deprecation warning (#1711)
* Fixed distutils deprecation warning

Replace distutils.find_executable() with shutil.which().
2022-07-26 15:51:52 -04:00
gbrodman
d502438b3e Ignore TLD state on domain create when using corresponding token (#1709) 2022-07-26 13:54:12 -04:00
Michael Muller
8007a75c32 Upgrade to Gradle 7.0 (#1712)
* Convert to gradle 7.

* More fixes, regenerated lockfiles.

* Update lockfiles for dependency update.

* Fix show_upgrade_diff for new lockfile format

* Add property for allowInsecureProtocol

Allow us to override the restriction against use of plain HTTP for
communication to dependency repositories.  We need this to be able to use a
local proxy for dependency gathering.

* Checking in missing gradle.lockfile
2022-07-26 11:41:27 -04:00
sarahcaseybot
40c58bb6f3 Implement EPP Allocation Token Extension for domain:renew (#1693)
* Implement EPP Allocation Token Extension for domain:renew

* Add more tests

* Fix AllocationTokenFlowUtilsTest

* Combine loadTokenAndValidateDomain with verifyAllocationTokenIfPresent

* Change to Optional.empty

* Remove unused variable
2022-07-26 10:28:32 -04:00
Lai Jiang
1ca80010c0 Remove ofy support from auto timestamp classes (#1708)
Also remove the use of ZonedDateTime, as joda DateTime can already be persisted to SQL with an existing converted.
2022-07-26 09:51:35 -04:00
sarahcaseybot
12905c1c1f Split failing dns update batches and kill after 10 retries (#1664)
* Split failing dns update batches and kill after 10 retries

* format fixes

* Add another test

* Switch to CloudTasks

* Change back to app engine header

* Change to immutableList and other changes

* Change to optional header

* Add bug ID to todo

* Switch to constructor injection

* Remove old queue

* Set response status

* Change to Optional<Integer>

* Rename action status

* Switched to use CLoudTaskHelper

* Remove spy in test
nomulus-20220726-RC00
2022-07-25 10:45:10 -04:00
gbrodman
cf89d9354c Add a registration_behavior column to AllocationToken (#1695)
This is, as of now, unused but we can use it for b/237683906 and
b/237800445 in the future to allow for special behavior dictated by
allocation tokens rather than having to reserve specific domains.

Note that we enforce a tied domain for ANCHOR_TENANT tokens (because
they should be matched to a domain) but not for BYPASS_TLD_STATE tokens.
nomulus-20220725-RC00 nomulus-20220724-RC00 nomulus-20220723-RC00 nomulus-20220722-RC00 nomulus-20220721-RC00
2022-07-20 12:50:25 -04:00
Lai Jiang
49b1b2d058 Remove support for @Mapify (#1691)
We no longer need to support Objectify's @Mapify logic. This
substantially simplified how we store maps in the database.
nomulus-20220720-RC00
2022-07-19 11:13:23 -04:00
gbrodman
47ce568964 Delete unnecessary replay-related objects from DBs (#1692)
This deletes LastSqlTransaction and ReplayGap in Datastore, as well as
SqlReplayCheckpoint and TransactionEntity in SQL. These are all related
to replay and are no longer used.
nomulus-20220719-RC00 nomulus-20220718-RC00 nomulus-20220717-RC00 nomulus-20220716-RC00
2022-07-15 14:50:28 -04:00
Michael Muller
5934fecd4f Remove columns for unused ofy key reconstitution (#1706)
* Remove columns for unused ofy key reconstitution

Remove the columns in Domain, DomainHistory, GracePeriod and
GracePeriodHistory that were only used for Ofy key reconstitution.

All uses of these were removed in #1660.

* Add forgotten flyway file.
nomulus-20220715-RC00
2022-07-14 16:49:08 -04:00
gbrodman
f72487fe2e Tell IANA not to encode the RDAP base URL response (#1705) nomulus-20220714-RC00 2022-07-13 14:31:16 -04:00
Ben McIlwain
5cb2a0a430 Re-add database migration state commands (#1702)
* Re-add database migration state commands

These were removed in PR #1661, but we do still need them for the time being
until we complete the ID migration as well.
nomulus-20220713-RC00
2022-07-12 16:49:16 -04:00
gbrodman
dbb96d36d3 Refactor SMDRL + Claims CSV parsing (#1704)
This uses the Apache commons CSV parsing instead of rolling our own.

Annoyingly, the results that we're given aren't exactly proper CSVs
since they have a non-standard line of data at the top, and the header
is actually the second line.
2022-07-12 15:42:12 -04:00
gbrodman
02145d34d9 Use the new IANA url for registrar RDAP base URLs (#1703)
Fortunately this no longer requires a log-in, we can just send a GET
request and receive a CSV result in return.

This also adds the apache-commons CSV parser to the dependencies

See https://b.corp.google.com/issues/237784559 for more details
2022-07-12 14:02:38 -04:00
Ben McIlwain
36becfb54f Use new renew cost calculation in handleFeeRequest() (#1694)
* Resolve conflict

* Fix setup for existing test cases in info and check flow

* Revise info flow test cases

* Fix lint

* Merge branch 'master' into handlefeerequest-renew

* Address code review comments myself

* Merge branch 'master' into handlefeerequest-renew

* Get test passing

* Add check flow tests

* Format, consolidate test helpers

* Don't unnecessarily specify XML name
nomulus-20220712-RC00 nomulus-20220711-RC00 nomulus-20220710-RC00 nomulus-20220709-RC00 nomulus-20220708-RC00
2022-07-07 17:28:45 -04:00
gbrodman
2a5b427a80 Add non-SQL removal code for Transaction and SqlReplayCheckpoint (#1700) 2022-07-07 14:36:01 -04:00
gbrodman
9a2fb6f8b4 Add SQL column for AllocationToken registration behavior (#1697)
First part of b/237683906

We'll add the Java behavior in a later PR; it'll be an enum with the
values DEFAULT, BYPASS_TLD_STATE, and ANCHOR_TENANT
nomulus-20220707-RC00 nomulus-20220706-RC00 nomulus-20220705-RC00 nomulus-20220704-RC00 nomulus-20220703-RC00 nomulus-20220702-RC00
2022-07-01 18:26:18 -04:00
gbrodman
abc240fc2d Revert "Remove DatabaseMigrationStateSchedule (#1689)" (#1698)
This reverts commit 18d51738ce.
2022-07-01 17:25:13 -04:00
Michael Muller
a424030a65 Deal with some getOfyKey() references (#1696)
Now that ofy keys aren't necessarily being restored, it seemed prudent to
audit existing uses to verify that we aren't relying on any keys that may now
be null.

This fixes one case that appeared to be potentially problematic (in
ResourceFlowUtils), removes a few methods that call getOfyKey() but are no
longer used, and adds comments to one use of the key that appears to be safe
after visual inspection.
2022-07-01 16:59:03 -04:00