1
0
mirror of https://github.com/google/nomulus synced 2026-01-25 15:12:13 +00:00

Compare commits

...

70 Commits

Author SHA1 Message Date
Michael Muller
53ece5eda4 Enable filtering across all test tasks (#311)
The segregated test targets in core break the --tests filter.  Fix this by
defining a "testFilter" property and creating the FilteringTest task type that
applies it to the property set by "--tests".
2019-10-11 14:24:01 -04:00
Shicong Huang
6c220567c8 Write ClaimsList to Cloud SQL (#223)
* Rewrite ClaimsListShard with new API

* Write ClaimsList to Cloud SQL

* Add creationTimestamp
2019-10-11 12:31:34 -04:00
Weimin Yu
c3e3a1353b Allow schema-push to all env with Flyway (#309)
* Make Flyway schema task work with prod and sandbox

Also renamed the 'superuser' role to 'admin' since
we do not own super user in Cloud SQL.

* Allow pushing schema to all env with Flyway

Desktop schema push to production is needed in the short term.
Long-termly we need to decide if this should be kept for glass
breaking

Schema push to sandbox and production requires interactiveconfirmation.

Also fixed a typo in initialize_roles.sql.
2019-10-10 16:32:21 -04:00
Ben McIlwain
ce480a5191 Add Bloom filters to the Cloud SQL PremiumList schema (#306)
* Add Bloom filters to the Cloud SQL PremiumList schema

They are slightly different from the existing Bloom filters stored in Datastore
in that they now use an ASCII String encoding rather than the more generic
CharSequence, and there is no maximum size (whereas we previously had to live
within the 1 MB max entity size for Datastore).
2019-10-09 17:06:42 -04:00
Weimin Yu
f2a2b2d2e2 Modify Cloud SQL user management scripts (#302)
* Modify Cloud SQL user management scripts

Create readonly and readwrite roles that may be granted to users.
Also configured default privileges for tables created in the future.

Made sure arbitrary users may not create database or tables.

* Modify Cloud SQL user management scripts

Create readonly and readwrite roles that may be granted to users.
Also configured default privileges for tables created in the future.

Made sure arbitrary users may not create database or tables.
2019-10-09 16:02:42 -04:00
gbrodman
906b054f4b Load persistence.xml classes before adding test entities (#307)
* Load persistence.xml classes before adding test entities

* Also use persistence.xml in GenerateSqlSchemaCommand

* Add exception message

* remove duplicate line
2019-10-09 15:15:04 -04:00
Shicong Huang
a694e247cd Add support for nomulus tool to connect to Cloud SQL (#303) 2019-10-09 10:30:35 -04:00
Shicong Huang
022f397cd9 Implement ZonedDateTimeConverter (#287)
* Implement ZonedDateTimeConverter

* Use dedicated TestEntity for ZonedDateTimeConverterTest
2019-10-08 16:46:07 -04:00
Ben McIlwain
5dc058ec99 Automatically apply JPA type converters (#305)
* Automatically apply JPA type converters

* Include converters in tests and schema generation too
2019-10-08 13:16:39 -04:00
Ben McIlwain
0fd7cf29b5 Make it clear that registered domain lists are also exported to Drive (#304)
* Make it clear that registered domain lists are also exported to Drive
2019-10-08 13:15:55 -04:00
Ben McIlwain
bc7f3546c7 Add initial support for persisting premium lists to Cloud SQL (#285)
* Add initial support for persisting premium lists to Cloud SQL

This adds support to the `nomulus create_premium_list` command only; support for
`nomulus update_premium_list` will be in a subsequent PR.

The design goals for this PR were:
1. Do not change the existing codepaths for premium lists at all, especially not
   on the read path.
2. Write premium lists to Cloud SQL only if requested (i.e. not by default), and
   write to Datastore first so as to not be blocked by errors with Cloud SQL.
3. Reuse existing codepaths to the maximum possible extent (e.g. don't yet
   re-implement premium list parsing; take advantage of the existing logic), but
   also ...
4. Some duplication is OK, since the existing Datastore path will be deleted
   once this migration is complete, leaving only the codepaths for Cloud SQL.

* Refactor out common logic

* Add DAO test

* Add tests for parsing premium lists

* Use containsExactly

* Code review changes

* Format

* Re-generate schema

* Fix column names

* Make some tests pass

* Add SQL migration scripts

* Fix test errors
2019-10-08 11:47:22 -04:00
Ben McIlwain
658f61bd8f Fix errors in DB update README file (#301)
* Fix errors in DB update README file
2019-10-07 15:55:53 -04:00
Michael Muller
8ca8fff387 Refactor environment -> project map out of build (#300)
Move the project mapping into its own file so that it can be more easily
overriden.
2019-10-07 13:34:49 -04:00
Michael Muller
8bcfb1802e Add an explanation to dummied-out JPA init (#299)
* Add an explanation to dummied-out JPA init

Add a more elaborate explanation of why actual JpaTransactionManager
initialization was removed from the factory.
2019-10-07 12:47:24 -04:00
gbrodman
a259dee986 Add a DAO for RegistryLock objects (#290)
* Add a DAO for RegistryLock objects

* Add an index on verification code and remove old file

* Move to v4

* Use camelCase in index names

* Javadoc fixes

* Allow alteration of RegistryLock objects in-place

* save, load-modify, read in separate transactions

* Change the creation timestamp to be a CreateAutoTimestamp
2019-10-07 11:24:08 -04:00
Michael Muller
ebc8d54f94 Add persistence.xml to the war files (#293)
* Add persistence.xml to the war files
* Always use the DummyJpaTransactionManager

Use the DJTM until we get all of the dependencies set up for all of the
environments.

This shouldn't affect any of the unit tests, these use the
JpaTransactionManagerRule to set up a local database and connection.

This fixes the App Engine build.
2019-10-06 21:32:27 -04:00
sarahcaseybot
e9ce389269 Implement UpdateAutoTimestampConverter (#298)
* Implement a JPA-based converter for UpdateAutoTimestamp, allowing us to persist instances of this class.
2019-10-04 16:45:32 -04:00
Michael Muller
e07be9780e Implement CreateAutoTimestampConverter (#282)
* Implement CreateAutoTimestampConverter

Implement a JPA-based converter for CreateAutoTimestamp, allowing us to
persist instances of this class.

Note that converters appear to be required to convert to and from database
types that are generally known to JDBC.  For example, conversion to Timestamp
works, conversion to OffsetDateTime does not (even though this works through
the JDBC interface directly).
2019-10-04 16:31:14 -04:00
Michael Muller
31b5abb9a1 Improve error handling for environment property (#295)
* Improve error handling for environment property

Improve the error messages that we get for a bad or missing environment
property.  Move the property processing into the main build so that we do it
only once and configure all of the appengine deployment tasks to check that a
project has been defined and print a friendly error if it hasn't.

Note that even if the check isn't configured, this change prevents deployment
because the gcpProject will be set to null.  It just won't print as useful an
error message.

Tested: ran appengineDeployAll with and without the environment property, ran
"build" to verify that we don't get any complaints for non-deployment targets.

* Changes for review.

* Changes for review

* Changes for review.

* Changes for review.
2019-10-04 13:23:36 -04:00
Michael Muller
aa4e242a34 Give JpaTransactionManagerRule more parameters (#292)
* Give JpaTransactionManagerRule more parameters

Allow users of the rule to add annotated classes and properties, both useful
for testing.

* Change in response to review.

* Changes for review.

* Move test EntityManagerFactory create method

Move the test create method into the JpaTransactionManagerRuleTest.

* Remove nomulus SQL dialect from G.S.S.Command

Remove NomulusPostgreSQLDialect from GenerateSqlSchemaCommand (it has been
moved to its own top-level class).
2019-10-03 16:14:28 -04:00
Weimin Yu
964f264c9d Add maven-publish task for SQL schema jar (#289)
* Add maven-publish task for SQL schema jar

Add task to publish SQL schema jar with flyway scripts and
golden schema to a maven repo. This will be used
for pre-release testing in the future.

This task is not part of build and needs to be invoked explicitly.

User needs to provide schema_jar_repo and schema_version
properties.

* Merge branch 'master' of https://github.com/google/nomulus into publish-schema-jar

* Add maven-publish task for SQL schema jar

Add task to publish SQL schema jar with flyway scripts and
golden schema to a maven repo. This will be used
for pre-release testing in the future.

This task is not part of build and needs to be invoked explicitly.

User needs to provide schema_jar_repo and schema_version
properties.
2019-10-02 14:27:36 -04:00
gbrodman
cc018a6dac Don't crash on a null completion timestamp (#296)
* Don't crash on a null completion timestamp

* optional
2019-10-02 12:53:22 -04:00
Weimin Yu
c25adbbd9c Restrict nomulus user access to flyway table (#297)
* Restrict nomulus user access to flyway table

The regular read-write user should not have write permissions to
the flyway metadata table.
2019-10-02 11:05:46 -04:00
gbrodman
42edf16f3f Edit a couple of nits in the db README (#291)
* Edit a couple of nits in the db README

* Update README.md
2019-09-30 15:50:19 -04:00
Shicong Huang
36ab0cb45c Add Cloud SQL configs for nomulus tool (#288)
We will use a different user for nomulus tool to connect to Cloud SQL. 
This PR added corresponding configurations for that.
2019-09-27 15:58:18 -04:00
Shicong Huang
34da498958 Add sql scripts to create other types of user (#283)
1. User with read-only permission to all tables
2. User with read-write permission to schema and all tables
2019-09-27 15:12:59 -04:00
Lai Jiang
a3317b8552 Protect KMS-secured data against destruction in upcoming google provider update. (#284)
Export of cl/270900150.

To refer to a KMS key or key ring, we should use the stable `.self_link`. Using `.id` instead provides an unstable identifier which may change (and it will change in the upcoming update of the google provider to 2.9.1). A change in the identifier will cause Terraform to destroy and recreate the key. Destroying the key means all data associated with it is lost; the key cannot be recreated.

This CL replaces `.id` with `.self_link`, so all of those problems will not happen. In addition, `prevent_destroy` protects the key against delete-and-recreate in general.
2019-09-27 12:12:58 -04:00
Shicong Huang
9c7872dbb7 Add socket factory as runtime dependency (#286)
* Add Cloud SQL socket factory as runtime dependency

* Lock update from update_dependency.sh
2019-09-27 11:41:59 -04:00
Shicong Huang
ff439f598d Add JpaTransactionManagerRule (#277)
* Add RegistryRuntime and JpaTransactionManagerRule

* Revert RegistryJavaRuntime change

* Add JpaTransactionManager interface
2019-09-24 15:38:53 -04:00
Weimin Yu
b0c13042a6 Upgrade to Truth 1.0 (#281)
* Upgrade to Truth 1.0

Refactored fail(...) to assertWithMessage().fail().

Upgraded com.google.monitoring-client family of dependencies to 1.0.6

Also fixed bad use of io.StringIO (on binary buffer) recently introduced to
google-java-format-diff.py.
2019-09-24 10:23:58 -04:00
Lai Jiang
3009f754fa Link to Sourcegraph logo a different file. (#280)
The logo will be visible on cloned repos outside GitHub. See
b/141380880.
2019-09-23 15:31:09 -04:00
Shicong Huang
cc314d4838 Make project core depend on db at test runtime (#278)
This PR also upgraded the version of Guava to 28.1-jre to
resolve missing stream package issue.
2019-09-23 14:12:24 -04:00
Michael Muller
153fc7d6bf Add work-around for our "explode war" failure (#279)
For some reason tools.jar (which we don't need in the runtime in the first
place) gets exploded readonly, causing subsequent builds to fail since they
can't overwrite it.  This hack makes it writable at the end of explodeWar.
2019-09-20 16:23:36 -04:00
Shicong Huang
b35c813ae6 Add sql files to manage nomulus user (#274) 2019-09-20 14:46:02 -04:00
Lai Jiang
3764e2b26c Update registryTool task to better handle command line arguments (#273)
* Update registryTool task to better handle command line arguments

Tokens are delimited by pipes and can be escaped. If we use -args
directly, we will not be able to escape the delimiter, if both the
double and single quotes happen to be present in the arguments.

See:

https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/JavaExec.html#setArgsString-java.lang.String-
2019-09-20 13:04:01 -04:00
gbrodman
8f5bd5da01 Fix non-Python3-compliant code in formatter script (#275)
* Fix non-Python3-compliant code in formatter script

* Add space
2019-09-19 12:49:22 -04:00
Weimin Yu
8123c53916 Fix dependency-locking config (#276)
* Fix dependency-locking config

Reenable dependency locking after a bug errorneouly turned it off.

Removed the guava-related workaround that forcefully resolve to
the -jre distribution.

Enabled locking for buildSrc by updating its property file.

Updated all lock files.
2019-09-19 11:37:20 -04:00
Shicong Huang
d031dedad6 Implement JpaTransactionManager (#268) 2019-09-19 10:01:40 -04:00
Michael Muller
d14f0fe485 Output command test output as well as consuming it (#248)
* Output command test output as well as consuming it

CommandTestCase currently consumes stdout & stderr for the command being
tested.  Unfortunately, this results in us not being able to see the command
output.  Add an output splitter so that output gets written to the original
stream in addition to being captured.

A simpler approach would be to print the captured data after command
completion.  However, this won't work for tests that become hung and also
won't display results in real-time.

Tested: Ran a command test with verboseTestOutput=true, verified that standard
output was visible.

* Save and restore original stdout/err in cmd tests

We have to restore the original stdout/stderr print streams otherwise we end
up nesting them across tests which eventually causes the RDE tests to OOM.
2019-09-17 13:23:30 -04:00
Lai Jiang
b86a35bca1 Upgrade to Gradle 5.6.2 (#272) 2019-09-16 14:07:59 -07:00
Weimin Yu
1db5fba452 Add RegistryLock schema to Flyway deployment folder (#270)
* Add RegistryLock schema to Flyway deployment folder

Added creation script of RegistryLock to Flyway deployment folder.

Fixed previous scripts (PremiumList- and ClaimsList-related) for
FK name change (cause by table name changes: names are quoted now).
We should consider generating foreign key names by ourselves.

Since the alpha database is empty, we dropped and recreated the schema.

Added instructions on how to submit new database incremental changes
in the README file.

Updated RegistryLock.java, removing unnecessary annotations:
- For most fields, the 'name=' property is no longer necessary not that
  the naming strategy is in place. The exceptions are the two used in
  the unique index.
- The @Column annotation is implicit.
2019-09-16 16:47:58 -04:00
Weimin Yu
668ed7c5f6 Force Gradle to use jre version of Guava (#271)
* Force Gradle to use jre version of Guava

Guava is often specified by version only by other
dependencies. In such cases, Gradle usually resolves
it to the '-android' version, which lacks the collection
classes.

We use custom resolution strategy to force the selection
of the '-jre' version.
2019-09-16 14:36:14 -04:00
Weimin Yu
3fb799f112 Add schema deployment tests (#265)
* Add schema deployment tests

Updated flyway schema script files so that they reflect what is
currently deployed in alpha: ClaimsList and PremiumList related
elements.

Put post-schema-push pg_dump output in nomulus.golden.sql as the
authoritative schema. Also added test to verify that the schema
pushed by flyway will result in exactly the golden schema.

Upgraded testcontainers to 1.12.1.

Added a custom Truth subject for better diffing of multi-line
text blocks.

Removed claims_list.sql and premium_list.sql, as we do not have use for
them.

* Add schema deployment tests

Updated flyway schema script files so that they reflect what is
currently deployed in alpha: ClaimsList and PremiumList related
elements.

Put post-schema-push pg_dump output in nomulus.golden.sql as the
authoritative schema. Also added test to verify that the schema
pushed by flyway will result in exactly the golden schema.

Upgraded testcontainers to 1.12.1.

Added a custom Truth subject for better diffing of multi-line
text blocks.

Removed claims_list.sql and premium_list.sql, as we do not have use for
them.

* Add schema deployment tests

Updated flyway schema script files so that they reflect what is
currently deployed in alpha: ClaimsList and PremiumList related
elements.

Put post-schema-push pg_dump output in nomulus.golden.sql as the
authoritative schema. Also added test to verify that the schema
pushed by flyway will result in exactly the golden schema.

Upgraded testcontainers to 1.12.1.

Added a custom Truth subject for better diffing of multi-line
text blocks.

Removed claims_list.sql and premium_list.sql, as we do not have use for
them.
2019-09-12 15:16:12 -04:00
Weimin Yu
40a6b788a0 Regenerate schema using tools command (#269)
* Regenerate schema using tools command

Rerun GenerateSqlSchemaCommand to pick up RegistryLock
and naming strategy change.

Also updated a new license term which seems to just pop up.
2019-09-12 14:26:22 -04:00
Lai Jiang
b87ef869a0 Add a task to run the nomulus tool (#262) 2019-09-12 08:09:32 -07:00
Shicong Huang
48d8b1274f Add configurations for Cloud SQL secrets (#266) 2019-09-11 12:20:08 -04:00
gbrodman
401653ad4a Add RegistryLock SQL schema (#243)
* Add RegistryLock SQL schema

* Refactor a bit

* Move registrylock -> domain

* Clearing up lock workflow

* Add more docs and remove LockStatus

* Responses to CR

* Add repoId javadoc

* Add registry lock to persistence xml file

* Quote rather than backtick

* Remove unnecessary check

* File TODO

* Remove uniqueness constraint on verification code

* Remove import

* add index

* Add to SQL generation task

* Move fields around to be the same order as Hibernate's generated sql
2019-09-10 18:17:36 -04:00
gbrodman
b35026b30d Add naming strategy (#256)
* Add naming strategy

* Add test for formatting in GenerateSqlSchemaCommandTest

* "domain" -> "Domain"

* Call site literals

* checkstyle

* varchar -> text

* Fix external messaging capitalization typo
2019-09-09 14:27:52 -04:00
Michael Muller
c5e4e862bd Fix command tests that set stdout/stderr (#258)
* Fix command tests that set stdout/stderr

CommandTestCase already wraps stdout stderr, just use the provided methods.
2019-09-09 09:12:48 -04:00
gbrodman
729b69550e Add DateTimeUtils conversion methods (#260)
* Add DateTimeUtils conversion methods

* Use a more reliabile method than getId

* Add some more tests
2019-09-06 16:46:51 -04:00
Weimin Yu
471ed7caa7 Use Flyway to deploy SQL schema to non-prod (#255)
* Use Flyway to deploy SQL schema to non-prod

Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Updated ClaimsList.java so that Hibernate-generated
schema would use the right types.

Using 'varchar(255)' instead of 'text' for string columns
for now. We will need to investigate how to force Hibernate
to use the desired types in all cases.

* Use Flyway to deploy SQL schema to non-prod

Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Updated ClaimsList.java so that Hibernate-generated
schema would use the right types.

Using 'varchar(255)' instead of 'text' for string columns
for now. We will need to investigate how to force Hibernate
to use the desired types in all cases.Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Updated ClaimsList.java so that Hibernate-generated
schema would use the right types.

Using 'varchar(255)' instead of 'text' for string columns
for now. We will need to investigate how to force Hibernate
to use the desired types in all cases.

* Use Flyway to deploy SQL schema to non-prod

Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Corrected the type of ClaimsEntry's revision_id column.
It should be plain int8, not bigserial.

Make GenerateSqlSchemaCommand use a custom dialect that
converts all varchar type to 'text' and timestamp to
'timestamptz'.

* Use Flyway to deploy SQL schema to non-prod

Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Use a custome dialect in GenerateSqlSchemaCommand to
convert varchar type to 'text' and timestamp to 'timestamptz'.

Corrected ClaimsEntry's revision_id column type to int8.
This column tracks parent table's primary key and should
not be bigserial.

* Use Flyway to deploy SQL schema to non-prod

Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Use a custome dialect in GenerateSqlSchemaCommand to
convert varchar type to 'text' and timestamp to 'timestamptz'.

Corrected ClaimsEntry's revision_id column type to int8.
This column tracks parent table's primary key and should
not be bigserial.

* Use Flyway to deploy SQL schema to non-prod

Added Gradle tasks to deploy and drop schema in alpha
using Flyway.

Use a custome dialect in GenerateSqlSchemaCommand to
convert varchar type to 'text' and timestamp to 'timestamptz'.

Corrected ClaimsEntry's revision_id column type to int8.
This column tracks parent table's primary key and should
not be bigserial.
2019-09-06 16:29:49 -04:00
Ben McIlwain
ded6d38223 Add Cloud SQL schema for premium lists (#254)
* Re-add other schema classes

* Add Cloud SQL schema for premium lists

This won't work quite yet, pending a solution for the type translator issue
(which will be needed for the currency field, and potentially others).
2019-09-06 11:25:34 -04:00
Ben McIlwain
859b70098c Fix typo of word "dependencies" in gradle build files (#259)
* Fix typo of word "dependencies" in gradle build files
2019-09-05 16:52:46 -04:00
gbrodman
1e0be188fe Serve up all the closure library files (#257)
Not necessary for the tests but it gets rid of log lines
2019-09-05 10:57:35 -04:00
Michael Muller
f83a8a221b Generate basic schema for all of DomainBase (#246)
* Generate basic schema for all of DomainBase

Generate a basic schema for DomainBase and everything that is part of it.
This still isn't complete, in particular it lacks:

- Correct conversions for problematic types (e.g. DateTime, Key...)
- Schema generation for history records.
- Name translation.
2019-09-05 10:54:29 -04:00
Shicong Huang
2967256766 Consolidate EntityManagerFactoryProviderTest (#253)
Check if EntityManagerFactory is null before calling close() to avoid NullPointerException.
2019-09-04 15:46:13 -04:00
Ben McIlwain
28700cd610 Make parameter names in generate_sql_schema command consistent (#250)
* Make parameter names in generate_sql_schema command consistent

The rest of the nomulus commands use underscores for delimiting words in
parameter names, so this should too.

Also fixed capitalization of some proper nouns.
2019-09-04 11:10:22 -04:00
Michael Muller
c4b87a1d13 Move EntityManagerFactoryProviderTest to fragile (#251)
* Move EntityManagerFactoryProviderTest to fragile

* Add EMF Provider Test to docker tests

Add EntityManagerFactoryProviderTest to the docker incompatible test patterns
and use the latter list to compose the fragile tests.
2019-09-03 19:47:58 -04:00
gbrodman
1a728e96cb Allow setting the registry lock password in the UI (#241)
* Allow setting the lock password in the UI

* Add more screenshot tests

* Responses to CR and more screenshot tests

* Formatting

* Simplify lambda
2019-09-03 16:39:02 -04:00
Michael Muller
d3ccad3aa7 Start postgresql container in generate_sql_schema (#249)
* Start postgresql container in generate_sql_schema

Add a --start-postgresql option to the nomulus generate_sql_schema command so
that users don't have to start their own docker container to run it.

* Made default behavior be to give guidance
2019-08-30 16:04:34 -04:00
Ben McIlwain
dc9d9158d8 Don't write TX records for domains deleted in autorenew grace period (#244)
* Don't write TX records for domains deleted in autorenew grace period

When the project was originally being designed, we envisioned have a purely
point-in-time architecture that would allow the system to run indefinitely
without requiring any background batch jobs. That is, you could create a domain,
and 10 years later you could infer every autorenewal billing event that should
have happened during those 10 years, without ever having to run any code that
would go through and retroactively create those events as they happened.

This ended up being very complicated, especially when it came to generating
invoices, so we gave up on it and instead wrote the
ExpandRecurringBillingEventsAction mapreduce, which would run as a cronjob and
periodically expand the recurring billing information into actual one-time
billing events. This made the invoicing scripts MUCH less complicated since they
only had to tabulate one-time billing events that had actually occurred over the
past month, rather than perform complicated logic to infer every one-time event
over an arbitrarily long period.

I bring this up because this architectural legacy explains why billing events
are more complicated than could otherwise be explained from current
requirements. This is why, for instance, when a domain is deleted during the 45
day autorenewal period, the ExpandRecurringBillingEventsAction will still write
out a history entry (and corresponding billing events) on the 45th day, because
it needs to be offset by the cancellation billing event for the autorenew grace
period that was already written out synchronously as part of the delete flow.

This no longer really makes sense, and it would be simpler to just not write out
these phantom history entries and billing events at all, but it would be a
larger modification to fix this, so I'm not touching it here.

Instead, what I have done is to simply not write out the DomainTransactionRecord
in the mapreduce if the recurring billing event has already been canceled
(i.e. because the domain was deleted or transferred). This seems inconsistent
but actually does make sense, because domain transaction records are never
written out speculatively (unlike history entries and billing events); they
correspond only to actions that have actually happen.  This is because they were
architected much more recently than billing events, and don't use the
point-in-time hierarchy.

So, here's a full accounting of how DomainTransactionRecords work as of this commit:
1. When a domain is created, one is written out.
2. When a domain is explicitly renewed, one is written out.
3. When a domain is autorenewed, one is written out at the end of the grace period.
4. When a domain is deleted (in all cases), a record is written out recording the
   deletion.
5. When a domain is deleted in the add grace period, an offsetting record is
   written out with a negative number of years, in addition to the deletion record.
6. When a domain is deleted in the renewal grace period, an offsetting record is
   likely written out in addition.
7. When a domain is deleted in the autorenew grace period, there is no record that
   needs to be offset because no code ran at the exact time of the autorenew, so
   NO additional record should be written out by the expand mapreduce.
   *THIS IS CHANGED AS OF THIS COMMIT*.
8. When a domain is transferred, all existing grace periods are cancelled and
   corresponding cancelling records are written out. Note that transfers include a
   mandatory, irrevocable 1 year renewal.
9. In the rare event that a domain is restored, all recurring events are
   re-created, and there is a 1 year mandatory renewal as part of the restore with
   corresponding record written out.

So, in summary, billing events and history entries are often written out
speculatively, and can subsequently be canceled, but the same is not true of
domain transaction records.  Domain transaction records are only written out as
part of a corresponding action (which for autorenewals is the expand recurring
cronjob).

* rm unused import
2019-08-30 12:04:35 -04:00
Michael Muller
0daa89ae25 Remove the "showAllOutput" property from the build (#247)
* Remove the "showAllOutput" property from the build

It doesn't work very well and has been superseded by "verboseTestOutput",
which does the same thing and more.
2019-08-30 10:43:07 -04:00
gbrodman
d6bcdc241e Remove 'value' from RDAP link responses (#236)
* Remove 'value' from RDAP link responses

* Change application type to rdap+json

* Merge remote-tracking branch 'origin/master' into removeValueRdap

* CR response
2019-08-30 10:21:03 -04:00
Shicong Huang
487b695a10 Set up database connection pool (#234)
Set up database connection pool
2019-08-29 16:12:28 -04:00
Weimin Yu
b5ef99a8f8 Only apply Google Java format to changed lines (#176)
* Only apply Google Java format to changed lines

* Only apply Google Java format to changed lines

* Only apply Google Java format to changed regions

Diffs are relative to origin/master.

Three tasks are added:
- javaIncrementalFormatCheck is added to the build workflow, and
  will abort build if format violations are found.
- javaIncrementalFormatApply needs to be manually invoked to correct
  format violations, the same behavior as spotlessApply.
- javaIncrementalFormatDryRun shows the changes that would happen if
  javaIncrementalFormatApply is invoked.

These tasks work from the root directory and process the buildSrc directory
too.

The Spotless Java config is removed.

* Only apply Google Java format to changed regions

Diffs are relative to origin/master.

Three tasks are added:
- javaIncrementalFormatCheck is added to the build workflow, and
  will abort build if format violations are found.
- javaIncrementalFormatApply needs to be manually invoked to correct
  format violations, the same behavior as spotlessApply.
- javaIncrementalFormatDryRun shows the changes that would happen if
  javaIncrementalFormatApply is invoked.

These tasks work from the root directory and process the buildSrc directory
too.

The Spotless Java config is removed.

* Only apply Google Java format to changed regions

Diffs are relative to origin/master.

Three tasks are added:
- javaIncrementalFormatCheck is added to the build workflow, and
  will abort build if format violations are found.
- javaIncrementalFormatApply needs to be manually invoked to correct
  format violations, the same behavior as spotlessApply.
- javaIncrementalFormatDryRun shows the changes that would happen if
  javaIncrementalFormatApply is invoked.

These tasks work from the root directory and process the buildSrc directory
too.

The Spotless Java config is removed.

* Only apply Google Java format to changed regions

Diffs are relative to origin/master.

Three tasks are added:
- javaIncrementalFormatCheck is added to the build workflow, and
  will abort build if format violations are found.
- javaIncrementalFormatApply needs to be manually invoked to correct
  format violations, the same behavior as spotlessApply.
- javaIncrementalFormatDryRun shows the changes that would happen if
  javaIncrementalFormatApply is invoked.

These tasks work from the root directory and process the buildSrc directory
too.

The Spotless Java config is removed.
2019-08-29 16:04:34 -04:00
Lai Jiang
dd4300fce7 Update proxy deployment script description (#245) 2019-08-28 17:35:43 -04:00
Lai Jiang
844c47061b Use Gradle from gradle.org in Gradle wrapper (#239)
During release we substitute the link to a binary hosted on GCS. The
normal GitHub build can use the binary on gradle.org
2019-08-27 11:11:35 -04:00
Shicong Huang
dcceb0d49a Add sql schema and entity class for ClaimsList (#227) 2019-08-26 18:30:51 -04:00
Lai Jiang
f72c6c3c80 Remove GtechTool (#242)
It is burdensome to have to maintain two sets of tools, one of which
contains a strict subset of functionalities of the other. All admins
should use the same tool and their ability to administer should be
restricted by the IAM roles they have, not the tools they use.
2019-08-26 17:15:48 -04:00
Michael Muller
c645fe6766 Fix skipDockerIncompatibleTests (#240)
We have to add a check for the skipDockerIncompatibleTests property in the
fragileTest task, since that's where these tests now live.
2019-08-26 12:31:24 -04:00
408 changed files with 18902 additions and 1373 deletions

View File

@@ -2,7 +2,7 @@
| Internal Build | FOSS Build | LGTM | License | Code Search |
|----------------|------------|------|---------|-------------|
|[![Build Status for Google Registry internal build](https://storage.googleapis.com/domain-registry-kokoro/internal/build.svg)](https://storage.googleapis.com/domain-registry-kokoro/internal/index.html)|[![Build Status for the open source build](https://storage.googleapis.com/domain-registry-kokoro/foss/build.svg)](https://storage.googleapis.com/domain-registry-kokoro/foss/index.html)|[![Total alerts](https://img.shields.io/lgtm/alerts/g/google/nomulus.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/google/nomulus/alerts/)|[![License for this repo](https://img.shields.io/github/license/google/nomulus.svg)](https://github.com/google/nomulus/blob/master/LICENSE)|[![Link to Source Graph](https://github.com/sourcegraph/sourcegraph/blob/master/ui/assets/img/sourcegraph-logo.svg)](https://sourcegraph.com/github.com/google/nomulus)|
|[![Build Status for Google Registry internal build](https://storage.googleapis.com/domain-registry-kokoro/internal/build.svg)](https://storage.googleapis.com/domain-registry-kokoro/internal/index.html)|[![Build Status for the open source build](https://storage.googleapis.com/domain-registry-kokoro/foss/build.svg)](https://storage.googleapis.com/domain-registry-kokoro/foss/index.html)|[![Total alerts](https://img.shields.io/lgtm/alerts/g/google/nomulus.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/google/nomulus/alerts/)|[![License for this repo](https://img.shields.io/github/license/google/nomulus.svg)](https://github.com/google/nomulus/blob/master/LICENSE)|[![Link to Source Graph](https://sourcegraph.com/.assets/img/sourcegraph-light-head-logo.svg)](https://sourcegraph.com/github.com/google/nomulus)|
![Nomulus logo](./nomulus-logo.png)

View File

@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
apply from: "${rootDir.path}/projects.gradle"
apply plugin: 'war'
def environment = rootProject.environment
@@ -26,14 +25,19 @@ project.convention.plugins['war'].webAppDirName =
apply plugin: 'com.google.cloud.tools.appengine'
def coreResourcesDir = "${rootDir}/core/build/resources/main"
// Get the web.xml file for the service.
war {
webInf {
from "../../core/src/main/java/google/registry/env/common/${project.name}/WEB-INF"
from("${coreResourcesDir}/META-INF/persistence.xml") {
into "classes/META-INF"
}
}
}
def coreResourcesDir = "${rootDir}/core/build/resources/main"
war {
from("${coreResourcesDir}/google/registry/ui/html") {
include "*.html"
@@ -68,6 +72,10 @@ appengine {
if (!rootProject.prodOrSandboxEnv) {
version = 'GCLOUD_CONFIG'
}
// Don't set gcpProject directly, it gets overriden in ./build.gradle.
// Do -P environment={crash,alpha} instead. For sandbox/production,
// use Spinnaker.
projectId = gcpProject
}
}
@@ -76,6 +84,31 @@ dependencies {
compile project(':core')
}
// The tools.jar file gets pulled in from the java environment and for some
// reason gets exploded "readonly", causing subsequent builds to fail when
// they can't overwrite it. The hack below makes the file writable after
// we're done exploding it.
//
// Fun fact: We only use this jar for documentation generation and as such we
// don't need it in our warfile, as it is not used by the application at
// runtime. But it's not clear how to exclude it, as we seem to be
// constructing the jar from the entire WEB-INF directory and per-file
// exclude rules don't seem to work on it. Better solutions are welcome :-)
explodeWar.doLast {
file("${it.explodedAppDirectory}/WEB-INF/lib/tools.jar").setWritable(true)
}
rootProject.deploy.dependsOn appengineDeployAll
rootProject.stage.dependsOn appengineStage
appengineDeployAll.dependsOn rootProject.verifyDeployment
// Impose verification for all of the deployment tasks. We haven't found a
// better way to do this other than to apply to each of them independently.
// If a new task gets added, it will still fail if "environment" is not defined
// because gcpProject is null. We just won't get as friendly an error message.
appengineDeployAll.configure rootProject.verifyDeploymentConfig
appengineDeploy.configure rootProject.verifyDeploymentConfig
appengineDeployCron.configure rootProject.verifyDeploymentConfig
appengineDeployDispatch.configure rootProject.verifyDeploymentConfig
appengineDeployDos.configure rootProject.verifyDeploymentConfig
appengineDeployIndex.configure rootProject.verifyDeploymentConfig
appengineDeployQueue.configure rootProject.verifyDeploymentConfig

View File

@@ -82,6 +82,8 @@ apply from: 'dependencies.gradle'
apply from: 'dependency_lic.gradle'
apply from: 'utils.gradle'
// Custom task to run checkLicense in buildSrc, which is not triggered
// by root project tasks. A shell task is used because buildSrc tasks
// cannot be referenced in the same way as tasks from a regular included
@@ -95,11 +97,6 @@ tasks.build.dependsOn(tasks.checkLicense)
// Provide defaults for all of the project properties.
// showAllOutput: boolean. If true, dump all test output during the build.
if (!project.hasProperty('showAllOutput')) {
ext.showAllOutput = 'false'
}
// Only do linting if the build is successful.
gradleLint.autoLintAfterFailure = false
@@ -112,21 +109,61 @@ task deploy {
description = 'Deploys all services to App Engine.'
}
task verifyDeployment {
group = 'deployment'
description = 'Ensure that one cannot deploy to production or sandbox.'
doFirst {
if (rootProject.prodOrSandboxEnv) {
throw new GradleException("Cannot deploy to production or sandbox.");
}
}
}
task stage {
group = 'deployment'
description = 'Generates application directories for all services.'
}
// App-engine environment configuration. We set up all of the variables in
// the root project.
def environments = ['production', 'sandbox', 'alpha', 'crash']
def gcpProject = null
apply from: "${rootDir.path}/projects.gradle"
if (environment == '') {
// Keep the project null, this will prevent deployment. Set the
// environment to "alpha" because other code needs this property to
// explode the war file.
environment = 'alpha'
} else if (environment != 'production' && environment != 'sandbox') {
gcpProject = projects[environment]
if (gcpProject == null) {
throw new GradleException("-Penvironment must be one of " +
"${projects.keySet()}.")
}
}
rootProject.ext.environment = environment
rootProject.ext.gcpProject = gcpProject
rootProject.ext.prodOrSandboxEnv = environment in ['production', 'sandbox']
// Function to verify that the deployment parameters have been set.
def verifyDeploymentParams() {
if (prodOrSandboxEnv) {
// Do not deploy to prod or sandbox. Print a prominent error in bright red.
System.err.println('\033[31;1m-----------------------------------------------------------------')
System.err.println('*** DANGER WILL ROBINSON!')
System.err.println('*** You may not deploy to production or sandbox from gradle. Do a')
System.err.println('*** release from Spinnaker, see deployment playbook.')
System.err.println('-----------------------------------------------------------------')
throw new GradleException('Aborting. See prominent error above.')
} else if (gcpProject == null) {
def error = 'You must specify -P environment={alpha,crash}'
System.err.println("\033[33;1m${error}\033[0m")
throw GradleException("Aborting: ${error}")
}
}
// Closure that we can just drop into all of our deployment tasks.
rootProject.ext.verifyDeploymentConfig = {
doFirst { verifyDeploymentParams() }
}
// Subproject configuration.
allprojects {
// Skip no-op project
if (project.name == 'services') return
@@ -181,10 +218,21 @@ subprojects {
resolutionStrategy.activateDependencyLocking()
}
}
// Lock application dependencies except for the gradle-license-report
// plugin. See dependency_lic.gradle for more information.
configurations.findAll { it.name != 'dependencyLicenseReport' }.each {
it.resolutionStrategy.activateDependencyLocking()
}
afterEvaluate {
if (rootProject.enableDependencyLocking.toBoolean()) {
// Lock application dependencies except for the gradle-license-report
// plugin. See dependency_lic.gradle for the reason why.
//
// To selectively activate dependency locking without hardcoding them
// in the 'configurations' block, the following code must run after
// project evaluation, when all configurations have been created.
configurations.each {
if (it.name != 'dependencyLicenseReport') {
it.resolutionStrategy.activateDependencyLocking()
}
}
}
}
@@ -241,12 +289,9 @@ subprojects {
}
}
if (['util', 'proxy', 'core', 'prober'].contains(project.name)) return
test {
testLogging.showStandardStreams = Boolean.parseBoolean(showAllOutput)
}
if (['util', 'proxy', 'core', 'prober', 'db'].contains(project.name)) return
// TODO(weiminyu): investigate if the block below is still needed
ext.relativePath = "google/registry/${project.name}"
sourceSets.each {
@@ -329,7 +374,59 @@ def createGetBuildSrcDirectDepsTask(outputFileName) {
"getBuildSrcDeps_${java.util.UUID.randomUUID()}".toString(),
Exec) {
workingDir "${rootDir}/buildSrc"
commandLine '../gradlew', 'exportDenpendencies',
commandLine '../gradlew', 'exportDependencies',
"-PdependencyExportFile=${outputFileName}"
}
}
rootProject.ext {
invokeJavaDiffFormatScript = { action ->
def scriptDir = rootDir.path.endsWith('buildSrc')
? "${rootDir}/../java-format"
: "${rootDir}/java-format"
def workingDir = rootDir.path.endsWith('buildSrc')
? "${rootDir}/.."
: rootDir
def formatDiffScript = "${scriptDir}/google-java-format-git-diff.sh"
return ext.execInBash(
"${formatDiffScript} ${action}", "${workingDir}")
}
}
// Checks if modified lines in Java source files need reformatting.
// Note that this task checks modified Java files in the entire repository.
task javaIncrementalFormatCheck {
doLast {
def checkResult = invokeJavaDiffFormatScript("check")
if (checkResult == 'true') {
throw new IllegalStateException(
"Some Java files need to be reformatted. You may use the "
+ "'javaIncrementalFormatDryRun' task to review\n "
+ "the changes, or the 'javaIncrementalFormatApply' task "
+ "to reformat.")
} else if (checkResult != 'false') {
throw new RuntimeException(
"Failed to invoke format check script:\n" + checkResult)
}
println("Incremental Java format check ok.")
}
}
// Shows how modified lines in Java source files will change after formatting.
// Note that this task checks modified Java files in the entire repository.
task javaIncrementalFormatDryRun {
doLast {
println("${invokeJavaDiffFormatScript("show")}")
}
}
// Checks if modified lines in Java source files need reformatting.
// Note that this task processes modified Java files in the entire repository.
task javaIncrementalFormatApply {
doLast {
invokeJavaDiffFormatScript("format")
}
}
tasks.build.dependsOn(tasks.javaIncrementalFormatCheck)

View File

@@ -90,7 +90,7 @@ gradle.projectsEvaluated {
}
}
task exportDenpendencies {
task exportDependencies {
def outputFileProperty = 'dependencyExportFile'
def output = project.hasProperty(outputFileProperty)
? new PrintStream(

View File

@@ -1 +1 @@
enableDependencyLocking=false
enableDependencyLocking=true

View File

@@ -15,12 +15,13 @@ com.googlecode.javaewah:JavaEWAH:1.1.6
com.jcraft:jsch:0.1.54
com.jcraft:jzlib:1.1.1
com.netflix.nebula:gradle-lint-plugin:10.4.2
com.netflix.nebula:nebula-gradle-interop:1.0.7
com.netflix.nebula:nebula-test:7.2.5
com.netflix.nebula:nebula-gradle-interop:1.0.11
com.netflix.nebula:nebula-test:7.3.0
commons-codec:commons-codec:1.9
commons-io:commons-io:2.5
commons-lang:commons-lang:2.6
commons-logging:commons-logging:1.2
javax.inject:javax.inject:1
junit:junit:4.12
log4j:log4j:1.2.14
nebula.lint:nebula.lint.gradle.plugin:10.4.2
@@ -35,10 +36,10 @@ org.apache.ant:ant:1.8.4
org.apache.commons:commons-lang3:3.8.1
org.apache.httpcomponents:httpclient:4.5.2
org.apache.httpcomponents:httpcore:4.4.4
org.apache.maven:maven-artifact:3.6.1
org.apache.maven:maven-builder-support:3.6.1
org.apache.maven:maven-model-builder:3.6.1
org.apache.maven:maven-model:3.6.1
org.apache.maven:maven-artifact:3.6.2
org.apache.maven:maven-builder-support:3.6.2
org.apache.maven:maven-model-builder:3.6.2
org.apache.maven:maven-model:3.6.2
org.codehaus.gpars:gpars:1.2.1
org.codehaus.groovy:groovy-all:2.4.9
org.codehaus.groovy:groovy-ant:2.1.8
@@ -47,17 +48,18 @@ org.codehaus.groovy:groovy-templates:2.1.8
org.codehaus.groovy:groovy-xml:2.4.7
org.codehaus.groovy:groovy:2.4.7
org.codehaus.jsr166-mirror:jsr166y:1.7.0
org.codehaus.plexus:plexus-component-annotations:1.7.1
org.codehaus.plexus:plexus-interpolation:1.25
org.codehaus.plexus:plexus-utils:3.2.0
org.codehaus.plexus:plexus-utils:3.2.1
org.codenarc:CodeNarc:0.25.2
org.eclipse.jdt:core:3.1.1
org.eclipse.jgit:org.eclipse.jgit:5.0.1.201806211838-r
org.eclipse.sisu:org.eclipse.sisu.inject:0.3.3
org.gmetrics:GMetrics:0.7
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.11
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.11
org.jetbrains.kotlin:kotlin-stdlib:1.3.11
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50
org.jetbrains.kotlin:kotlin-stdlib:1.3.50
org.jetbrains:annotations:13.0
org.multiverse:multiverse-core:0.7.0
org.objenesis:objenesis:2.4

View File

@@ -20,9 +20,9 @@ com.google.cloud:google-cloud-storage:1.59.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.7
com.google.common.html.types:types:1.0.4
com.google.errorprone:error_prone_annotations:2.2.0
com.google.errorprone:error_prone_annotations:2.3.2
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.0-beta1
com.google.http-client:google-http-client-appengine:1.27.0
@@ -50,8 +50,8 @@ org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.checkerframework:checker-qual:2.8.1
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.json:json:20160212
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-commons:6.0

View File

@@ -20,9 +20,9 @@ com.google.cloud:google-cloud-storage:1.59.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.7
com.google.common.html.types:types:1.0.4
com.google.errorprone:error_prone_annotations:2.2.0
com.google.errorprone:error_prone_annotations:2.3.2
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.0-beta1
com.google.http-client:google-http-client-appengine:1.27.0
@@ -50,8 +50,8 @@ org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.checkerframework:checker-qual:2.8.1
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.json:json:20160212
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-commons:6.0

View File

@@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
org.jacoco:org.jacoco.agent:0.8.4

View File

@@ -0,0 +1,11 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
org.jacoco:org.jacoco.agent:0.8.4
org.jacoco:org.jacoco.ant:0.8.4
org.jacoco:org.jacoco.core:0.8.4
org.jacoco:org.jacoco.report:0.8.4
org.ow2.asm:asm-analysis:7.1
org.ow2.asm:asm-commons:7.1
org.ow2.asm:asm-tree:7.1
org.ow2.asm:asm:7.1

View File

@@ -20,9 +20,9 @@ com.google.cloud:google-cloud-storage:1.59.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.7
com.google.common.html.types:types:1.0.4
com.google.errorprone:error_prone_annotations:2.2.0
com.google.errorprone:error_prone_annotations:2.3.2
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.0-beta1
com.google.http-client:google-http-client-appengine:1.27.0
@@ -50,8 +50,8 @@ org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.checkerframework:checker-qual:2.8.1
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.json:json:20160212
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-commons:6.0

View File

@@ -20,9 +20,9 @@ com.google.cloud:google-cloud-storage:1.59.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.7
com.google.common.html.types:types:1.0.4
com.google.errorprone:error_prone_annotations:2.3.1
com.google.errorprone:error_prone_annotations:2.3.2
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.0-beta1
com.google.http-client:google-http-client-appengine:1.27.0
@@ -35,8 +35,8 @@ com.google.oauth-client:google-oauth-client:1.27.0
com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:0.45
com.google.truth:truth:0.45
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.java-diff-utils:diffutils:1.3.0
com.ibm.icu:icu4j:57.1
commons-codec:commons-codec:1.11
@@ -57,8 +57,8 @@ org.apache.commons:commons-text:1.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.checkerframework:checker-qual:2.8.1
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.hamcrest:hamcrest-core:1.3
org.json:json:20160212
org.mockito:mockito-core:2.25.0

View File

@@ -20,9 +20,9 @@ com.google.cloud:google-cloud-storage:1.59.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.7
com.google.common.html.types:types:1.0.4
com.google.errorprone:error_prone_annotations:2.3.1
com.google.errorprone:error_prone_annotations:2.3.2
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.0-beta1
com.google.http-client:google-http-client-appengine:1.27.0
@@ -35,8 +35,8 @@ com.google.oauth-client:google-oauth-client:1.27.0
com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:0.45
com.google.truth:truth:0.45
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.java-diff-utils:diffutils:1.3.0
com.ibm.icu:icu4j:57.1
commons-codec:commons-codec:1.11
@@ -57,8 +57,8 @@ org.apache.commons:commons-text:1.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.checkerframework:checker-qual:2.8.1
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.hamcrest:hamcrest-core:1.3
org.json:json:20160212
org.mockito:mockito-core:2.25.0

View File

@@ -20,9 +20,9 @@ com.google.cloud:google-cloud-storage:1.59.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.7
com.google.common.html.types:types:1.0.4
com.google.errorprone:error_prone_annotations:2.3.1
com.google.errorprone:error_prone_annotations:2.3.2
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.0-beta1
com.google.http-client:google-http-client-appengine:1.27.0
@@ -35,8 +35,8 @@ com.google.oauth-client:google-oauth-client:1.27.0
com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:0.45
com.google.truth:truth:0.45
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.java-diff-utils:diffutils:1.3.0
com.ibm.icu:icu4j:57.1
commons-codec:commons-codec:1.11
@@ -57,8 +57,8 @@ org.apache.commons:commons-text:1.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.checkerframework:checker-qual:2.8.1
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.hamcrest:hamcrest-core:1.3
org.json:json:20160212
org.mockito:mockito-core:2.25.0

View File

@@ -12,6 +12,9 @@
{
"moduleLicense": "Apache-2.0"
},
{
"moduleLicense": "Apache License"
},
{
"moduleLicense": "Apache License 2.0"
},
@@ -111,6 +114,9 @@
{
"moduleLicense": "\\n Dual license consisting of the CDDL v1.1 and GPL v2\\n "
},
{
"moduleLicense": "Eclipse Distribution License (New BSD License)"
},
{
"moduleLicense": "Eclipse Distribution License v. 1.0"
},
@@ -126,9 +132,18 @@
{
"moduleLicense": "Eclipse Public License v1.0"
},
{
"moduleLicense": "Eclipse Public License - v 2.0"
},
{
"moduleLicense": "https://www.eclipse.org/legal/epl-2.0/, http://www.gnu.org/copyleft/gpl.html, http://www.gnu.org/licenses/lgpl.html"
},
{
"moduleLicense": "Google App Engine Terms of Service"
},
{
"moduleLicense": "GNU General Public License Version 2"
},
{
"moduleLicense": "GNU General Public License, version 2, with the Classpath Exception"
},
@@ -144,6 +159,9 @@
{
"moduleLicense": "GNU Lesser Public License"
},
{
"moduleLicense": "GNU Lesser General Public License Version 2.1"
},
{
"moduleLicense": "GNU Library General Public License v2.1 or later"
},

View File

@@ -78,7 +78,9 @@ PRESUBMITS = {
r".*Copyright 20\d{2} The Nomulus Authors\. All Rights Reserved\.",
("java", "js", "soy", "sql", "py", "sh", "gradle"), {
".git", "/build/", "/generated/", "node_modules/",
"JUnitBackports.java", "registrar_bin.", "registrar_dbg."
"JUnitBackports.java", "registrar_bin.", "registrar_dbg.",
"google-java-format-diff.py",
"nomulus.golden.sql"
}, REQUIRED):
"File did not include the license header.",

View File

@@ -43,21 +43,6 @@ def outcastTestPatterns = [
"google/registry/tools/server/CreatePremiumListActionTest.*",
]
// Tests that conflict with members of both the main test suite and the
// outcast suite. They seem to be affected by global states outside of
// Nomulus classes, e.g., threads and objects retained by frameworks.
// TODO(weiminyu): identify cause and fix offending tests.
def fragileTestPatterns = [
// Problem seems to lie with AppEngine TaskQueue for test.
"google/registry/cron/TldFanoutActionTest.*",
// Test Datastore inexplicably aborts transaction.
"google/registry/model/tmch/ClaimsListShardTest.*",
// Creates large object (64MBytes), occasionally throws OOM error.
"google/registry/model/server/KmsSecretRevisionTest.*",
"google/registry/tools/GenerateSqlSchemaCommandTest.*",
"google/registry/webdriver/*",
]
// Tests that fail when running Gradle in a docker container, e. g. when
// building the release artifacts in Google Cloud Build.
def dockerIncompatibleTestPatterns = [
@@ -70,9 +55,23 @@ def dockerIncompatibleTestPatterns = [
// respected. However when running in Docker the user is root by default, so
// every file is read/write-able. There is no way to exclude specific test
// methods, so we exclude the whole test class.
"google/registry/tools/params/PathParameterTest.*"
"google/registry/tools/params/PathParameterTest.*",
"google/registry/persistence/PersistenceModuleTest.*",
]
// Tests that conflict with members of both the main test suite and the
// outcast suite. They seem to be affected by global states outside of
// Nomulus classes, e.g., threads and objects retained by frameworks.
// TODO(weiminyu): identify cause and fix offending tests.
def fragileTestPatterns = [
// Problem seems to lie with AppEngine TaskQueue for test.
"google/registry/cron/TldFanoutActionTest.*",
// Test Datastore inexplicably aborts transaction.
"google/registry/model/tmch/ClaimsListShardTest.*",
// Creates large object (64MBytes), occasionally throws OOM error.
"google/registry/model/server/KmsSecretRevisionTest.*",
] + dockerIncompatibleTestPatterns
sourceSets {
main {
java {
@@ -169,6 +168,7 @@ dependencies {
compile deps['com.google.appengine:appengine-remote-api']
compile deps['com.google.auth:google-auth-library-credentials']
compile deps['com.google.auth:google-auth-library-oauth2-http']
runtimeOnly deps['com.google.cloud.sql:postgres-socket-factory']
compile deps['com.google.code.gson:gson']
compile deps['com.google.auto.value:auto-value-annotations']
compile deps['com.google.code.findbugs:jsr305']
@@ -218,7 +218,6 @@ dependencies {
compile deps['org.bouncycastle:bcpg-jdk15on']
testCompile deps['org.bouncycastle:bcpkix-jdk15on']
compile deps['org.bouncycastle:bcprov-jdk15on']
compile deps['org.hibernate:hibernate-core']
compile deps['org.joda:joda-money']
compile deps['org.json:json']
testCompile deps['org.mortbay.jetty:jetty']
@@ -227,7 +226,7 @@ dependencies {
testCompile deps['org.seleniumhq.selenium:selenium-chrome-driver']
testCompile deps['org.seleniumhq.selenium:selenium-java']
testCompile deps['org.seleniumhq.selenium:selenium-remote-driver']
testCompile deps['org.testcontainers:postgresql']
compile deps['org.testcontainers:postgresql']
testCompile deps['org.testcontainers:selenium']
compile deps['xerces:xmlParserAPIs']
compile deps['xpp3:xpp3']
@@ -235,6 +234,7 @@ dependencies {
// Known issue: nebula-lint misses inherited dependency.
compile project(':third_party')
compile project(':util')
testRuntime project(':db')
// Include auto-value in compile until nebula-lint understands
// annotationProcessor
@@ -254,7 +254,7 @@ dependencies {
testCompile deps['org.hamcrest:hamcrest-all']
testCompile deps['org.hamcrest:hamcrest-core']
testCompile deps['org.hamcrest:hamcrest-library']
compile deps['org.hibernate:hibernate-core']
compile deps['org.hibernate:hibernate-hikaricp']
testCompile deps['junit:junit']
testCompile deps['org.mockito:mockito-core']
runtime deps['org.postgresql:postgresql']
@@ -558,22 +558,49 @@ artifacts {
testRuntime testJar
}
task fragileTest(type: Test) {
/**
* We have to break out the test suites because some of the tests conflict
* with one another, but unfortunately this breaks the "--tests" flag. The
* --tests flag only applies to the task named on the command line (usually
* just "test"), not for all tasks of type "Test".
*
* As a better solution, FilteringTest sets testNameIncludePatterns (the
* internal property that --tests sets) from the value of the "testFilter"
* property, allowing us to filter across all the tests in core without
* explicitly specifying a test task or causing errors because there are no
* matching tests in the main task.
*
* To use it, define "testFilter" to be a comma-separated collection of class
* names (wildcards are allowed):
*
* ./gradlew test -P testFilter=*.FooBar,google.registry.tools.ShellCommandTest
*/
class FilteringTest extends Test {
void setTests(List<String> tests) {
// Common exclude pattern. See README in parent directory for explanation.
exclude "**/*TestCase.*", "**/*TestSuite.*"
include tests
if (project.testFilter) {
testNameIncludePatterns = project.testFilter.split(',')
}
}
}
task fragileTest(type: FilteringTest) {
// Common exclude pattern. See README in parent directory for explanation.
exclude "**/*TestCase.*", "**/*TestSuite.*"
include fragileTestPatterns
tests = fragileTestPatterns
if (rootProject.findProperty("skipDockerIncompatibleTests") == "true") {
exclude dockerIncompatibleTestPatterns
}
// Run every test class in a freshly started process.
forkEvery 1
// Uncomment to see test outputs in stdout.
//testLogging.showStandardStreams = true
}
task outcastTest(type: Test) {
// Common exclude pattern. See README in parent directory for explanation.
exclude "**/*TestCase.*", "**/*TestSuite.*"
include outcastTestPatterns
task outcastTest(type: FilteringTest) {
tests = outcastTestPatterns
// Sets the maximum number of test executors that may exist at the same time.
maxParallelForks 5
@@ -593,10 +620,44 @@ task findGoldenImages(type: JavaExec) {
args arguments
}
task generateGoldenImages(type: Test) {
// Common exclude pattern. See README in parent directory for explanation.
exclude "**/*TestCase.*", "**/*TestSuite.*"
include "**/webdriver/*"
// To run the nomulus tool with these command line tokens:
// "--foo", "bar baz", "--qux=quz"
// gradle registryTool --args="--foo 'bar baz' --qux=quz"
// or:
// gradle registryTool --PtoolArgs="--foo|bar baz|--qux=quz"
// Note that the delimiting pipe can be backslash escaped if it is part of a
// parameter.
task registryTool(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'google.registry.tools.RegistryTool'
// If "-PtoolArgs=..." is present in the command line, use it to set the args,
// otherwise use the default flag, which is "--args" to set the args.
doFirst {
def toolArgs = rootProject.findProperty("toolArgs")
if (toolArgs != null) {
def delimiter = '|'
toolArgs += delimiter
def argsList = []
def currArg = ''
for (def i = 0; i < toolArgs.length(); i++) {
def currChar = toolArgs[i]
if (currChar != delimiter) {
currArg += currChar
} else if (i != 0 && toolArgs[i - 1] == '\\') {
currArg = currArg.substring(0, currArg.length() - 1) + currChar
} else {
argsList.add(currArg)
currArg = ''
}
}
args = argsList
}
}
}
task generateGoldenImages(type: FilteringTest) {
tests = ["**/webdriver/*"]
// Sets the maximum number of test executors that may exist at the same time.
maxParallelForks 5

View File

@@ -0,0 +1,3 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.

View File

@@ -0,0 +1,3 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.

View File

@@ -1,6 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.0.23
cglib:cglib-nodep:2.2
@@ -8,6 +9,7 @@ com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
@@ -80,7 +82,7 @@ com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
@@ -92,8 +94,8 @@ com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:metrics:1.0.4
com.google.monitoring-client:stackdriver:1.0.4
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
@@ -108,9 +110,14 @@ com.googlecode.charts4j:charts4j:1.3
com.googlecode.json-simple:json-simple:1.1.1
com.ibm.icu:icu4j:57.1
com.jcraft:jsch:0.1.55
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.13.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
@@ -146,18 +153,23 @@ io.opencensus:opencensus-contrib-grpc-util:0.17.0
io.opencensus:opencensus-contrib-http-util:0.21.0
it.unimi.dsi:fastutil:6.5.16
javax.activation:activation:1.1
javax.annotation:javax.annotation-api:1.2
javax.activation:javax.activation-api:1.2.0
javax.annotation:javax.annotation-api:1.3.2
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
javax.xml.bind:jaxb-api:2.3.0
javax.xml.bind:jaxb-api:2.3.1
jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
@@ -169,20 +181,32 @@ org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.8.1
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-lang3:3.5
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-core:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:1.9.5
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
@@ -192,7 +216,15 @@ org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.slf4j:slf4j-api:1.7.25
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3

View File

@@ -1,6 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.0.23
cglib:cglib-nodep:2.2
@@ -8,6 +9,7 @@ com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
@@ -79,7 +81,7 @@ com.google.errorprone:error_prone_annotations:2.3.3
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
@@ -91,8 +93,8 @@ com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:metrics:1.0.4
com.google.monitoring-client:stackdriver:1.0.4
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
@@ -107,9 +109,14 @@ com.googlecode.charts4j:charts4j:1.3
com.googlecode.json-simple:json-simple:1.1.1
com.ibm.icu:icu4j:57.1
com.jcraft:jsch:0.1.55
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.13.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
@@ -144,18 +151,23 @@ io.opencensus:opencensus-contrib-grpc-util:0.17.0
io.opencensus:opencensus-contrib-http-util:0.21.0
it.unimi.dsi:fastutil:6.5.16
javax.activation:activation:1.1
javax.annotation:javax.annotation-api:1.2
javax.activation:javax.activation-api:1.2.0
javax.annotation:javax.annotation-api:1.3.2
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
javax.xml.bind:jaxb-api:2.3.0
javax.xml.bind:jaxb-api:2.3.1
jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
@@ -167,20 +179,32 @@ org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.8.1
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-lang3:3.5
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-core:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:1.9.5
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
@@ -190,7 +214,15 @@ org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.slf4j:slf4j-api:1.7.25
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3

View File

@@ -0,0 +1,3 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.

View File

@@ -0,0 +1,246 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.0.23
cglib:cglib-nodep:2.2
com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.jnr:jffi:1.2.17
com.github.jnr:jnr-a64asm:1.0.0
com.github.jnr:jnr-constants:0.9.11
com.github.jnr:jnr-enxio:0.19
com.github.jnr:jnr-ffi:2.1.9
com.github.jnr:jnr-posix:3.0.47
com.github.jnr:jnr-unixsocket:0.21
com.github.jnr:jnr-x86asm:1.0.2
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
com.google.api-client:google-api-client-java6:1.27.0
com.google.api-client:google-api-client-servlet:1.29.0
com.google.api-client:google-api-client:1.29.2
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
com.google.api.grpc:grpc-google-cloud-spanner-v1:1.6.0
com.google.api.grpc:grpc-google-common-protos:1.12.0
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.44.0
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:0.38.0
com.google.api.grpc:proto-google-cloud-bigtable-v2:0.44.0
com.google.api.grpc:proto-google-cloud-datastore-v1:0.44.0
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.43.0
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:1.6.0
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:1.6.0
com.google.api.grpc:proto-google-cloud-spanner-v1:1.6.0
com.google.api.grpc:proto-google-common-protos:1.12.0
com.google.api.grpc:proto-google-iam-v1:0.12.0
com.google.api:api-common:1.7.0
com.google.api:gax-grpc:1.38.0
com.google.api:gax-httpjson:0.52.0
com.google.api:gax:1.38.0
com.google.apis:google-api-services-admin-directory:directory_v1-rev72-1.22.0
com.google.apis:google-api-services-appengine:v1-rev101-1.25.0
com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
com.google.apis:google-api-services-monitoring:v3-rev426-1.23.0
com.google.apis:google-api-services-pubsub:v1-rev20181105-1.27.0
com.google.apis:google-api-services-sheets:v4-rev483-1.22.0
com.google.apis:google-api-services-sqladmin:v1beta4-rev56-1.23.0
com.google.apis:google-api-services-storage:v1-rev20181109-1.27.0
com.google.appengine.tools:appengine-gcs-client:0.6
com.google.appengine.tools:appengine-mapreduce:0.9
com.google.appengine.tools:appengine-pipeline:0.2.13
com.google.appengine:appengine-api-1.0-sdk:1.9.48
com.google.appengine:appengine-remote-api:1.9.48
com.google.appengine:appengine-testing:1.9.58
com.google.auth:google-auth-library-credentials:0.16.1
com.google.auth:google-auth-library-oauth2-http:0.16.1
com.google.auto.value:auto-value-annotations:1.6.3
com.google.auto.value:auto-value:1.6.3
com.google.cloud.bigdataoss:gcsio:1.9.16
com.google.cloud.bigdataoss:util:1.9.16
com.google.cloud.bigtable:bigtable-client-core:1.8.0
com.google.cloud.datastore:datastore-v1-proto-client:1.6.0
com.google.cloud.sql:jdbc-socket-factory-core:1.0.12
com.google.cloud.sql:postgres-socket-factory:1.0.12
com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
com.google.cloud:google-cloud-bigtable:0.73.0-alpha
com.google.cloud:google-cloud-core-grpc:1.61.0
com.google.cloud:google-cloud-core-http:1.55.0
com.google.cloud:google-cloud-core:1.61.0
com.google.cloud:google-cloud-spanner:1.6.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.8.5
com.google.common.html.types:types:1.0.4
com.google.dagger:dagger:2.21
com.google.errorprone:error_prone_annotations:2.3.3
com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
com.google.http-client:google-http-client-jackson2:1.30.1
com.google.http-client:google-http-client-jackson:1.20.0
com.google.http-client:google-http-client-protobuf:1.20.0
com.google.http-client:google-http-client:1.30.1
com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
com.google.oauth-client:google-oauth-client-servlet:1.29.0
com.google.oauth-client:google-oauth-client:1.29.2
com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-5
com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.re2j:re2j:1.1
com.google.template:soy:2018-03-14
com.googlecode.charts4j:charts4j:1.3
com.googlecode.json-simple:json-simple:1.1.1
com.ibm.icu:icu4j:57.1
com.jcraft:jsch:0.1.55
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.13.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
io.dropwizard.metrics:metrics-core:3.1.2
io.grpc:grpc-all:1.17.1
io.grpc:grpc-alts:1.17.1
io.grpc:grpc-auth:1.17.1
io.grpc:grpc-context:1.19.0
io.grpc:grpc-core:1.17.1
io.grpc:grpc-grpclb:1.17.1
io.grpc:grpc-netty-shaded:1.17.1
io.grpc:grpc-netty:1.17.1
io.grpc:grpc-okhttp:1.17.1
io.grpc:grpc-protobuf-lite:1.17.1
io.grpc:grpc-protobuf-nano:1.17.1
io.grpc:grpc-protobuf:1.17.1
io.grpc:grpc-stub:1.17.1
io.grpc:grpc-testing:1.17.1
io.netty:netty-buffer:4.1.30.Final
io.netty:netty-codec-http2:4.1.30.Final
io.netty:netty-codec-http:4.1.30.Final
io.netty:netty-codec-socks:4.1.30.Final
io.netty:netty-codec:4.1.30.Final
io.netty:netty-common:4.1.30.Final
io.netty:netty-handler-proxy:4.1.30.Final
io.netty:netty-handler:4.1.30.Final
io.netty:netty-resolver:4.1.30.Final
io.netty:netty-tcnative-boringssl-static:2.0.17.Final
io.netty:netty-transport:4.1.30.Final
io.opencensus:opencensus-api:0.21.0
io.opencensus:opencensus-contrib-grpc-metrics:0.17.0
io.opencensus:opencensus-contrib-grpc-util:0.17.0
io.opencensus:opencensus-contrib-http-util:0.21.0
it.unimi.dsi:fastutil:6.5.16
javax.activation:activation:1.1
javax.activation:javax.activation-api:1.2.0
javax.annotation:javax.annotation-api:1.3.2
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
javax.xml.bind:jaxb-api:2.3.1
jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
org.apache.beam:beam-runners-core-construction-java:2.11.0
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
org.apache.beam:beam-sdks-java-core:2.11.0
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-lang3:3.5
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-core:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:1.9.5
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.objenesis:objenesis:1.2
org.ow2.asm:asm-analysis:7.0
org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:7.0
org.ow2.asm:asm-util:7.0
org.ow2.asm:asm:7.0
org.postgresql:postgresql:42.2.6
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3
org.xerial.snappy:snappy-java:1.1.4
org.yaml:snakeyaml:1.17
xerces:xmlParserAPIs:2.6.2
xpp3:xpp3:1.1.4c

View File

@@ -0,0 +1,24 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.github.kevinstern:software-and-algorithms:1.0
com.github.stephenc.jcip:jcip-annotations:1.0-1
com.google.auto:auto-common:0.10
com.google.code.findbugs:jFormatString:3.0.0
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotation:2.3.3
com.google.errorprone:error_prone_annotations:2.3.3
com.google.errorprone:error_prone_check_api:2.3.3
com.google.errorprone:error_prone_core:2.3.3
com.google.errorprone:error_prone_type_annotations:2.3.3
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.0.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.j2objc:j2objc-annotations:1.1
com.google.protobuf:protobuf-java:3.4.0
com.googlecode.java-diff-utils:diffutils:1.3.0
org.checkerframework:checker-qual:2.5.3
org.checkerframework:dataflow:2.5.3
org.checkerframework:javacutil:2.5.3
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.pcollections:pcollections:2.1.2

View File

@@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
org.jacoco:org.jacoco.agent:0.8.4

View File

@@ -0,0 +1,11 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
org.jacoco:org.jacoco.agent:0.8.4
org.jacoco:org.jacoco.ant:0.8.4
org.jacoco:org.jacoco.core:0.8.4
org.jacoco:org.jacoco.report:0.8.4
org.ow2.asm:asm-analysis:7.1
org.ow2.asm:asm-commons:7.1
org.ow2.asm:asm-tree:7.1
org.ow2.asm:asm:7.1

View File

@@ -0,0 +1,235 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.0.23
cglib:cglib-nodep:2.2
com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
com.google.api-client:google-api-client-java6:1.27.0
com.google.api-client:google-api-client-servlet:1.29.0
com.google.api-client:google-api-client:1.29.2
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
com.google.api.grpc:grpc-google-cloud-spanner-v1:1.6.0
com.google.api.grpc:grpc-google-common-protos:1.12.0
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.44.0
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:0.38.0
com.google.api.grpc:proto-google-cloud-bigtable-v2:0.44.0
com.google.api.grpc:proto-google-cloud-datastore-v1:0.44.0
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.43.0
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:1.6.0
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:1.6.0
com.google.api.grpc:proto-google-cloud-spanner-v1:1.6.0
com.google.api.grpc:proto-google-common-protos:1.12.0
com.google.api.grpc:proto-google-iam-v1:0.12.0
com.google.api:api-common:1.7.0
com.google.api:gax-grpc:1.38.0
com.google.api:gax-httpjson:0.52.0
com.google.api:gax:1.38.0
com.google.apis:google-api-services-admin-directory:directory_v1-rev72-1.22.0
com.google.apis:google-api-services-appengine:v1-rev101-1.25.0
com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
com.google.apis:google-api-services-monitoring:v3-rev426-1.23.0
com.google.apis:google-api-services-pubsub:v1-rev20181105-1.27.0
com.google.apis:google-api-services-sheets:v4-rev483-1.22.0
com.google.apis:google-api-services-storage:v1-rev20181109-1.27.0
com.google.appengine.tools:appengine-gcs-client:0.6
com.google.appengine.tools:appengine-mapreduce:0.9
com.google.appengine.tools:appengine-pipeline:0.2.13
com.google.appengine:appengine-api-1.0-sdk:1.9.48
com.google.appengine:appengine-remote-api:1.9.48
com.google.appengine:appengine-testing:1.9.58
com.google.auth:google-auth-library-credentials:0.16.1
com.google.auth:google-auth-library-oauth2-http:0.16.1
com.google.auto.value:auto-value-annotations:1.6.3
com.google.auto.value:auto-value:1.6.3
com.google.cloud.bigdataoss:gcsio:1.9.16
com.google.cloud.bigdataoss:util:1.9.16
com.google.cloud.bigtable:bigtable-client-core:1.8.0
com.google.cloud.datastore:datastore-v1-proto-client:1.6.0
com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
com.google.cloud:google-cloud-bigtable:0.73.0-alpha
com.google.cloud:google-cloud-core-grpc:1.61.0
com.google.cloud:google-cloud-core-http:1.55.0
com.google.cloud:google-cloud-core:1.61.0
com.google.cloud:google-cloud-spanner:1.6.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.8.5
com.google.common.html.types:types:1.0.4
com.google.dagger:dagger:2.21
com.google.errorprone:error_prone_annotations:2.3.3
com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
com.google.http-client:google-http-client-jackson2:1.30.1
com.google.http-client:google-http-client-jackson:1.20.0
com.google.http-client:google-http-client-protobuf:1.20.0
com.google.http-client:google-http-client:1.30.1
com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
com.google.oauth-client:google-oauth-client-servlet:1.29.0
com.google.oauth-client:google-oauth-client:1.29.2
com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-5
com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.re2j:re2j:1.1
com.google.template:soy:2018-03-14
com.googlecode.charts4j:charts4j:1.3
com.googlecode.json-simple:json-simple:1.1.1
com.ibm.icu:icu4j:57.1
com.jcraft:jsch:0.1.55
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.13.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
io.dropwizard.metrics:metrics-core:3.1.2
io.grpc:grpc-all:1.17.1
io.grpc:grpc-alts:1.17.1
io.grpc:grpc-auth:1.17.1
io.grpc:grpc-context:1.19.0
io.grpc:grpc-core:1.17.1
io.grpc:grpc-grpclb:1.17.1
io.grpc:grpc-netty-shaded:1.17.1
io.grpc:grpc-netty:1.17.1
io.grpc:grpc-okhttp:1.17.1
io.grpc:grpc-protobuf-lite:1.17.1
io.grpc:grpc-protobuf-nano:1.17.1
io.grpc:grpc-protobuf:1.17.1
io.grpc:grpc-stub:1.17.1
io.grpc:grpc-testing:1.17.1
io.netty:netty-buffer:4.1.30.Final
io.netty:netty-codec-http2:4.1.30.Final
io.netty:netty-codec-http:4.1.30.Final
io.netty:netty-codec-socks:4.1.30.Final
io.netty:netty-codec:4.1.30.Final
io.netty:netty-common:4.1.30.Final
io.netty:netty-handler-proxy:4.1.30.Final
io.netty:netty-handler:4.1.30.Final
io.netty:netty-resolver:4.1.30.Final
io.netty:netty-tcnative-boringssl-static:2.0.17.Final
io.netty:netty-transport:4.1.30.Final
io.opencensus:opencensus-api:0.21.0
io.opencensus:opencensus-contrib-grpc-metrics:0.17.0
io.opencensus:opencensus-contrib-grpc-util:0.17.0
io.opencensus:opencensus-contrib-http-util:0.21.0
it.unimi.dsi:fastutil:6.5.16
javax.activation:activation:1.1
javax.activation:javax.activation-api:1.2.0
javax.annotation:javax.annotation-api:1.3.2
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
javax.xml.bind:jaxb-api:2.3.1
jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
org.apache.beam:beam-runners-core-construction-java:2.11.0
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
org.apache.beam:beam-sdks-java-core:2.11.0
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-lang3:3.5
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-core:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:1.9.5
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.objenesis:objenesis:1.2
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.postgresql:postgresql:42.2.6
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3
org.xerial.snappy:snappy-java:1.1.4
org.yaml:snakeyaml:1.17
xerces:xmlParserAPIs:2.6.2
xpp3:xpp3:1.1.4c

View File

@@ -1,6 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.0.23
cglib:cglib-nodep:2.2
@@ -8,6 +9,15 @@ com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.jnr:jffi:1.2.17
com.github.jnr:jnr-a64asm:1.0.0
com.github.jnr:jnr-constants:0.9.11
com.github.jnr:jnr-enxio:0.19
com.github.jnr:jnr-ffi:2.1.9
com.github.jnr:jnr-posix:3.0.47
com.github.jnr:jnr-unixsocket:0.21
com.github.jnr:jnr-x86asm:1.0.2
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
@@ -49,6 +59,7 @@ com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
com.google.apis:google-api-services-monitoring:v3-rev426-1.23.0
com.google.apis:google-api-services-pubsub:v1-rev20181105-1.27.0
com.google.apis:google-api-services-sheets:v4-rev483-1.22.0
com.google.apis:google-api-services-sqladmin:v1beta4-rev56-1.23.0
com.google.apis:google-api-services-storage:v1-rev20181109-1.27.0
com.google.appengine.tools:appengine-gcs-client:0.6
com.google.appengine.tools:appengine-mapreduce:0.9
@@ -64,6 +75,8 @@ com.google.cloud.bigdataoss:gcsio:1.9.16
com.google.cloud.bigdataoss:util:1.9.16
com.google.cloud.bigtable:bigtable-client-core:1.8.0
com.google.cloud.datastore:datastore-v1-proto-client:1.6.0
com.google.cloud.sql:jdbc-socket-factory-core:1.0.12
com.google.cloud.sql:postgres-socket-factory:1.0.12
com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
com.google.cloud:google-cloud-bigtable:0.73.0-alpha
@@ -80,7 +93,7 @@ com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:27.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
@@ -92,8 +105,8 @@ com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:metrics:1.0.4
com.google.monitoring-client:stackdriver:1.0.4
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
@@ -108,11 +121,14 @@ com.googlecode.charts4j:charts4j:1.3
com.googlecode.json-simple:json-simple:1.1.1
com.ibm.icu:icu4j:57.1
com.jcraft:jsch:0.1.55
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.13.0
com.sun.istack:istack-commons-runtime:3.0.5
com.sun.xml.fastinfoset:FastInfoset:1.2.13
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
@@ -148,18 +164,23 @@ io.opencensus:opencensus-contrib-grpc-util:0.17.0
io.opencensus:opencensus-contrib-http-util:0.21.0
it.unimi.dsi:fastutil:6.5.16
javax.activation:activation:1.1
javax.annotation:javax.annotation-api:1.2
javax.activation:javax.activation-api:1.2.0
javax.annotation:javax.annotation-api:1.3.2
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
javax.xml.bind:jaxb-api:2.3.0
javax.xml.bind:jaxb-api:2.3.1
jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
@@ -171,34 +192,51 @@ org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.8.1
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-lang3:3.5
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-core:2.3.0
org.glassfish.jaxb:jaxb-runtime:2.3.0
org.glassfish.jaxb:txw2:2.3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-core:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:1.9.5
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.objenesis:objenesis:1.2
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-analysis:7.0
org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.slf4j:slf4j-api:1.7.25
org.ow2.asm:asm-tree:7.0
org.ow2.asm:asm-util:7.0
org.ow2.asm:asm:7.0
org.postgresql:postgresql:42.2.6
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3

View File

@@ -0,0 +1,3 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.

View File

@@ -1,6 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.33
cglib:cglib-nodep:2.2
@@ -8,6 +9,7 @@ com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
@@ -81,8 +83,8 @@ com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava-testlib:25.0-jre
com.google.guava:guava:27.1-jre
com.google.guava:guava-testlib:28.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
@@ -94,9 +96,9 @@ com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:contrib:1.0.4
com.google.monitoring-client:metrics:1.0.4
com.google.monitoring-client:stackdriver:1.0.4
com.google.monitoring-client:contrib:1.0.6
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
@@ -107,8 +109,8 @@ com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.re2j:re2j:1.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:0.45
com.google.truth:truth:0.45
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.charts4j:charts4j:1.3
com.googlecode.java-diff-utils:diffutils:1.3.0
com.googlecode.json-simple:json-simple:1.1.1
@@ -119,8 +121,11 @@ com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.11.0
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.14.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.thoughtworks.qdox:qdox:1.12.1
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
@@ -162,6 +167,7 @@ javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
@@ -170,9 +176,9 @@ jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.9.7
net.bytebuddy:byte-buddy:1.9.7
net.java.dev.jna:jna-platform:5.2.0
net.java.dev.jna:jna:5.2.0
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
@@ -185,7 +191,7 @@ org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.18
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-exec:1.3
org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
@@ -202,17 +208,28 @@ org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcpkix-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-all:1.3
org.hamcrest:hamcrest-core:1.3
org.hamcrest:hamcrest-library:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:2.25.0
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
@@ -222,7 +239,7 @@ org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
@@ -236,9 +253,12 @@ org.seleniumhq.selenium:selenium-opera-driver:3.141.59
org.seleniumhq.selenium:selenium-remote-driver:3.141.59
org.seleniumhq.selenium:selenium-safari-driver:3.141.59
org.seleniumhq.selenium:selenium-support:3.141.59
org.slf4j:slf4j-api:1.7.26
org.testcontainers:selenium:1.10.7
org.testcontainers:testcontainers:1.10.7
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:selenium:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3

View File

@@ -1,6 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.33
cglib:cglib-nodep:2.2
@@ -8,6 +9,7 @@ com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
@@ -80,8 +82,8 @@ com.google.errorprone:error_prone_annotations:2.3.3
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava-testlib:25.0-jre
com.google.guava:guava:27.1-jre
com.google.guava:guava-testlib:28.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
@@ -93,9 +95,9 @@ com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:contrib:1.0.4
com.google.monitoring-client:metrics:1.0.4
com.google.monitoring-client:stackdriver:1.0.4
com.google.monitoring-client:contrib:1.0.6
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
@@ -106,8 +108,8 @@ com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.re2j:re2j:1.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:0.45
com.google.truth:truth:0.45
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.charts4j:charts4j:1.3
com.googlecode.java-diff-utils:diffutils:1.3.0
com.googlecode.json-simple:json-simple:1.1.1
@@ -118,8 +120,11 @@ com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.11.0
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.14.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.thoughtworks.qdox:qdox:1.12.1
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
@@ -160,6 +165,7 @@ javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
@@ -168,9 +174,9 @@ jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.9.7
net.bytebuddy:byte-buddy:1.9.7
net.java.dev.jna:jna-platform:5.2.0
net.java.dev.jna:jna:5.2.0
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
@@ -183,7 +189,7 @@ org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.18
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-exec:1.3
org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
@@ -200,17 +206,28 @@ org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcpkix-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-all:1.3
org.hamcrest:hamcrest-core:1.3
org.hamcrest:hamcrest-library:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:2.25.0
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
@@ -220,7 +237,7 @@ org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
@@ -234,9 +251,12 @@ org.seleniumhq.selenium:selenium-opera-driver:3.141.59
org.seleniumhq.selenium:selenium-remote-driver:3.141.59
org.seleniumhq.selenium:selenium-safari-driver:3.141.59
org.seleniumhq.selenium:selenium-support:3.141.59
org.slf4j:slf4j-api:1.7.26
org.testcontainers:selenium:1.10.7
org.testcontainers:testcontainers:1.10.7
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:selenium:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3

View File

@@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.appengine:appengine-api-1.0-sdk:1.9.48

View File

@@ -0,0 +1,281 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.33
cglib:cglib-nodep:2.2
com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.jnr:jffi:1.2.17
com.github.jnr:jnr-a64asm:1.0.0
com.github.jnr:jnr-constants:0.9.11
com.github.jnr:jnr-enxio:0.19
com.github.jnr:jnr-ffi:2.1.9
com.github.jnr:jnr-posix:3.0.47
com.github.jnr:jnr-unixsocket:0.21
com.github.jnr:jnr-x86asm:1.0.2
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
com.google.api-client:google-api-client-java6:1.27.0
com.google.api-client:google-api-client-servlet:1.29.0
com.google.api-client:google-api-client:1.29.2
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.44.0
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
com.google.api.grpc:grpc-google-cloud-spanner-v1:1.6.0
com.google.api.grpc:grpc-google-common-protos:1.12.0
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.44.0
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:0.38.0
com.google.api.grpc:proto-google-cloud-bigtable-v2:0.44.0
com.google.api.grpc:proto-google-cloud-datastore-v1:0.44.0
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.43.0
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:1.6.0
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:1.6.0
com.google.api.grpc:proto-google-cloud-spanner-v1:1.6.0
com.google.api.grpc:proto-google-common-protos:1.12.0
com.google.api.grpc:proto-google-iam-v1:0.12.0
com.google.api:api-common:1.7.0
com.google.api:gax-grpc:1.38.0
com.google.api:gax-httpjson:0.52.0
com.google.api:gax:1.38.0
com.google.apis:google-api-services-admin-directory:directory_v1-rev72-1.22.0
com.google.apis:google-api-services-appengine:v1-rev101-1.25.0
com.google.apis:google-api-services-bigquery:v2-rev20181104-1.27.0
com.google.apis:google-api-services-clouddebugger:v2-rev20180801-1.27.0
com.google.apis:google-api-services-cloudkms:v1-rev12-1.22.0
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20181015-1.27.0
com.google.apis:google-api-services-dataflow:v1b3-rev20190126-1.27.0
com.google.apis:google-api-services-dns:v2beta1-rev6-1.22.0
com.google.apis:google-api-services-drive:v2-rev160-1.19.1
com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
com.google.apis:google-api-services-monitoring:v3-rev426-1.23.0
com.google.apis:google-api-services-pubsub:v1-rev20181105-1.27.0
com.google.apis:google-api-services-sheets:v4-rev483-1.22.0
com.google.apis:google-api-services-sqladmin:v1beta4-rev56-1.23.0
com.google.apis:google-api-services-storage:v1-rev20181109-1.27.0
com.google.appengine.tools:appengine-gcs-client:0.6
com.google.appengine.tools:appengine-mapreduce:0.9
com.google.appengine.tools:appengine-pipeline:0.2.13
com.google.appengine:appengine-api-1.0-sdk:1.9.48
com.google.appengine:appengine-api-stubs:1.9.48
com.google.appengine:appengine-remote-api:1.9.48
com.google.appengine:appengine-testing:1.9.58
com.google.auth:google-auth-library-credentials:0.16.1
com.google.auth:google-auth-library-oauth2-http:0.16.1
com.google.auto.value:auto-value-annotations:1.6.3
com.google.auto.value:auto-value:1.6.3
com.google.cloud.bigdataoss:gcsio:1.9.16
com.google.cloud.bigdataoss:util:1.9.16
com.google.cloud.bigtable:bigtable-client-core:1.8.0
com.google.cloud.datastore:datastore-v1-proto-client:1.6.0
com.google.cloud.sql:jdbc-socket-factory-core:1.0.12
com.google.cloud.sql:postgres-socket-factory:1.0.12
com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
com.google.cloud:google-cloud-bigtable:0.73.0-alpha
com.google.cloud:google-cloud-core-grpc:1.61.0
com.google.cloud:google-cloud-core-http:1.55.0
com.google.cloud:google-cloud-core:1.61.0
com.google.cloud:google-cloud-spanner:1.6.0
com.google.code.findbugs:jsr305:3.0.2
com.google.code.gson:gson:2.8.5
com.google.common.html.types:types:1.0.4
com.google.dagger:dagger:2.21
com.google.errorprone:error_prone_annotations:2.3.3
com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava-testlib:28.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
com.google.http-client:google-http-client-jackson2:1.30.1
com.google.http-client:google-http-client-jackson:1.20.0
com.google.http-client:google-http-client-protobuf:1.20.0
com.google.http-client:google-http-client:1.30.1
com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:contrib:1.0.6
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
com.google.oauth-client:google-oauth-client-servlet:1.29.0
com.google.oauth-client:google-oauth-client:1.29.2
com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-5
com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.re2j:re2j:1.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.charts4j:charts4j:1.3
com.googlecode.java-diff-utils:diffutils:1.3.0
com.googlecode.json-simple:json-simple:1.1.1
com.ibm.icu:icu4j:57.1
com.jcraft:jsch:0.1.55
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.11.0
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.14.0
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.thoughtworks.qdox:qdox:1.12.1
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
io.dropwizard.metrics:metrics-core:3.1.2
io.grpc:grpc-all:1.17.1
io.grpc:grpc-alts:1.17.1
io.grpc:grpc-auth:1.17.1
io.grpc:grpc-context:1.19.0
io.grpc:grpc-core:1.17.1
io.grpc:grpc-grpclb:1.17.1
io.grpc:grpc-netty-shaded:1.17.1
io.grpc:grpc-netty:1.17.1
io.grpc:grpc-okhttp:1.17.1
io.grpc:grpc-protobuf-lite:1.17.1
io.grpc:grpc-protobuf-nano:1.17.1
io.grpc:grpc-protobuf:1.17.1
io.grpc:grpc-stub:1.17.1
io.grpc:grpc-testing:1.17.1
io.netty:netty-buffer:4.1.30.Final
io.netty:netty-codec-http2:4.1.30.Final
io.netty:netty-codec-http:4.1.30.Final
io.netty:netty-codec-socks:4.1.30.Final
io.netty:netty-codec:4.1.30.Final
io.netty:netty-common:4.1.30.Final
io.netty:netty-handler-proxy:4.1.30.Final
io.netty:netty-handler:4.1.30.Final
io.netty:netty-resolver:4.1.30.Final
io.netty:netty-tcnative-boringssl-static:2.0.17.Final
io.netty:netty-transport:4.1.30.Final
io.opencensus:opencensus-api:0.21.0
io.opencensus:opencensus-contrib-grpc-metrics:0.17.0
io.opencensus:opencensus-contrib-grpc-util:0.17.0
io.opencensus:opencensus-contrib-http-util:0.21.0
it.unimi.dsi:fastutil:6.5.16
javax.activation:activation:1.1
javax.activation:javax.activation-api:1.2.0
javax.annotation:javax.annotation-api:1.3.2
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
javax.xml.bind:jaxb-api:2.3.1
jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.9.7
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
org.apache.beam:beam-runners-core-construction-java:2.11.0
org.apache.beam:beam-runners-direct-java:2.11.0
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.11.0
org.apache.beam:beam-sdks-java-core:2.11.0
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.11.0
org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-exec:1.3
org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
org.apache.ftpserver:ftplet-api:1.0.6
org.apache.ftpserver:ftpserver-core:1.0.6
org.apache.httpcomponents:httpclient:4.5.8
org.apache.httpcomponents:httpcore:4.4.11
org.apache.mina:mina-core:2.0.4
org.apache.sshd:sshd-core:2.0.0
org.apache.sshd:sshd-scp:2.0.0
org.apache.sshd:sshd-sftp:2.0.0
org.apache.tomcat:tomcat-annotations-api:8.0.5
org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcpkix-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.flywaydb:flyway-core:5.2.4
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-all:1.3
org.hamcrest:hamcrest-core:1.3
org.hamcrest:hamcrest-library:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:2.25.0
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.objenesis:objenesis:2.6
org.ow2.asm:asm-analysis:7.0
org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:7.0
org.ow2.asm:asm-util:7.0
org.ow2.asm:asm:7.0
org.postgresql:postgresql:42.2.6
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.141.59
org.seleniumhq.selenium:selenium-chrome-driver:3.141.59
org.seleniumhq.selenium:selenium-edge-driver:3.141.59
org.seleniumhq.selenium:selenium-firefox-driver:3.141.59
org.seleniumhq.selenium:selenium-ie-driver:3.141.59
org.seleniumhq.selenium:selenium-java:3.141.59
org.seleniumhq.selenium:selenium-opera-driver:3.141.59
org.seleniumhq.selenium:selenium-remote-driver:3.141.59
org.seleniumhq.selenium:selenium-safari-driver:3.141.59
org.seleniumhq.selenium:selenium-support:3.141.59
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:selenium:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3
org.xerial.snappy:snappy-java:1.1.4
org.yaml:snakeyaml:1.17
xerces:xmlParserAPIs:2.6.2
xpp3:xpp3:1.1.4c

View File

@@ -1,6 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
aopalliance:aopalliance:1.0
args4j:args4j:2.33
cglib:cglib-nodep:2.2
@@ -8,6 +9,15 @@ com.beust:jcommander:1.60
com.fasterxml.jackson.core:jackson-annotations:2.9.8
com.fasterxml.jackson.core:jackson-core:2.9.9
com.fasterxml.jackson.core:jackson-databind:2.9.8
com.fasterxml:classmate:1.3.4
com.github.jnr:jffi:1.2.17
com.github.jnr:jnr-a64asm:1.0.0
com.github.jnr:jnr-constants:0.9.11
com.github.jnr:jnr-enxio:0.19
com.github.jnr:jnr-ffi:2.1.9
com.github.jnr:jnr-posix:3.0.47
com.github.jnr:jnr-unixsocket:0.21
com.github.jnr:jnr-x86asm:1.0.2
com.github.luben:zstd-jni:1.3.8-3
com.google.api-client:google-api-client-appengine:1.29.0
com.google.api-client:google-api-client-jackson2:1.27.0
@@ -49,6 +59,7 @@ com.google.apis:google-api-services-groupssettings:v1-rev60-1.22.0
com.google.apis:google-api-services-monitoring:v3-rev426-1.23.0
com.google.apis:google-api-services-pubsub:v1-rev20181105-1.27.0
com.google.apis:google-api-services-sheets:v4-rev483-1.22.0
com.google.apis:google-api-services-sqladmin:v1beta4-rev56-1.23.0
com.google.apis:google-api-services-storage:v1-rev20181109-1.27.0
com.google.appengine.tools:appengine-gcs-client:0.6
com.google.appengine.tools:appengine-mapreduce:0.9
@@ -65,6 +76,8 @@ com.google.cloud.bigdataoss:gcsio:1.9.16
com.google.cloud.bigdataoss:util:1.9.16
com.google.cloud.bigtable:bigtable-client-core:1.8.0
com.google.cloud.datastore:datastore-v1-proto-client:1.6.0
com.google.cloud.sql:jdbc-socket-factory-core:1.0.12
com.google.cloud.sql:postgres-socket-factory:1.0.12
com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
com.google.cloud:google-cloud-bigtable:0.73.0-alpha
@@ -81,8 +94,8 @@ com.google.flogger:flogger-system-backend:0.3.1
com.google.flogger:flogger:0.3.1
com.google.flogger:google-extensions:0.3.1
com.google.guava:failureaccess:1.0.1
com.google.guava:guava-testlib:25.0-jre
com.google.guava:guava:27.1-jre
com.google.guava:guava-testlib:28.1-jre
com.google.guava:guava:28.1-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.gwt:gwt-user:2.8.2
com.google.http-client:google-http-client-appengine:1.29.2
@@ -94,9 +107,9 @@ com.google.inject.extensions:guice-multibindings:4.1.0
com.google.inject:guice:4.1.0
com.google.j2objc:j2objc-annotations:1.3
com.google.jsinterop:jsinterop-annotations:1.0.2
com.google.monitoring-client:contrib:1.0.4
com.google.monitoring-client:metrics:1.0.4
com.google.monitoring-client:stackdriver:1.0.4
com.google.monitoring-client:contrib:1.0.6
com.google.monitoring-client:metrics:1.0.6
com.google.monitoring-client:stackdriver:1.0.6
com.google.oauth-client:google-oauth-client-appengine:1.29.0
com.google.oauth-client:google-oauth-client-java6:1.28.0
com.google.oauth-client:google-oauth-client-jetty:1.28.0
@@ -107,8 +120,8 @@ com.google.protobuf:protobuf-java-util:3.6.1
com.google.protobuf:protobuf-java:3.6.1
com.google.re2j:re2j:1.1
com.google.template:soy:2018-03-14
com.google.truth.extensions:truth-java8-extension:0.45
com.google.truth:truth:0.45
com.google.truth.extensions:truth-java8-extension:1.0
com.google.truth:truth:1.0
com.googlecode.charts4j:charts4j:1.3
com.googlecode.java-diff-utils:diffutils:1.3.0
com.googlecode.json-simple:json-simple:1.1.1
@@ -119,10 +132,11 @@ com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.11.0
com.squareup.okhttp:okhttp:2.5.0
com.squareup.okio:okio:1.14.0
com.sun.istack:istack-commons-runtime:3.0.5
com.sun.xml.fastinfoset:FastInfoset:1.2.13
com.sun.istack:istack-commons-runtime:3.0.7
com.sun.xml.fastinfoset:FastInfoset:1.2.15
com.thoughtworks.paranamer:paranamer:2.7
com.thoughtworks.qdox:qdox:1.12.1
com.zaxxer:HikariCP:3.2.0
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
dnsjava:dnsjava:2.1.7
@@ -164,6 +178,7 @@ javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
javax.jdo:jdo2-api:2.3-eb
javax.mail:mail:1.4
javax.persistence:javax.persistence-api:2.2
javax.servlet:servlet-api:2.5
javax.transaction:transaction-api:1.1
javax.validation:validation-api:1.0.0.GA
@@ -172,9 +187,9 @@ jline:jline:1.0
joda-time:joda-time:2.9.2
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.9.7
net.bytebuddy:byte-buddy:1.9.7
net.java.dev.jna:jna-platform:5.2.0
net.java.dev.jna:jna:5.2.0
net.bytebuddy:byte-buddy:1.9.11
net.java.dev.jna:jna-platform:5.3.1
net.java.dev.jna:jna:5.3.1
org.apache.avro:avro:1.8.2
org.apache.beam:beam-model-job-management:2.11.0
org.apache.beam:beam-model-pipeline:2.11.0
@@ -187,7 +202,7 @@ org.apache.beam:beam-sdks-java-extensions-protobuf:2.11.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.11.0
org.apache.beam:beam-vendor-grpc-1_13_1:0.2
org.apache.beam:beam-vendor-guava-20_0:0.1
org.apache.commons:commons-compress:1.18
org.apache.commons:commons-compress:1.19
org.apache.commons:commons-exec:1.3
org.apache.commons:commons-lang3:3.8.1
org.apache.commons:commons-text:1.6
@@ -204,31 +219,40 @@ org.bouncycastle:bcpg-jdk15on:1.61
org.bouncycastle:bcpkix-jdk15on:1.61
org.bouncycastle:bcprov-jdk15on:1.61
org.checkerframework:checker-compat-qual:2.5.5
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.codehaus.jackson:jackson-core-asl:1.9.13
org.codehaus.jackson:jackson-mapper-asl:1.9.13
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.codehaus.mojo:animal-sniffer-annotations:1.18
org.dom4j:dom4j:2.1.1
org.easymock:easymock:3.0
org.glassfish.jaxb:jaxb-core:2.3.0
org.glassfish.jaxb:jaxb-runtime:2.3.0
org.glassfish.jaxb:txw2:2.3.0
org.flywaydb:flyway-core:5.2.4
org.glassfish.jaxb:jaxb-runtime:2.3.1
org.glassfish.jaxb:txw2:2.3.1
org.hamcrest:hamcrest-all:1.3
org.hamcrest:hamcrest-core:1.3
org.hamcrest:hamcrest-library:1.3
org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
org.hibernate:hibernate-core:5.4.4.Final
org.hibernate:hibernate-hikaricp:5.4.4.Final
org.javassist:javassist:3.24.0-GA
org.jboss.logging:jboss-logging:3.3.2.Final
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
org.jboss:jandex:2.0.5.Final
org.jetbrains:annotations:17.0.0
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.jvnet.staxex:stax-ex:1.8
org.mockito:mockito-core:2.25.0
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.objenesis:objenesis:2.6
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-analysis:7.0
org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm:6.0
org.rnorth.duct-tape:duct-tape:1.0.7
org.ow2.asm:asm-tree:7.0
org.ow2.asm:asm-util:7.0
org.ow2.asm:asm:7.0
org.postgresql:postgresql:42.2.6
org.rnorth.duct-tape:duct-tape:1.0.8
org.rnorth.visible-assertions:visible-assertions:2.1.2
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
@@ -242,9 +266,12 @@ org.seleniumhq.selenium:selenium-opera-driver:3.141.59
org.seleniumhq.selenium:selenium-remote-driver:3.141.59
org.seleniumhq.selenium:selenium-safari-driver:3.141.59
org.seleniumhq.selenium:selenium-support:3.141.59
org.slf4j:slf4j-api:1.7.26
org.testcontainers:selenium:1.10.7
org.testcontainers:testcontainers:1.10.7
org.slf4j:slf4j-api:1.7.28
org.testcontainers:database-commons:1.12.1
org.testcontainers:jdbc:1.12.1
org.testcontainers:postgresql:1.12.1
org.testcontainers:selenium:1.12.1
org.testcontainers:testcontainers:1.12.1
org.threeten:threetenbp:1.3.3
org.tukaani:xz:1.8
org.w3c.css:sac:1.3

View File

@@ -190,14 +190,18 @@ public class ExpandRecurringBillingEventsAction implements Runnable {
.setReason("Domain autorenewal by ExpandRecurringBillingEventsAction")
.setRequestedByRegistrar(false)
.setType(DOMAIN_AUTORENEW)
// Don't write a domain transaction record if the recurrence was ended prior to the
// billing time (i.e. a domain was deleted during the autorenew grace period).
.setDomainTransactionRecords(
ImmutableSet.of(
DomainTransactionRecord.create(
tld.getTldStr(),
// We report this when the autorenew grace period ends
billingTime,
TransactionReportField.netRenewsFieldFromYears(1),
1)))
recurring.getRecurrenceEndTime().isBefore(billingTime)
? ImmutableSet.of()
: ImmutableSet.of(
DomainTransactionRecord.create(
tld.getTldStr(),
// We report this when the autorenew grace period ends
billingTime,
TransactionReportField.netRenewsFieldFromYears(1),
1)))
.build();
historyEntriesBuilder.add(historyEntry);

View File

@@ -112,7 +112,7 @@ public final class RegistryConfig {
}
/**
* The product name of this specific registry. Used throughout the registrar console.
* The product name of this specific registry. Used throughout the registrar console.
*
* @see google.registry.ui.server.registrar.ConsoleUiAction
*/
@@ -123,11 +123,11 @@ public final class RegistryConfig {
}
/**
* Returns the roid suffix to be used for the roids of all contacts and hosts. E.g. a value of
* Returns the roid suffix to be used for the roids of all contacts and hosts. E.g. a value of
* "ROID" would end up creating roids that look like "ABC123-ROID".
*
* @see <a href="http://www.iana.org/assignments/epp-repository-ids/epp-repository-ids.xhtml">
* Extensible Provisioning Protocol (EPP) Repository Identifiers</a>
* Extensible Provisioning Protocol (EPP) Repository Identifiers</a>
*/
@Provides
@Config("contactAndHostRoidSuffix")
@@ -136,7 +136,7 @@ public final class RegistryConfig {
}
/**
* The e-mail address for questions about integrating with the registry. Used in the
* The e-mail address for questions about integrating with the registry. Used in the
* "contact-us" section of the registrar console.
*
* @see google.registry.ui.server.registrar.ConsoleUiAction
@@ -148,7 +148,7 @@ public final class RegistryConfig {
}
/**
* The e-mail address for general support. Used in the "contact-us" section of the registrar
* The e-mail address for general support. Used in the "contact-us" section of the registrar
* console.
*
* @see google.registry.ui.server.registrar.ConsoleUiAction
@@ -160,7 +160,7 @@ public final class RegistryConfig {
}
/**
* The "From" e-mail address for announcements. Used in the "contact-us" section of the
* The "From" e-mail address for announcements. Used in the "contact-us" section of the
* registrar console.
*
* @see google.registry.ui.server.registrar.ConsoleUiAction
@@ -172,7 +172,7 @@ public final class RegistryConfig {
}
/**
* The contact phone number. Used in the "contact-us" section of the registrar console.
* The contact phone number. Used in the "contact-us" section of the registrar console.
*
* @see google.registry.ui.server.registrar.ConsoleUiAction
*/
@@ -392,6 +392,24 @@ public final class RegistryConfig {
return config.datastore.eppResourceIndexBucketsNum;
}
@Provides
@Config("cloudSqlJdbcUrl")
public static String providesCloudSqlJdbcUrl(RegistryConfigSettings config) {
return config.cloudSql.jdbcUrl;
}
@Provides
@Config("cloudSqlUsername")
public static String providesCloudSqlUsername(RegistryConfigSettings config) {
return config.cloudSql.username;
}
@Provides
@Config("cloudSqlInstanceConnectionName")
public static String providesCloudSqlInstanceConnectionName(RegistryConfigSettings config) {
return config.cloudSql.instanceConnectionName;
}
@Provides
@Config("cloudDnsRootUrl")
public static Optional<String> getCloudDnsRootUrl(RegistryConfigSettings config) {
@@ -1040,8 +1058,8 @@ public final class RegistryConfig {
}
/**
* The global automatic transfer length for contacts. After this amount of time has
* elapsed, the transfer is automatically approved.
* The global automatic transfer length for contacts. After this amount of time has elapsed, the
* transfer is automatically approved.
*
* @see google.registry.flows.contact.ContactTransferRequestFlow
*/
@@ -1196,7 +1214,7 @@ public final class RegistryConfig {
/**
* Provides the OAuth scopes that authentication logic should detect on access tokens.
*
* <p>This list should be a superset of the required OAuth scope set provided below. Note that
* <p>This list should be a superset of the required OAuth scope set provided below. Note that
* ideally, this setting would not be required and all scopes on an access token would be
* detected automatically, but that is not the case due to the way {@code OAuthService} works.
*
@@ -1278,6 +1296,18 @@ public final class RegistryConfig {
return config.registryTool.clientSecret;
}
@Provides
@Config("toolsCloudSqlJdbcUrl")
public static String providesToolsCloudSqlJdbcUrl(RegistryConfigSettings config) {
return config.registryTool.jdbcUrl;
}
@Provides
@Config("toolsCloudSqlUsername")
public static String providesToolsCloudSqlUsername(RegistryConfigSettings config) {
return config.registryTool.username;
}
@Provides
@Config("rdapTos")
public static ImmutableList<String> provideRdapTos(RegistryConfigSettings config) {
@@ -1297,9 +1327,7 @@ public final class RegistryConfig {
}
}
/**
* Returns the App Engine project ID, which is based off the environment name.
*/
/** Returns the App Engine project ID, which is based off the environment name. */
public static String getProjectId() {
return CONFIG_SETTINGS.get().appEngine.projectId;
}
@@ -1451,20 +1479,46 @@ public final class RegistryConfig {
return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarWhoisServer;
}
/**
* Returns the number of {@code EppResourceIndex} buckets to be used.
*/
/** Returns the number of {@code EppResourceIndex} buckets to be used. */
public static int getEppResourceIndexBucketCount() {
return CONFIG_SETTINGS.get().datastore.eppResourceIndexBucketsNum;
}
/**
* Returns the base retry duration that gets doubled after each failure within {@code Ofy}.
*/
/** Returns the base retry duration that gets doubled after each failure within {@code Ofy}. */
public static Duration getBaseOfyRetryDuration() {
return Duration.millis(CONFIG_SETTINGS.get().datastore.baseOfyRetryMillis);
}
/** Returns the default database transaction isolation. */
public static String getHibernateConnectionIsolation() {
return CONFIG_SETTINGS.get().hibernate.connectionIsolation;
}
/** Returns true if hibernate.show_sql is enabled. */
public static String getHibernateLogSqlQueries() {
return CONFIG_SETTINGS.get().hibernate.logSqlQueries;
}
/** Returns the connection timeout for HikariCP. */
public static String getHibernateHikariConnectionTimeout() {
return CONFIG_SETTINGS.get().hibernate.hikariConnectionTimeout;
}
/** Returns the minimum idle connections for HikariCP. */
public static String getHibernateHikariMinimumIdle() {
return CONFIG_SETTINGS.get().hibernate.hikariMinimumIdle;
}
/** Returns the maximum pool size for HikariCP. */
public static String getHibernateHikariMaximumPoolSize() {
return CONFIG_SETTINGS.get().hibernate.hikariMaximumPoolSize;
}
/** Returns the idle timeout for HikariCP. */
public static String getHibernateHikariIdleTimeout() {
return CONFIG_SETTINGS.get().hibernate.hikariIdleTimeout;
}
/** Returns the roid suffix to be used for the roids of all contacts and hosts. */
public static String getContactAndHostRoidSuffix() {
return CONFIG_SETTINGS.get().registryPolicy.contactAndHostRoidSuffix;

View File

@@ -25,6 +25,8 @@ public class RegistryConfigSettings {
public CredentialOAuth credentialOAuth;
public RegistryPolicy registryPolicy;
public Datastore datastore;
public Hibernate hibernate;
public CloudSql cloudSql;
public CloudDns cloudDns;
public Caching caching;
public IcannReporting icannReporting;
@@ -105,6 +107,23 @@ public class RegistryConfigSettings {
public int baseOfyRetryMillis;
}
/** Configuration for Hibernate. */
public static class Hibernate {
public String connectionIsolation;
public String logSqlQueries;
public String hikariConnectionTimeout;
public String hikariMinimumIdle;
public String hikariMaximumPoolSize;
public String hikariIdleTimeout;
}
/** Configuration for Cloud SQL. */
public static class CloudSql {
public String jdbcUrl;
public String username;
public String instanceConnectionName;
}
/** Configuration for Apache Beam (Cloud Dataflow). */
public static class Beam {
public String defaultJobZone;
@@ -194,5 +213,7 @@ public class RegistryConfigSettings {
public static class RegistryTool {
public String clientId;
public String clientSecret;
public String jdbcUrl;
public String username;
}
}

View File

@@ -191,6 +191,34 @@ datastore:
# doubles after each failure).
baseOfyRetryMillis: 100
hibernate:
# Make 'SERIALIZABLE' the default isolation level to ensure correctness.
#
# Entities that are never involved in multi-table transactions may use optimistic
# locks and a less strict isolation level. We may lower individual transaction's
# isolation level using a framework-dependent method.
#
# Alternatively, if a use case calls for, we may also use a lower isolation level
# but lock tables explicitly, either using framework-dependent API, or execute
# "select table for update" statements directly.
connectionIsolation: TRANSACTION_SERIALIZABLE
# Whether to log all SQL queries to App Engine logs. Overridable at runtime.
logSqlQueries: false
# Connection pool configurations.
hikariConnectionTimeout: 20000
hikariMinimumIdle: 0
hikariMaximumPoolSize: 20
hikariIdleTimeout: 300000
cloudSql:
# jdbc url for the Cloud SQL database.
jdbcUrl: jdbc:postgresql://localhost
# Username for the database user.
username: username
# This name is used by Cloud SQL when connecting to the database.
instanceConnectionName: project-id:region:instance-id
cloudDns:
# Set both properties to null in Production.
# The root url for the Cloud DNS API. Set this to a non-null value to
@@ -394,3 +422,6 @@ registryTool:
clientId: YOUR_CLIENT_ID
# OAuth client secret used by the tool.
clientSecret: YOUR_CLIENT_SECRET
# Nomulus tool uses a different jdbc url and user to connect to Cloud SQL
jdbcUrl: jdbc:postgresql://localhost/tool
username: toolusername

View File

@@ -144,7 +144,7 @@
<cron>
<url><![CDATA[/_dr/cron/fanout?queue=retryable-cron-tasks&endpoint=/_dr/task/exportDomainLists&runInEmpty]]></url>
<description>
This job exports lists of all active domain names to Google Cloud Storage.
This job exports lists of all active domain names to Google Drive and Google Cloud Storage.
</description>
<schedule>every 12 hours synchronized</schedule>
<target>backend</target>

View File

@@ -112,7 +112,7 @@
<cron>
<url><![CDATA[/_dr/cron/fanout?queue=retryable-cron-tasks&endpoint=/_dr/task/exportDomainLists&runInEmpty]]></url>
<description>
This job exports lists of all active domain names to Google Cloud Storage.
This job exports lists of all active domain names to Google Drive and Google Cloud Storage.
</description>
<schedule>every 12 hours synchronized</schedule>
<target>backend</target>

View File

@@ -56,7 +56,7 @@ import javax.inject.Inject;
import org.joda.time.DateTime;
/**
* A mapreduce that exports the list of active domains on all real TLDs to Google Cloud Storage.
* A mapreduce that exports the list of active domains on all real TLDs to Google Drive and GCS.
*
* <p>Each TLD's active domain names are exported as a newline-delimited flat text file with the
* name TLD.txt into the domain-lists bucket. Note that this overwrites the files in place.

View File

@@ -122,7 +122,9 @@ public abstract class DummyKeyringModule {
"not a real login",
"not a real password",
"not a real login",
"not a real credential");
"not a real credential",
"not a real password",
"not a real password");
}
private DummyKeyringModule() {}

View File

@@ -39,6 +39,8 @@ public final class InMemoryKeyring implements Keyring {
private final String marksdbLordnPassword;
private final String marksdbSmdrlLoginAndPassword;
private final String jsonCredential;
private final String cloudSqlPassword;
private final String toolsCloudSqlPassword;
public InMemoryKeyring(
PGPKeyPair rdeStagingKey,
@@ -53,7 +55,9 @@ public final class InMemoryKeyring implements Keyring {
String marksdbDnlLoginAndPassword,
String marksdbLordnPassword,
String marksdbSmdrlLoginAndPassword,
String jsonCredential) {
String jsonCredential,
String cloudSqlPassword,
String toolsCloudSqlPassword) {
checkArgument(PgpHelper.isSigningKey(rdeSigningKey.getPublicKey()),
"RDE signing key must support signing: %s", rdeSigningKey.getKeyID());
checkArgument(rdeStagingKey.getPublicKey().isEncryptionKey(),
@@ -79,6 +83,8 @@ public final class InMemoryKeyring implements Keyring {
this.marksdbSmdrlLoginAndPassword =
checkNotNull(marksdbSmdrlLoginAndPassword, "marksdbSmdrlLoginAndPassword");
this.jsonCredential = checkNotNull(jsonCredential, "jsonCredential");
this.cloudSqlPassword = checkNotNull(cloudSqlPassword, "cloudSqlPassword");
this.toolsCloudSqlPassword = checkNotNull(toolsCloudSqlPassword, "toolsCloudSqlPassword");
}
@Override
@@ -151,6 +157,16 @@ public final class InMemoryKeyring implements Keyring {
return jsonCredential;
}
@Override
public String getCloudSqlPassword() {
return cloudSqlPassword;
}
@Override
public String getToolsCloudSqlPassword() {
return toolsCloudSqlPassword;
}
/** Does nothing. */
@Override
public void close() {}

View File

@@ -36,6 +36,18 @@ public final class KeyModule {
String value();
}
@Provides
@Key("cloudSqlPassword")
static String providesCloudSqlPassword(Keyring keyring) {
return keyring.getCloudSqlPassword();
}
@Provides
@Key("toolsCloudSqlPassword")
static String providesToolsCloudSqlPassword(Keyring keyring) {
return keyring.getToolsCloudSqlPassword();
}
@Provides
@Key("brdaReceiverKey")
static PGPPublicKey provideBrdaReceiverKey(Keyring keyring) {

View File

@@ -28,6 +28,12 @@ import org.bouncycastle.openpgp.PGPPublicKey;
@ThreadSafe
public interface Keyring extends AutoCloseable {
/** Returns the password which is used by App Engine to connect to the Cloud SQL database. */
String getCloudSqlPassword();
/** Returns the password which is used by nomulus tool to connect to the Cloud SQL database. */
String getToolsCloudSqlPassword();
/**
* Returns the key which should be used to sign RDE deposits being uploaded to a third-party.
*

View File

@@ -67,6 +67,7 @@ public class KmsKeyring implements Keyring {
/** Key labels for string secrets. */
enum StringKeyLabel {
CLOUD_SQL_PASSWORD_STRING,
SAFE_BROWSING_API_KEY,
ICANN_REPORTING_PASSWORD_STRING,
JSON_CREDENTIAL_STRING,
@@ -74,7 +75,8 @@ public class KmsKeyring implements Keyring {
MARKSDB_LORDN_PASSWORD_STRING,
MARKSDB_SMDRL_LOGIN_STRING,
RDE_SSH_CLIENT_PRIVATE_STRING,
RDE_SSH_CLIENT_PUBLIC_STRING;
RDE_SSH_CLIENT_PUBLIC_STRING,
TOOLS_CLOUD_SQL_PASSWORD_STRING;
String getLabel() {
return UPPER_UNDERSCORE.to(LOWER_HYPHEN, name());
@@ -88,6 +90,16 @@ public class KmsKeyring implements Keyring {
this.kmsConnection = kmsConnection;
}
@Override
public String getCloudSqlPassword() {
return getString(StringKeyLabel.CLOUD_SQL_PASSWORD_STRING);
}
@Override
public String getToolsCloudSqlPassword() {
return getString(StringKeyLabel.TOOLS_CLOUD_SQL_PASSWORD_STRING);
}
@Override
public PGPKeyPair getRdeSigningKey() {
return getKeyPair(PrivateKeyLabel.RDE_SIGNING_PRIVATE);

View File

@@ -24,6 +24,7 @@ import static google.registry.keyring.kms.KmsKeyring.PublicKeyLabel.BRDA_SIGNING
import static google.registry.keyring.kms.KmsKeyring.PublicKeyLabel.RDE_RECEIVER_PUBLIC;
import static google.registry.keyring.kms.KmsKeyring.PublicKeyLabel.RDE_SIGNING_PUBLIC;
import static google.registry.keyring.kms.KmsKeyring.PublicKeyLabel.RDE_STAGING_PUBLIC;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.CLOUD_SQL_PASSWORD_STRING;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.ICANN_REPORTING_PASSWORD_STRING;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.JSON_CREDENTIAL_STRING;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.MARKSDB_DNL_LOGIN_STRING;
@@ -32,6 +33,7 @@ import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.MARKSDB_SMDR
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.RDE_SSH_CLIENT_PRIVATE_STRING;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.RDE_SSH_CLIENT_PUBLIC_STRING;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.SAFE_BROWSING_API_KEY;
import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.TOOLS_CLOUD_SQL_PASSWORD_STRING;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.model.transaction.TransactionManagerFactory.tm;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
@@ -69,6 +71,10 @@ public final class KmsUpdater {
this.secretValues = new LinkedHashMap<>();
}
public KmsUpdater setCloudSqlPassword(String password) {
return setString(password, CLOUD_SQL_PASSWORD_STRING);
}
public KmsUpdater setRdeSigningKey(PGPKeyPair keyPair) throws IOException, PGPException {
return setKeyPair(keyPair, RDE_SIGNING_PRIVATE, RDE_SIGNING_PUBLIC);
}
@@ -101,6 +107,10 @@ public final class KmsUpdater {
return setString(apiKey, SAFE_BROWSING_API_KEY);
}
public KmsUpdater setToolsCloudSqlPassword(String password) {
return setString(password, TOOLS_CLOUD_SQL_PASSWORD_STRING);
}
public KmsUpdater setIcannReportingPassword(String password) {
return setString(password, ICANN_REPORTING_PASSWORD_STRING);
}

View File

@@ -21,24 +21,26 @@ import com.googlecode.objectify.annotation.Embed;
import com.googlecode.objectify.annotation.Index;
import google.registry.model.ImmutableObject;
import google.registry.model.contact.ContactResource;
import javax.persistence.Id;
import javax.xml.bind.annotation.XmlEnumValue;
/**
* Persisted type for storing a domain's contact associations.
*
* <p>A contact association on a domain consists of the contact key and the contact "type", which is
* the designated role of this contact with respect to this domain. When converting to and from
* EPP XML, we use {@link ForeignKeyedDesignatedContact} to replace the contact's Datastore key
* with its foreign key, since that is what EPP exposes.
* the designated role of this contact with respect to this domain. When converting to and from EPP
* XML, we use {@link ForeignKeyedDesignatedContact} to replace the contact's Datastore key with its
* foreign key, since that is what EPP exposes.
*
* <p>Note one could in principle store contact foreign keys here in addition to keys, unlike the
* situation with hosts where client-side renames would make that data stale. However, we sometimes
* situation with hosts where client-side renames would make that data stale. However, we sometimes
* rename contacts internally ourselves, and it's easier to use the same model for both cases.
*
* @see <a href="http://tools.ietf.org/html/rfc5731#section-2.2">
* RFC 5731 - EPP Domain Name Mapping - Contact and Client Identifiers</a>
* @see <a href="http://tools.ietf.org/html/rfc5731#section-2.2">RFC 5731 - EPP Domain Name Mapping
* - Contact and Client Identifiers</a>
*/
@Embed
@javax.persistence.Entity
public class DesignatedContact extends ImmutableObject {
/**
@@ -65,8 +67,7 @@ public class DesignatedContact extends ImmutableObject {
Type type;
@Index
Key<ContactResource> contact;
@Index @Id Key<ContactResource> contact;
public Type getType() {
return type;

View File

@@ -19,6 +19,7 @@ import google.registry.model.eppcommon.AuthInfo;
/** A version of authInfo specifically for domains. */
@Embed
@javax.persistence.Embeddable
public class DomainAuthInfo extends AuthInfo {
public static DomainAuthInfo create(PasswordAuth pw) {
DomainAuthInfo instance = new DomainAuthInfo();

View File

@@ -69,7 +69,11 @@ import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import javax.annotation.Nullable;
import javax.persistence.Transient;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Embedded;
import org.joda.time.DateTime;
import org.joda.time.Interval;
@@ -85,7 +89,7 @@ import org.joda.time.Interval;
@ReportedOn
@Entity
@javax.persistence.Entity
@javax.persistence.Table(name = "domain")
@javax.persistence.Table(name = "Domain")
@ExternalMessagingName("domain")
public class DomainBase extends EppResource
implements ForeignKeyedEppResource, ResourceWithTransferData {
@@ -118,17 +122,22 @@ public class DomainBase extends EppResource
String tld;
/** References to hosts that are the nameservers for the domain. */
@Index @Transient Set<Key<HostResource>> nsHosts;
@Index @ElementCollection Set<Key<HostResource>> nsHosts;
/**
* The union of the contacts visible via {@link #getContacts} and {@link #getRegistrant}.
*
* <p>These are stored in one field so that we can query across all contacts at once.
*/
@Transient Set<DesignatedContact> allContacts;
@ElementCollection Set<DesignatedContact> allContacts;
/** Authorization info (aka transfer secret) of the domain. */
@Transient DomainAuthInfo authInfo;
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "pw.value", column = @Column(name = "auth_info_value")),
@AttributeOverride(name = "pw.repoId", column = @Column(name = "auth_info_repo_id")),
})
DomainAuthInfo authInfo;
/**
* Data used to construct DS records for this domain.
@@ -136,13 +145,27 @@ public class DomainBase extends EppResource
* <p>This is {@literal @}XmlTransient because it needs to be returned under the "extension" tag
* of an info response rather than inside the "infData" tag.
*/
@Transient Set<DelegationSignerData> dsData;
@ElementCollection Set<DelegationSignerData> dsData;
/**
* The claims notice supplied when this application or domain was created, if there was one. It's
* {@literal @}XmlTransient because it's not returned in an info response.
*/
@IgnoreSave(IfNull.class) @Transient LaunchNotice launchNotice;
@IgnoreSave(IfNull.class)
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "noticeId.tcnId", column = @Column(name = "launch_notice_tcn_id")),
@AttributeOverride(
name = "noticeId.validatorId",
column = @Column(name = "launch_notice_validator_id")),
@AttributeOverride(
name = "expirationTime",
column = @Column(name = "launch_notice_expiration_time")),
@AttributeOverride(
name = "acceptedTime",
column = @Column(name = "launch_notice_accepted_time")),
})
LaunchNotice launchNotice;
/**
* Name of first IDN table associated with TLD that matched the characters in this domain label.
@@ -153,7 +176,7 @@ public class DomainBase extends EppResource
String idnTableName;
/** Fully qualified host names of this domain's active subordinate hosts. */
@Transient Set<String> subordinateHosts;
@ElementCollection Set<String> subordinateHosts;
/** When this domain's registration will expire. */
DateTime registrationExpirationTime;
@@ -188,7 +211,7 @@ public class DomainBase extends EppResource
Key<PollMessage.Autorenew> autorenewPollMessage;
/** The unexpired grace periods for this domain (some of which may not be active yet). */
@Transient Set<GracePeriod> gracePeriods;
@ElementCollection Set<GracePeriod> gracePeriods;
/**
* The id of the signed mark that was used to create this domain in sunrise.
@@ -199,7 +222,31 @@ public class DomainBase extends EppResource
String smdId;
/** Data about any pending or past transfers on this domain. */
@Transient TransferData transferData;
@Embedded
@AttributeOverrides({
@AttributeOverride(
name = "transferRequestTrid",
column = @Column(name = "transfer_data_request_trid")),
@AttributeOverride(
name = "transferPeriod",
column = @Column(name = "transfer_data_transfer_period")),
@AttributeOverride(
name = "transferredRegistrationExpirationTime",
column = @Column(name = "transfer_data_registration_expiration_time")),
@AttributeOverride(
name = "serverApproveEntities",
column = @Column(name = "transfer_data_server_approve_entities")),
@AttributeOverride(
name = "serverApproveBillingEvent",
column = @Column(name = "transfer_data_server_approve_billing_event")),
@AttributeOverride(
name = "serverApproveAutorenewEvent",
column = @Column(name = "transfer_data_server_approve_autorenrew_event")),
@AttributeOverride(
name = "serverApproveAutorenewPollMessage",
column = @Column(name = "transfer_data_server_approve_autorenrew_poll_message")),
})
TransferData transferData;
/**
* The time that this resource was last transferred.

View File

@@ -19,21 +19,31 @@ import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Embed;
import com.googlecode.objectify.annotation.Ignore;
import google.registry.model.ImmutableObject;
import google.registry.model.billing.BillingEvent;
import google.registry.model.domain.rgp.GracePeriodStatus;
import javax.annotation.Nullable;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import org.joda.time.DateTime;
/**
* A domain grace period with an expiration time.
*
* <p>When a grace period expires, it is lazily removed from the {@link DomainBase} the next
* time the resource is loaded from Datastore.
* <p>When a grace period expires, it is lazily removed from the {@link DomainBase} the next time
* the resource is loaded from Datastore.
*/
@Embed
@javax.persistence.Entity
public class GracePeriod extends ImmutableObject {
@javax.persistence.Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Ignore
/** Unique id required for hibernate representation. */
long id;
/** The type of grace period. */
GracePeriodStatus type;

View File

@@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlValue;
/** The "periodType" from {@link "http://tools.ietf.org/html/rfc5731"}. */
@Embed
@javax.persistence.Embeddable
public class Period extends ImmutableObject {
@XmlAttribute

View File

@@ -28,6 +28,7 @@ import com.googlecode.objectify.annotation.IgnoreSave;
import com.googlecode.objectify.condition.IfNull;
import google.registry.model.ImmutableObject;
import java.util.Optional;
import javax.persistence.Embedded;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -37,6 +38,7 @@ import org.joda.time.DateTime;
/** The claims notice id from the claims phase. */
@Embed
@XmlType(propOrder = {"noticeId", "expirationTime", "acceptedTime"})
@javax.persistence.Embeddable
public class LaunchNotice extends ImmutableObject {
/** An empty instance to use in place of null. */
@@ -44,6 +46,7 @@ public class LaunchNotice extends ImmutableObject {
/** An id with a validator-id attribute. */
@Embed
@javax.persistence.Embeddable
public static class NoticeIdType extends ImmutableObject {
/**
@@ -69,6 +72,7 @@ public class LaunchNotice extends ImmutableObject {
}
@XmlElement(name = "noticeID")
@Embedded
NoticeIdType noticeId;
@XmlElement(name = "notAfter")

View File

@@ -30,12 +30,13 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
*/
@Embed
@XmlType(name = "dsData")
@javax.persistence.Entity
public class DelegationSignerData extends ImmutableObject {
private DelegationSignerData() {}
/** The identifier for this particular key in the domain. */
int keyTag;
@javax.persistence.Id int keyTag;
/**
* The algorithm used by this key.

View File

@@ -16,6 +16,9 @@ package google.registry.model.eppcommon;
import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.MappedSuperclass;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
@@ -30,9 +33,11 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
* <p>RFCs 5731 and 5732 define this almost identically up to the namespace.
*/
@XmlTransient
@Embeddable
@MappedSuperclass
public abstract class AuthInfo extends ImmutableObject {
protected PasswordAuth pw;
@Embedded protected PasswordAuth pw;
public PasswordAuth getPw() {
return pw;
@@ -41,6 +46,7 @@ public abstract class AuthInfo extends ImmutableObject {
/** The "pwAuthInfoType" complex type. */
@Embed
@XmlType(namespace = "urn:ietf:params:xml:ns:eppcom-1.0")
@Embeddable
public static class PasswordAuth extends ImmutableObject {
@XmlValue
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)

View File

@@ -31,6 +31,7 @@ import javax.xml.bind.annotation.XmlType;
*/
@Embed
@XmlType(propOrder = {"clientTransactionId", "serverTransactionId"})
@javax.persistence.Embeddable
public class Trid extends ImmutableObject {
/** The server transaction id. */

View File

@@ -14,7 +14,6 @@
package google.registry.model.ofy;
import static google.registry.model.ofy.ObjectifyService.ofy;
import google.registry.model.transaction.TransactionManager;

View File

@@ -619,6 +619,7 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
.putListOfStrings("allowedTlds", getAllowedTlds())
.putListOfStrings("ipAddressWhitelist", ipAddressWhitelist)
.putListOfJsonObjects("contacts", getContacts())
.put("registryLockAllowed", registryLockAllowed)
.build();
}

View File

@@ -314,6 +314,7 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
.put("visibleInWhoisAsTech", visibleInWhoisAsTech)
.put("visibleInDomainWhoisAsAbuse", visibleInDomainWhoisAsAbuse)
.put("allowedToSetRegistryLockPassword", allowedToSetRegistryLockPassword)
.put("registryLockAllowed", isRegistryLockAllowed())
.put("gaeUserId", gaeUserId)
.build();
}

View File

@@ -0,0 +1,52 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.registry;
import static com.google.common.base.Preconditions.checkNotNull;
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
import google.registry.schema.domain.RegistryLock;
import javax.persistence.EntityManager;
/** Data access object for {@link google.registry.schema.domain.RegistryLock}. */
public final class RegistryLockDao {
/**
* Returns the most recent version of the {@link RegistryLock} referred to by the verification
* code (there may be two instances of the same code in the database--one after lock object
* creation and one after verification.
*/
public static RegistryLock getByVerificationCode(String verificationCode) {
return jpaTm()
.transact(
() -> {
EntityManager em = jpaTm().getEntityManager();
Long revisionId =
em.createQuery(
"SELECT MAX(revisionId) FROM RegistryLock WHERE verificationCode ="
+ " :verificationCode",
Long.class)
.setParameter("verificationCode", verificationCode)
.getSingleResult();
checkNotNull(revisionId, "No registry lock with this code");
return em.find(RegistryLock.class, revisionId);
});
}
public static void save(RegistryLock registryLock) {
checkNotNull(registryLock, "Null registry lock cannot be saved");
jpaTm().transact(() -> jpaTm().getEntityManager().persist(registryLock));
}
}

View File

@@ -0,0 +1,72 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.tmch;
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
import com.google.common.flogger.FluentLogger;
import google.registry.schema.tmch.ClaimsList;
import javax.persistence.EntityManager;
/** Data access object for {@link ClaimsList}. */
public class ClaimsListDao {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private static void save(ClaimsList claimsList) {
jpaTm().transact(() -> jpaTm().getEntityManager().persist(claimsList));
}
/**
* Try to save the given {@link ClaimsList} into Cloud SQL. If the save fails, the error will be
* logged but no exception will be thrown.
*
* <p>This method is used during the dual-write phase of database migration as Datastore is still
* the authoritative database.
*/
public static void trySave(ClaimsList claimsList) {
try {
ClaimsListDao.save(claimsList);
logger.atInfo().log(
"Inserted %,d claims into Cloud SQL, created at %s",
claimsList.getLabelsToKeys().size(), claimsList.getTmdbGenerationTime());
} catch (Throwable e) {
logger.atSevere().withCause(e).log("Error inserting claims into Cloud SQL");
}
}
/**
* Returns the current revision of the {@link ClaimsList} in Cloud SQL. Throws exception if there
* is no claims in the table.
*/
public static ClaimsList getCurrent() {
return jpaTm()
.transact(
() -> {
EntityManager em = jpaTm().getEntityManager();
Long revisionId =
em.createQuery("SELECT MAX(revisionId) FROM ClaimsList", Long.class)
.getSingleResult();
return em.createQuery(
"FROM ClaimsList cl LEFT JOIN FETCH cl.labelsToKeys WHERE cl.revisionId ="
+ " :revisionId",
ClaimsList.class)
.setParameter("revisionId", revisionId)
.getSingleResult();
});
}
private ClaimsListDao() {}
}

View File

@@ -217,8 +217,7 @@ public class ClaimsListShard extends ImmutableObject {
});
}
public static ClaimsListShard create(
DateTime creationTime, ImmutableMap<String, String> labelsToKeys) {
public static ClaimsListShard create(DateTime creationTime, Map<String, String> labelsToKeys) {
ClaimsListShard instance = new ClaimsListShard();
instance.id = allocateId();
instance.creationTime = checkNotNull(creationTime);

View File

@@ -0,0 +1,44 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.transaction;
import java.lang.reflect.Proxy;
/**
* A dummy implementation for {@link JpaTransactionManager} which throws exception when any of its
* method is invoked.
*
* <p>This is used to initialize the {@link TransactionManagerFactory#jpaTm} when running unit
* tests, because obviously we cannot connect to the actual Cloud SQL backend in a unit test.
*
* <p>If a unit test needs to access the Cloud SQL database, it must add JpaTransactionManagerRule
* as a JUnit rule in the test class.
*/
public class DummyJpaTransactionManager {
/** Constructs a dummy {@link JpaTransactionManager} instance. */
public static JpaTransactionManager create() {
return (JpaTransactionManager)
Proxy.newProxyInstance(
JpaTransactionManager.class.getClassLoader(),
new Class[] {JpaTransactionManager.class},
(proxy, method, args) -> {
throw new UnsupportedOperationException(
"JpaTransactionManager was not initialized as the runtime is detected as"
+ " Unittest. Add JpaTransactionManagerRule in the unit test for"
+ " initialization.");
});
}
}

View File

@@ -0,0 +1,23 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.transaction;
import javax.persistence.EntityManager;
/** Sub-interface of {@link TransactionManager} which defines JPA related methods. */
public interface JpaTransactionManager extends TransactionManager {
/** Returns the {@link EntityManager} for the current request. */
EntityManager getEntityManager();
}

View File

@@ -0,0 +1,163 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.transaction;
import com.google.common.flogger.FluentLogger;
import google.registry.util.Clock;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.PersistenceException;
import org.joda.time.DateTime;
/** Implementation of {@link JpaTransactionManager} for JPA compatible database. */
public class JpaTransactionManagerImpl implements JpaTransactionManager {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
// EntityManagerFactory is thread safe.
private final EntityManagerFactory emf;
private final Clock clock;
// TODO(shicong): Investigate alternatives for managing transaction information. ThreadLocal adds
// an unnecessary restriction that each request has to be processed by one thread synchronously.
private final ThreadLocal<TransactionInfo> transactionInfo =
ThreadLocal.withInitial(TransactionInfo::new);
public JpaTransactionManagerImpl(EntityManagerFactory emf, Clock clock) {
this.emf = emf;
this.clock = clock;
}
@Override
public EntityManager getEntityManager() {
if (transactionInfo.get().entityManager == null) {
throw new PersistenceException(
"No EntityManager has been initialized. getEntityManager() must be invoked in the scope"
+ " of a transaction");
}
return transactionInfo.get().entityManager;
}
@Override
public boolean inTransaction() {
return transactionInfo.get().inTransaction;
}
@Override
public void assertInTransaction() {
if (!inTransaction()) {
throw new PersistenceException("Not in a transaction");
}
}
@Override
public <T> T transact(Work<T> work) {
// TODO(shicong): Investigate removing transactNew functionality after migration as it may
// be same as this one.
if (inTransaction()) {
return work.run();
}
TransactionInfo txnInfo = transactionInfo.get();
txnInfo.entityManager = emf.createEntityManager();
EntityTransaction txn = txnInfo.entityManager.getTransaction();
try {
txn.begin();
txnInfo.inTransaction = true;
txnInfo.transactionTime = clock.nowUtc();
T result = work.run();
txn.commit();
return result;
} catch (Throwable transactionException) {
String rollbackMessage;
try {
txn.rollback();
rollbackMessage = "transaction rolled back";
} catch (Throwable rollbackException) {
logger.atSevere().withCause(rollbackException).log("Rollback failed, suppressing error");
rollbackMessage = "transaction rollback failed";
}
throw new PersistenceException(
"Error during transaction, " + rollbackMessage, transactionException);
} finally {
txnInfo.clear();
}
}
@Override
public void transact(Runnable work) {
transact(
() -> {
work.run();
return null;
});
}
@Override
public <T> T transactNew(Work<T> work) {
// TODO(shicong): Implements the functionality to start a new transaction.
throw new UnsupportedOperationException();
}
@Override
public void transactNew(Runnable work) {
// TODO(shicong): Implements the functionality to start a new transaction.
throw new UnsupportedOperationException();
}
@Override
public <T> T transactNewReadOnly(Work<T> work) {
// TODO(shicong): Implements read only transaction.
throw new UnsupportedOperationException();
}
@Override
public void transactNewReadOnly(Runnable work) {
// TODO(shicong): Implements read only transaction.
throw new UnsupportedOperationException();
}
@Override
public <T> T doTransactionless(Work<T> work) {
// TODO(shicong): Implements doTransactionless.
throw new UnsupportedOperationException();
}
@Override
public DateTime getTransactionTime() {
assertInTransaction();
TransactionInfo txnInfo = transactionInfo.get();
if (txnInfo.transactionTime == null) {
throw new PersistenceException("In a transaction but transactionTime is null");
}
return txnInfo.transactionTime;
}
private static class TransactionInfo {
EntityManager entityManager;
boolean inTransaction = false;
DateTime transactionTime;
private void clear() {
inTransaction = false;
transactionTime = null;
if (entityManager != null) {
// Close this EntityManager just let the connection pool be able to reuse it, it doesn't
// close the underlying database connection.
entityManager.close();
entityManager = null;
}
}
}
}

View File

@@ -14,24 +14,57 @@
package google.registry.model.transaction;
import com.google.common.annotations.VisibleForTesting;
import google.registry.model.ofy.DatastoreTransactionManager;
/** Factory class to create {@link TransactionManager} instance. */
// TODO: Rename this to PersistenceFactory and move to persistence package.
public class TransactionManagerFactory {
private static final TransactionManager TM = createTransactionManager();
@VisibleForTesting static JpaTransactionManager jpaTm = createJpaTransactionManager();
private TransactionManagerFactory() {}
private static JpaTransactionManager createJpaTransactionManager() {
// TODO(shicong): There is currently no environment where we want to create a real JPA
// transaction manager here. The unit tests that require one are all set up using
// JpaTransactionManagerRule which launches its own PostgreSQL instance. When we actually have
// PostgreSQL tables in production, ensure that all of the test environments are set up
// correctly and restore the code that creates a JpaTransactionManager when
// RegistryEnvironment.get() != UNITTEST.
//
// We removed the original code because it didn't work in sandbox (due to the absence of the
// persistence.xml file, which has since been added), and then (after adding this) didn't work
// in crash because the postgresql password hadn't been set up. Prior to restoring, we'll need
// to do setup in all environments, and we probably only want to do this once we're actually
// using Cloud SQL for one of the new tables.
return DummyJpaTransactionManager.create();
}
private static TransactionManager createTransactionManager() {
// TODO: Conditionally returns the corresponding implementation once we have
// CloudSqlTransactionManager
// TODO: Determine how to provision TransactionManager after the dual-write. During the
// dual-write transitional phase, we need the TransactionManager for both Datastore and Cloud
// SQL, and this method returns the one for Datastore.
return new DatastoreTransactionManager(null);
}
/**
* Sets jpaTm to the implementation for Nomulus tool. Note that this method should be only used by
* {@link google.registry.tools.RegistryCli} to initialize jpaTm.
*/
public static void initForTool() {
// TODO(shicong): Uncomment the line below when we set up Cloud SQL instance in all environments
// jpaTm = DaggerPersistenceComponent.create().nomulusToolJpaTransactionManager();
}
/** Returns {@link TransactionManager} instance. */
public static TransactionManager tm() {
return TM;
}
/** Returns {@link JpaTransactionManager} instance. */
public static JpaTransactionManager jpaTm() {
return jpaTm;
}
}

View File

@@ -16,12 +16,14 @@ package google.registry.model.transfer;
import google.registry.model.Buildable.GenericBuilder;
import google.registry.model.ImmutableObject;
import javax.persistence.MappedSuperclass;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
import org.joda.time.DateTime;
/** Fields common to {@link TransferData} and {@link TransferResponse}. */
@XmlTransient
@MappedSuperclass
public abstract class BaseTransferObject extends ImmutableObject {
/**
* The status of the current or last transfer. Can be null if never transferred. Note that we

View File

@@ -31,20 +31,23 @@ import google.registry.model.eppcommon.Trid;
import google.registry.model.poll.PollMessage;
import java.util.Set;
import javax.annotation.Nullable;
import javax.persistence.ElementCollection;
import javax.persistence.Embedded;
import org.joda.time.DateTime;
/**
* Common transfer data for {@link EppResource} types. Only applies to domains and contacts;
* hosts are implicitly transferred with their superordinate domain.
* Common transfer data for {@link EppResource} types. Only applies to domains and contacts; hosts
* are implicitly transferred with their superordinate domain.
*/
@Embed
@Unindex
@javax.persistence.Embeddable
public class TransferData extends BaseTransferObject implements Buildable {
public static final TransferData EMPTY = new TransferData();
/** The transaction id of the most recent transfer request (or null if there never was one). */
Trid transferRequestTrid;
@Embedded Trid transferRequestTrid;
/**
* The period to extend the registration upon completion of the transfer.
@@ -52,7 +55,7 @@ public class TransferData extends BaseTransferObject implements Buildable {
* <p>By default, domain transfers are for one year. This can be changed to zero by using the
* superuser EPP extension.
*/
Period transferPeriod = Period.create(1, Unit.YEARS);
@Embedded Period transferPeriod = Period.create(1, Unit.YEARS);
/**
* The registration expiration time resulting from the approval - speculative or actual - of the
@@ -81,6 +84,7 @@ public class TransferData extends BaseTransferObject implements Buildable {
* be deleted.
*/
@IgnoreSave(IfNull.class)
@ElementCollection
Set<Key<? extends TransferServerApproveEntity>> serverApproveEntities;
/**

View File

@@ -0,0 +1,59 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import static com.google.common.base.Charsets.US_ASCII;
import static com.google.common.hash.Funnels.stringFunnel;
import com.google.common.hash.BloomFilter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import javax.annotation.Nullable;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
/** JPA converter for ASCII String {@link BloomFilter}s. */
@Converter(autoApply = true)
public class BloomFilterConverter implements AttributeConverter<BloomFilter<String>, byte[]> {
@Override
@Nullable
public byte[] convertToDatabaseColumn(@Nullable BloomFilter<String> entity) {
if (entity == null) {
return null;
}
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
entity.writeTo(bos);
} catch (IOException e) {
throw new UncheckedIOException("Error saving Bloom filter data", e);
}
return bos.toByteArray();
}
@Override
@Nullable
public BloomFilter<String> convertToEntityAttribute(@Nullable byte[] columnValue) {
if (columnValue == null) {
return null;
}
try {
return BloomFilter.readFrom(new ByteArrayInputStream(columnValue), stringFunnel(US_ASCII));
} catch (IOException e) {
throw new UncheckedIOException("Error loading Bloom filter data", e);
}
}
}

View File

@@ -0,0 +1,49 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import static com.google.common.base.MoreObjects.firstNonNull;
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
import google.registry.model.CreateAutoTimestamp;
import google.registry.util.DateTimeUtils;
import java.sql.Timestamp;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import javax.annotation.Nullable;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import org.joda.time.DateTime;
/** JPA converter to for storing/retrieving CreateAutoTimestamp objects. */
@Converter(autoApply = true)
public class CreateAutoTimestampConverter
implements AttributeConverter<CreateAutoTimestamp, Timestamp> {
@Override
public Timestamp convertToDatabaseColumn(CreateAutoTimestamp entity) {
DateTime dateTime = firstNonNull(entity.getTimestamp(), jpaTm().getTransactionTime());
return Timestamp.from(DateTimeUtils.toZonedDateTime(dateTime).toInstant());
}
@Override
@Nullable
public CreateAutoTimestamp convertToEntityAttribute(@Nullable Timestamp columnValue) {
if (columnValue == null) {
return null;
}
ZonedDateTime zdt = ZonedDateTime.ofInstant(columnValue.toInstant(), ZoneOffset.UTC);
return CreateAutoTimestamp.create(DateTimeUtils.toJodaDateTime(zdt));
}
}

View File

@@ -0,0 +1,77 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import com.google.common.base.CaseFormat;
import org.hibernate.boot.model.naming.Identifier;
import org.hibernate.boot.model.naming.PhysicalNamingStrategy;
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
/**
* Nomulus naming strategy for Hibernate ORM.
*
* <p>This class applies the following naming strategies to protect readability of SQL statements:
*
* <ul>
* <li>Table names are quoted UpperCamelCases.
* <li>Column names are in lower_underscore format.
* </ul>
*
* These strategies ensure that both types of names are readable on case-insensitive platforms, and
* are easily distinguishable from each other.
*
* <p>The use of quoted names may introduce portability problems with hand-crafted SQL queries,
* e.g., between postgresql (which only accepts double-quotes) and MySQL(which only accepts
* back-quotes). This gives us incentives for adopting SQL query builders such as JOOQ for reporting
* etc.
*/
public class NomulusNamingStrategy implements PhysicalNamingStrategy {
@Override
public Identifier toPhysicalCatalogName(Identifier name, JdbcEnvironment jdbcEnvironment) {
return name;
}
@Override
public Identifier toPhysicalSchemaName(Identifier name, JdbcEnvironment jdbcEnvironment) {
return name;
}
@Override
public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment) {
if (name.isQuoted()) {
return name;
}
return jdbcEnvironment.getIdentifierHelper().toIdentifier(name.getText(), /* quoted= */ true);
}
@Override
public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment) {
return name;
}
@Override
public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment jdbcEnvironment) {
if (name.isQuoted()) {
return name;
}
// Convert the lowerCamelCase field name into the snake_case column name
return jdbcEnvironment
.getIdentifierHelper()
.toIdentifier(
CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name.getText()),
/* quoted= */ false);
}
}

View File

@@ -0,0 +1,27 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import java.sql.Types;
import org.hibernate.dialect.PostgreSQL95Dialect;
/** Nomulus mapping rules for column types in Postgresql. */
public class NomulusPostgreSQLDialect extends PostgreSQL95Dialect {
public NomulusPostgreSQLDialect() {
super();
registerColumnType(Types.VARCHAR, "text");
registerColumnType(Types.TIMESTAMP_WITH_TIMEZONE, "timestamptz");
registerColumnType(Types.TIMESTAMP, "timestamptz");
}
}

View File

@@ -0,0 +1,45 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import dagger.Component;
import google.registry.config.CredentialModule;
import google.registry.config.RegistryConfig.ConfigModule;
import google.registry.keyring.kms.KmsModule;
import google.registry.model.transaction.JpaTransactionManager;
import google.registry.persistence.PersistenceModule.AppEngineJpaTm;
import google.registry.persistence.PersistenceModule.NomulusToolJpaTm;
import google.registry.util.UtilsModule;
import javax.inject.Singleton;
import javax.persistence.EntityManagerFactory;
/** Dagger component to provide {@link EntityManagerFactory} instances. */
@Singleton
@Component(
modules = {
ConfigModule.class,
CredentialModule.class,
KmsModule.class,
PersistenceModule.class,
UtilsModule.class
})
public interface PersistenceComponent {
@AppEngineJpaTm
JpaTransactionManager appEngineJpaTransactionManager();
@NomulusToolJpaTm
JpaTransactionManager nomulusToolJpaTransactionManager();
}

View File

@@ -0,0 +1,175 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import static com.google.common.base.Preconditions.checkState;
import static google.registry.config.RegistryConfig.getHibernateConnectionIsolation;
import static google.registry.config.RegistryConfig.getHibernateHikariConnectionTimeout;
import static google.registry.config.RegistryConfig.getHibernateHikariIdleTimeout;
import static google.registry.config.RegistryConfig.getHibernateHikariMaximumPoolSize;
import static google.registry.config.RegistryConfig.getHibernateHikariMinimumIdle;
import static google.registry.config.RegistryConfig.getHibernateLogSqlQueries;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import dagger.Module;
import dagger.Provides;
import google.registry.config.RegistryConfig.Config;
import google.registry.keyring.kms.KmsKeyring;
import google.registry.model.transaction.JpaTransactionManager;
import google.registry.model.transaction.JpaTransactionManagerImpl;
import google.registry.util.Clock;
import java.lang.annotation.Documented;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Qualifier;
import javax.inject.Singleton;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.hibernate.cfg.Environment;
/** Dagger module class for the persistence layer. */
@Module
public class PersistenceModule {
// This name must be the same as the one defined in persistence.xml.
public static final String PERSISTENCE_UNIT_NAME = "nomulus";
public static final String HIKARI_CONNECTION_TIMEOUT = "hibernate.hikari.connectionTimeout";
public static final String HIKARI_MINIMUM_IDLE = "hibernate.hikari.minimumIdle";
public static final String HIKARI_MAXIMUM_POOL_SIZE = "hibernate.hikari.maximumPoolSize";
public static final String HIKARI_IDLE_TIMEOUT = "hibernate.hikari.idleTimeout";
@Provides
@DefaultHibernateConfigs
public static ImmutableMap<String, String> providesDefaultDatabaseConfigs() {
ImmutableMap.Builder<String, String> properties = ImmutableMap.builder();
properties.put(Environment.DRIVER, "org.postgresql.Driver");
properties.put(
Environment.CONNECTION_PROVIDER,
"org.hibernate.hikaricp.internal.HikariCPConnectionProvider");
// Whether to automatically validate and export schema DDL to the database when the
// SessionFactory is created. Setting it to 'none' to turn off the feature.
properties.put(Environment.HBM2DDL_AUTO, "none");
// Hibernate converts any date to this timezone when writing to the database.
properties.put(Environment.JDBC_TIME_ZONE, "UTC");
properties.put(
Environment.PHYSICAL_NAMING_STRATEGY, NomulusNamingStrategy.class.getCanonicalName());
properties.put(Environment.ISOLATION, getHibernateConnectionIsolation());
properties.put(Environment.SHOW_SQL, getHibernateLogSqlQueries());
properties.put(HIKARI_CONNECTION_TIMEOUT, getHibernateHikariConnectionTimeout());
properties.put(HIKARI_MINIMUM_IDLE, getHibernateHikariMinimumIdle());
properties.put(HIKARI_MAXIMUM_POOL_SIZE, getHibernateHikariMaximumPoolSize());
properties.put(HIKARI_IDLE_TIMEOUT, getHibernateHikariIdleTimeout());
properties.put(Environment.DIALECT, NomulusPostgreSQLDialect.class.getName());
return properties.build();
}
@Provides
@Singleton
@AppEngineJpaTm
public static JpaTransactionManager providesAppEngineJpaTm(
@Config("cloudSqlJdbcUrl") String jdbcUrl,
@Config("cloudSqlUsername") String username,
@Config("cloudSqlInstanceConnectionName") String instanceConnectionName,
KmsKeyring kmsKeyring,
@DefaultHibernateConfigs ImmutableMap<String, String> defaultConfigs,
Clock clock) {
HashMap<String, String> overrides = Maps.newHashMap(defaultConfigs);
// For Java users, the Cloud SQL JDBC Socket Factory can provide authenticated connections.
// See https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory for details.
overrides.put("socketFactory", "com.google.cloud.sql.postgres.SocketFactory");
overrides.put("cloudSqlInstance", instanceConnectionName);
overrides.put(Environment.URL, jdbcUrl);
overrides.put(Environment.USER, username);
overrides.put(Environment.PASS, kmsKeyring.getCloudSqlPassword());
return new JpaTransactionManagerImpl(create(overrides), clock);
}
@Provides
@Singleton
@NomulusToolJpaTm
public static JpaTransactionManager providesNomulusToolJpaTm(
@Config("toolsCloudSqlJdbcUrl") String jdbcUrl,
@Config("toolsCloudSqlUsername") String username,
@Config("cloudSqlInstanceConnectionName") String instanceConnectionName,
KmsKeyring kmsKeyring,
@DefaultHibernateConfigs ImmutableMap<String, String> defaultConfigs,
Clock clock) {
// Cloud SQL JDBC Socket Factory library requires the jdbc url to include all connection
// information, otherwise the connection initialization will fail. See here for more details:
// https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory
String fullJdbcUrl =
new StringBuilder(jdbcUrl)
.append("?cloudSqlInstance=" + instanceConnectionName)
.append("&socketFactory=com.google.cloud.sql.postgres.SocketFactory")
.append("&user=" + username)
.append("&password=" + kmsKeyring.getCloudSqlPassword())
.toString();
HashMap<String, String> overrides = Maps.newHashMap(defaultConfigs);
overrides.put(Environment.URL, fullJdbcUrl);
return new JpaTransactionManagerImpl(create(overrides), clock);
}
/** Constructs the {@link EntityManagerFactory} instance. */
@VisibleForTesting
public static EntityManagerFactory create(
String jdbcUrl, String username, String password, ImmutableMap<String, String> configs) {
HashMap<String, String> properties = Maps.newHashMap(configs);
properties.put(Environment.URL, jdbcUrl);
properties.put(Environment.USER, username);
properties.put(Environment.PASS, password);
return create(ImmutableMap.copyOf(properties));
}
private static EntityManagerFactory create(Map<String, String> properties) {
// If there are no annotated classes, we can create the EntityManagerFactory from the generic
// method. Otherwise we have to use a more tailored approach. Note that this adds to the set
// of annotated classes defined in the configuration, it does not override them.
EntityManagerFactory emf =
Persistence.createEntityManagerFactory(
PERSISTENCE_UNIT_NAME, ImmutableMap.copyOf(properties));
checkState(
emf != null,
"Persistence.createEntityManagerFactory() returns a null EntityManagerFactory");
return emf;
}
/** Dagger qualifier for {@link JpaTransactionManager} used for App Engine application. */
@Qualifier
@Documented
@interface AppEngineJpaTm {}
/** Dagger qualifier for {@link JpaTransactionManager} used for Nomulus tool. */
@Qualifier
@Documented
@interface NomulusToolJpaTm {}
/** Dagger qualifier for the default Hibernate configurations. */
// TODO(shicong): Change annotations in this class to none public or put them in a top level
// package
@Qualifier
@Documented
public @interface DefaultHibernateConfigs {}
}

View File

@@ -0,0 +1,46 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
import google.registry.model.UpdateAutoTimestamp;
import google.registry.util.DateTimeUtils;
import java.sql.Timestamp;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import javax.annotation.Nullable;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
/** JPA converter for storing/retrieving UpdateAutoTimestamp objects. */
@Converter(autoApply = true)
public class UpdateAutoTimestampConverter
implements AttributeConverter<UpdateAutoTimestamp, Timestamp> {
@Override
public Timestamp convertToDatabaseColumn(UpdateAutoTimestamp entity) {
return Timestamp.from(DateTimeUtils.toZonedDateTime(jpaTm().getTransactionTime()).toInstant());
}
@Override
@Nullable
public UpdateAutoTimestamp convertToEntityAttribute(@Nullable Timestamp columnValue) {
if (columnValue == null) {
return null;
}
ZonedDateTime zdt = ZonedDateTime.ofInstant(columnValue.toInstant(), ZoneOffset.UTC);
return UpdateAutoTimestamp.create(DateTimeUtils.toJodaDateTime(zdt));
}
}

View File

@@ -0,0 +1,48 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.persistence;
import java.sql.Timestamp;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import javax.annotation.Nullable;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
/**
* JPA converter to for storing/retrieving {@link ZonedDateTime} objects.
*
* <p>Hibernate provides a default converter for {@link ZonedDateTime}, but it converts timestamp to
* a non-normalized format, e.g., 2019-09-01T01:01:01Z will be converted to
* 2019-09-01T01:01:01Z[UTC]. This converter solves that problem by explicitly calling {@link
* ZoneId#normalized()} to normalize the zone id.
*/
@Converter(autoApply = true)
public class ZonedDateTimeConverter implements AttributeConverter<ZonedDateTime, Timestamp> {
@Override
@Nullable
public Timestamp convertToDatabaseColumn(@Nullable ZonedDateTime attribute) {
return attribute == null ? null : Timestamp.from(attribute.toInstant());
}
@Override
@Nullable
public ZonedDateTime convertToEntityAttribute(@Nullable Timestamp dbData) {
return dbData == null
? null
: ZonedDateTime.ofInstant(dbData.toInstant(), ZoneId.of("UTC").normalized());
}
}

View File

@@ -47,13 +47,6 @@ public class RdapHelpAction extends RdapActionBase {
}
private Notice createHelpNotice() {
String linkValue = rdapJsonFormatter.makeRdapServletRelativeUrl("help");
Link.Builder linkBuilder =
Link.builder()
.setValue(linkValue)
.setRel("alternate")
.setHref(RDAP_HELP_LINK)
.setType("text/html");
return Notice.builder()
.setTitle("RDAP Help")
.setDescription(
@@ -68,13 +61,19 @@ public class RdapHelpAction extends RdapActionBase {
"entities?fn=XXXX",
"entities?handle=XXXX",
"help/XXXX")
.addLink(linkBuilder.build())
.addLink(
Link.builder().setHref(RDAP_HELP_LINK).setRel("alternate").setType("text/html").build())
.addLink(
Link.builder()
.setHref(rdapJsonFormatter.makeRdapServletRelativeUrl("help"))
.setRel("self")
.setType("application/rdap+json")
.build())
.build();
}
@Override
public HelpResponse getJsonObjectForResource(
String pathSearchString, boolean isHeadRequest) {
public HelpResponse getJsonObjectForResource(String pathSearchString, boolean isHeadRequest) {
if (pathSearchString.isEmpty() || pathSearchString.equals("/")) {
return HelpResponse.create(Optional.of(createHelpNotice()));
}

View File

@@ -44,7 +44,6 @@ public class RdapIcannStandardInformation {
+ " https://icann.org/epp")
.addLink(
Link.builder()
.setValue("https://icann.org/epp")
.setRel("alternate")
.setHref("https://icann.org/epp")
.setType("text/html")
@@ -59,7 +58,6 @@ public class RdapIcannStandardInformation {
"URL of the ICANN RDDS Inaccuracy Complaint Form: https://www.icann.org/wicf")
.addLink(
Link.builder()
.setValue("https://www.icann.org/wicf")
.setRel("alternate")
.setHref("https://www.icann.org/wicf")
.setType("text/html")
@@ -145,8 +143,6 @@ public class RdapIcannStandardInformation {
.setType(Remark.Type.OBJECT_REDACTED_AUTHORIZATION)
.addLink(
Link.builder()
.setValue(
"https://github.com/google/nomulus/blob/master/docs/rdap.md#authentication")
.setRel("alternate")
.setHref(
"https://github.com/google/nomulus/blob/master/docs/rdap.md#authentication")

View File

@@ -228,20 +228,25 @@ public class RdapJsonFormatter {
/** Creates the TOS notice that is added to every reply. */
Notice createTosNotice() {
String linkValue = makeRdapServletRelativeUrl("help", RdapHelpAction.TOS_PATH);
Link.Builder linkBuilder = Link.builder()
.setValue(linkValue);
if (rdapTosStaticUrl == null) {
linkBuilder.setRel("self").setHref(linkValue).setType("application/rdap+json");
} else {
Link selfLink =
Link.builder().setRel("self").setHref(linkValue).setType("application/rdap+json").build();
Notice.Builder noticeBuilder =
Notice.builder()
.setTitle("RDAP Terms of Service")
.setDescription(rdapTos)
.addLink(selfLink);
if (rdapTosStaticUrl != null) {
URI htmlBaseURI = URI.create(fullServletPath);
URI htmlUri = htmlBaseURI.resolve(rdapTosStaticUrl);
linkBuilder.setRel("alternate").setHref(htmlUri.toString()).setType("text/html");
noticeBuilder.addLink(
Link.builder()
.setRel("alternate")
.setHref(htmlUri.toString())
.setType("text/html")
.build());
}
return Notice.builder()
.setTitle("RDAP Terms of Service")
.setDescription(rdapTos)
.addLink(linkBuilder.build())
.build();
return noticeBuilder.build();
}
/**
@@ -314,7 +319,6 @@ public class RdapJsonFormatter {
.add(
Link.builder()
.setHref(href)
.setValue(href)
.setRel("related")
.setType("application/rdap+json")
.build());
@@ -1078,7 +1082,6 @@ public class RdapJsonFormatter {
private Link makeSelfLink(String type, String name) {
String url = makeRdapServletRelativeUrl(type, name);
return Link.builder()
.setValue(url)
.setRel("self")
.setHref(url)
.setType("application/rdap+json")

View File

@@ -0,0 +1,252 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.schema.domain;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.util.DateTimeUtils.toZonedDateTime;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import google.registry.model.Buildable;
import google.registry.model.CreateAutoTimestamp;
import google.registry.model.ImmutableObject;
import google.registry.util.DateTimeUtils;
import java.time.ZonedDateTime;
import java.util.Optional;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import org.joda.time.DateTime;
/**
* Represents a registry lock/unlock object, meaning that the domain is locked on the registry
* level.
*
* <p>Registry locks must be requested through the registrar console by a lock-enabled contact, then
* confirmed through email within a certain length of time. Until that confirmation is processed,
* the completion time will remain null and the lock will have no effect. The same applies for
* unlock actions.
*
* <p>Note that there will be at most one row per domain with a null copmleted time -- this means
* that there is at most one pending action per domain. This is enforced at the logic level.
*
* <p>Note as well that in the case of a retry of a write after an unexpected success, the unique
* constraint on {@link #verificationCode} means that the second write will fail.
*/
@Entity
@Table(
/**
* Unique constraint to get around Hibernate's failure to handle auto-increment field in
* composite primary key.
*
* <p>Note: indexes use the camelCase version of the field names because the {@link
* google.registry.persistence.NomulusNamingStrategy} does not translate the field name into the
* snake_case column name until the write itself.
*/
indexes = {
@Index(
name = "idx_registry_lock_repo_id_revision_id",
columnList = "repoId, revisionId",
unique = true),
@Index(name = "idx_registry_lock_verification_code", columnList = "verificationCode")
})
public final class RegistryLock extends ImmutableObject implements Buildable {
/** Describes the action taken by the user. */
public enum Action {
LOCK,
UNLOCK
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false)
private Long revisionId;
/** EPP repo ID of the domain in question. */
@Column(nullable = false)
private String repoId;
// TODO (b/140568328): remove this when everything is in Cloud SQL and we can join on "domain"
@Column(nullable = false)
private String domainName;
/**
* The ID of the registrar that performed the action -- this may be the admin ID if this action
* was performed by a superuser.
*/
@Column(nullable = false)
private String registrarId;
/** The POC that performed the action, or null if it was a superuser. */
private String registrarPocId;
/**
* Lock action is immutable and describes whether the action performed was a lock or an unlock.
*/
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Action action;
/** Creation timestamp is when the lock/unlock is first requested. */
@Column(nullable = false)
private CreateAutoTimestamp creationTimestamp = CreateAutoTimestamp.create(null);
/**
* Completion timestamp is when the user has verified the lock/unlock, when this object de facto
* becomes immutable. If this field is null, it means that the lock has not been verified yet (and
* thus not been put into effect).
*/
private ZonedDateTime completionTimestamp;
/**
* The user must provide the random verification code in order to complete the lock and move the
* status from PENDING to COMPLETED.
*/
@Column(nullable = false)
private String verificationCode;
/**
* True iff this action was taken by a superuser, in response to something like a URS request. In
* this case, the action was performed by a registry admin rather than a registrar.
*/
@Column(nullable = false)
private boolean isSuperuser;
public String getRepoId() {
return repoId;
}
public String getDomainName() {
return domainName;
}
public String getRegistrarId() {
return registrarId;
}
public String getRegistrarPocId() {
return registrarPocId;
}
public Action getAction() {
return action;
}
public DateTime getCreationTimestamp() {
return creationTimestamp.getTimestamp();
}
/** Returns the completion timestamp, or empty if this lock has not been completed yet. */
public Optional<DateTime> getCompletionTimestamp() {
return Optional.ofNullable(completionTimestamp).map(DateTimeUtils::toJodaDateTime);
}
public String getVerificationCode() {
return verificationCode;
}
public boolean isSuperuser() {
return isSuperuser;
}
public Long getRevisionId() {
return revisionId;
}
public void setCompletionTimestamp(DateTime dateTime) {
this.completionTimestamp = toZonedDateTime(dateTime);
}
@Override
public Builder asBuilder() {
RegistryLock clone = clone(this);
// Revision ID should be different for every object
clone.revisionId = null;
return new Builder(clone);
}
/** Builder for {@link google.registry.schema.domain.RegistryLock}. */
public static class Builder extends Buildable.Builder<RegistryLock> {
public Builder() {}
private Builder(RegistryLock instance) {
super(instance);
}
@Override
public RegistryLock build() {
checkArgumentNotNull(getInstance().repoId, "Repo ID cannot be null");
checkArgumentNotNull(getInstance().domainName, "Domain name cannot be null");
checkArgumentNotNull(getInstance().registrarId, "Registrar ID cannot be null");
checkArgumentNotNull(getInstance().action, "Action cannot be null");
checkArgumentNotNull(getInstance().verificationCode, "Verification codecannot be null");
checkArgument(
getInstance().registrarPocId != null || getInstance().isSuperuser,
"Registrar POC ID must be provided if superuser is false");
return super.build();
}
public Builder setRepoId(String repoId) {
getInstance().repoId = repoId;
return this;
}
public Builder setDomainName(String domainName) {
getInstance().domainName = domainName;
return this;
}
public Builder setRegistrarId(String registrarId) {
getInstance().registrarId = registrarId;
return this;
}
public Builder setRegistrarPocId(String registrarPocId) {
getInstance().registrarPocId = registrarPocId;
return this;
}
public Builder setAction(Action action) {
getInstance().action = action;
return this;
}
public Builder setCreationTimestamp(CreateAutoTimestamp creationTimestamp) {
getInstance().creationTimestamp = creationTimestamp;
return this;
}
public Builder setCompletionTimestamp(DateTime lockTimestamp) {
getInstance().completionTimestamp = toZonedDateTime(lockTimestamp);
return this;
}
public Builder setVerificationCode(String verificationCode) {
getInstance().verificationCode = verificationCode;
return this;
}
public Builder isSuperuser(boolean isSuperuser) {
getInstance().isSuperuser = isSuperuser;
return this;
}
}
}

View File

@@ -0,0 +1,127 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.schema.tld;
import static com.google.common.base.Charsets.US_ASCII;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.hash.Funnels.stringFunnel;
import com.google.common.collect.ImmutableMap;
import com.google.common.hash.BloomFilter;
import google.registry.model.CreateAutoTimestamp;
import java.math.BigDecimal;
import java.util.Map;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
import javax.persistence.Table;
import org.joda.money.CurrencyUnit;
import org.joda.time.DateTime;
/**
* A list of premium prices for domain names.
*
* <p>Note that the primary key of this entity is {@link #revisionId}, which is auto-generated by
* the database. So, if a retry of insertion happens after the previous attempt unexpectedly
* succeeds, we will end up with having two exact same premium lists that differ only by revisionId.
* This is fine though, because we only use the list with the highest revisionId.
*/
@Entity
@Table(indexes = {@Index(columnList = "name", name = "premiumlist_name_idx")})
public class PremiumList {
@Column(nullable = false)
private String name;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false)
private Long revisionId;
@Column(nullable = false)
private CreateAutoTimestamp creationTimestamp = CreateAutoTimestamp.create(null);
@Column(nullable = false)
private CurrencyUnit currency;
@ElementCollection
@CollectionTable(
name = "PremiumEntry",
joinColumns = @JoinColumn(name = "revisionId", referencedColumnName = "revisionId"))
@MapKeyColumn(name = "domainLabel")
@Column(name = "price", nullable = false)
private Map<String, BigDecimal> labelsToPrices;
@Column(nullable = false)
private BloomFilter<String> bloomFilter;
private PremiumList(String name, CurrencyUnit currency, Map<String, BigDecimal> labelsToPrices) {
this.name = name;
this.currency = currency;
this.labelsToPrices = labelsToPrices;
// ASCII is used for the charset because all premium list domain labels are stored punycoded.
this.bloomFilter = BloomFilter.create(stringFunnel(US_ASCII), labelsToPrices.size());
labelsToPrices.keySet().forEach(this.bloomFilter::put);
}
// Hibernate requires this default constructor.
private PremiumList() {}
/** Constructs a {@link PremiumList} object. */
public static PremiumList create(
String name, CurrencyUnit currency, Map<String, BigDecimal> labelsToPrices) {
return new PremiumList(name, currency, labelsToPrices);
}
/** Returns the name of the premium list, which is usually also a TLD string. */
public String getName() {
return name;
}
/** Returns the ID of this revision, or throws if null. */
public Long getRevisionId() {
checkState(
revisionId != null, "revisionId is null because it is not persisted in the database");
return revisionId;
}
/** Returns the creation time of this revision of the premium list. */
public DateTime getCreationTimestamp() {
return creationTimestamp.getTimestamp();
}
/** Returns a {@link Map} of domain labels to prices. */
public ImmutableMap<String, BigDecimal> getLabelsToPrices() {
return ImmutableMap.copyOf(labelsToPrices);
}
/**
* Returns a Bloom filter to determine whether a label might be premium, or is definitely not.
*
* <p>If the domain label might be premium, then the next step is to check for the existence of a
* corresponding row in the PremiumListEntry table. Otherwise, we know for sure it's not premium,
* and no DB load is required.
*/
public BloomFilter<String> getBloomFilter() {
return bloomFilter;
}
}

View File

@@ -0,0 +1,56 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.schema.tld;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.model.transaction.TransactionManagerFactory.jpaTm;
/** Data access object class for {@link PremiumList}. */
public class PremiumListDao {
/** Persist a new premium list to Cloud SQL. */
public static void saveNew(PremiumList premiumList) {
jpaTm()
.transact(
() -> {
checkArgument(
!checkExists(premiumList.getName()),
"A premium list of this name already exists: %s.",
premiumList.getName());
jpaTm().getEntityManager().persist(premiumList);
});
}
/**
* Returns whether the premium list of the given name exists.
*
* <p>This means that at least one premium list revision must exist for the given name.
*/
public static boolean checkExists(String premiumListName) {
return jpaTm()
.transact(
() ->
jpaTm()
.getEntityManager()
.createQuery("SELECT 1 FROM PremiumList WHERE name = :name", Integer.class)
.setParameter("name", premiumListName)
.setMaxResults(1)
.getResultList()
.size()
> 0);
}
private PremiumListDao() {}
}

View File

@@ -0,0 +1,108 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.schema.tmch;
import static com.google.common.base.Preconditions.checkState;
import static google.registry.util.DateTimeUtils.toJodaDateTime;
import static google.registry.util.DateTimeUtils.toZonedDateTime;
import google.registry.model.CreateAutoTimestamp;
import google.registry.model.ImmutableObject;
import java.time.ZonedDateTime;
import java.util.Map;
import java.util.Optional;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
import javax.persistence.Table;
import org.joda.time.DateTime;
/**
* A list of TMCH claims labels and their associated claims keys.
*
* <p>Note that the primary key of this entity is {@link #revisionId}, which is auto-generated by
* the database. So, if a retry of insertion happens after the previous attempt unexpectedly
* succeeds, we will end up with having two exact same claims list with only different {@link
* #revisionId}. However, this is not an actual problem because we only use the claims list with
* highest {@link #revisionId}.
*/
@Entity
@Table
public class ClaimsList extends ImmutableObject {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Long revisionId;
@Column(nullable = false)
private CreateAutoTimestamp creationTimestamp = CreateAutoTimestamp.create(null);
@Column(nullable = false)
private ZonedDateTime tmdbGenerationTime;
@ElementCollection
@CollectionTable(
name = "ClaimsEntry",
joinColumns = @JoinColumn(name = "revisionId", referencedColumnName = "revisionId"))
@MapKeyColumn(name = "domainLabel", nullable = false)
@Column(name = "claimKey", nullable = false)
private Map<String, String> labelsToKeys;
private ClaimsList(ZonedDateTime tmdbGenerationTime, Map<String, String> labelsToKeys) {
this.tmdbGenerationTime = tmdbGenerationTime;
this.labelsToKeys = labelsToKeys;
}
// Hibernate requires this default constructor.
private ClaimsList() {}
/** Constructs a {@link ClaimsList} object. */
public static ClaimsList create(DateTime creationTimestamp, Map<String, String> labelsToKeys) {
return new ClaimsList(toZonedDateTime(creationTimestamp), labelsToKeys);
}
/** Returns the revision id of this claims list, or throws exception if it is null. */
public Long getRevisionId() {
checkState(
revisionId != null, "revisionId is null because it is not persisted in the database");
return revisionId;
}
/** Returns the TMDB generation time of this claims list. */
public DateTime getTmdbGenerationTime() {
return toJodaDateTime(tmdbGenerationTime);
}
/** Returns the creation time of this claims list. */
public DateTime getCreationTimestamp() {
return creationTimestamp.getTimestamp();
}
/** Returns an {@link Map} mapping domain label to its lookup key. */
public Map<String, String> getLabelsToKeys() {
return labelsToKeys;
}
/** Returns the claim key for a given domain if there is one, empty otherwise. */
public Optional<String> getClaimKey(String label) {
return Optional.ofNullable(labelsToKeys.get(label));
}
}

View File

@@ -18,7 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableMap;
import google.registry.model.tmch.ClaimsListShard;
import google.registry.schema.tmch.ClaimsList;
import java.util.List;
import org.joda.time.DateTime;
@@ -34,11 +34,11 @@ import org.joda.time.DateTime;
public class ClaimsListParser {
/**
* Converts the lines from the DNL CSV file into a {@link ClaimsListShard} object.
* Converts the lines from the DNL CSV file into a {@link ClaimsList} object.
*
* <p>Please note that this does <b>not</b> insert the object into Datastore.
*/
public static ClaimsListShard parse(List<String> lines) {
public static ClaimsList parse(List<String> lines) {
ImmutableMap.Builder<String, String> builder = new ImmutableMap.Builder<>();
// First line: <version>,<DNL List creation datetime>
@@ -74,6 +74,6 @@ public class ClaimsListParser {
builder.put(label, lookupKey);
}
return ClaimsListShard.create(creationTime, builder.build());
return ClaimsList.create(creationTime, builder.build());
}
}

View File

@@ -18,9 +18,11 @@ import static google.registry.request.Action.Method.POST;
import com.google.common.flogger.FluentLogger;
import google.registry.keyring.api.KeyModule.Key;
import google.registry.model.tmch.ClaimsListDao;
import google.registry.model.tmch.ClaimsListShard;
import google.registry.request.Action;
import google.registry.request.auth.Auth;
import google.registry.schema.tmch.ClaimsList;
import java.io.IOException;
import java.security.SignatureException;
import java.util.List;
@@ -54,10 +56,14 @@ public final class TmchDnlAction implements Runnable {
} catch (SignatureException | IOException | PGPException e) {
throw new RuntimeException(e);
}
ClaimsListShard claims = ClaimsListParser.parse(lines);
claims.save();
ClaimsList claims = ClaimsListParser.parse(lines);
ClaimsListShard claimsListShard =
ClaimsListShard.create(claims.getTmdbGenerationTime(), claims.getLabelsToKeys());
claimsListShard.save();
logger.atInfo().log(
"Inserted %,d claims into Datastore, created at %s",
claims.size(), claims.getCreationTime());
claimsListShard.size(), claimsListShard.getCreationTime());
ClaimsListDao.trySave(claims);
}
}

View File

@@ -0,0 +1,23 @@
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.tools;
/**
* Marker interface for commands that use Cloud Sql.
*
* <p>Just implementing this is sufficient to use Cloud Sql; {@link RegistryTool} will install it as
* needed.
*/
interface CommandWithCloudSql extends CommandWithRemoteApi {}

View File

@@ -16,6 +16,7 @@ package google.registry.tools;
import static com.google.common.base.Strings.isNullOrEmpty;
import static google.registry.security.JsonHttp.JSON_SAFETY_PREFIX;
import static google.registry.tools.server.CreateOrUpdatePremiumListAction.ALSO_CLOUD_SQL_PARAM;
import static google.registry.tools.server.CreateOrUpdatePremiumListAction.INPUT_PARAM;
import static google.registry.tools.server.CreateOrUpdatePremiumListAction.NAME_PARAM;
import static google.registry.util.ListNamingUtils.convertFilePathToName;
@@ -57,6 +58,12 @@ abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
required = true)
Path inputFile;
@Parameter(
names = {"--also_cloud_sql"},
description =
"Persist premium list to Cloud SQL in addition to Datastore; defaults to false.")
boolean alsoCloudSql;
protected AppEngineConnection connection;
protected int inputLineCount;
@@ -67,7 +74,7 @@ abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
abstract String getCommandPath();
ImmutableMap<String, ?> getParameterMap() {
ImmutableMap<String, String> getParameterMap() {
return ImmutableMap.of();
}
@@ -88,14 +95,15 @@ abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
@Override
public String execute() throws Exception {
ImmutableMap.Builder<String, Object> params = new ImmutableMap.Builder<>();
ImmutableMap.Builder<String, String> params = new ImmutableMap.Builder<>();
params.put(NAME_PARAM, name);
params.put(ALSO_CLOUD_SQL_PARAM, Boolean.toString(alsoCloudSql));
String inputFileContents = new String(Files.readAllBytes(inputFile), UTF_8);
String requestBody =
Joiner.on('&').withKeyValueSeparator("=").join(
ImmutableMap.of(INPUT_PARAM, URLEncoder.encode(inputFileContents, UTF_8.toString())));
ImmutableMap<String, ?> extraParams = getParameterMap();
ImmutableMap<String, String> extraParams = getParameterMap();
if (extraParams != null) {
params.putAll(extraParams);
}
@@ -110,7 +118,7 @@ abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
// TODO(user): refactor this behavior into a better general-purpose
// response validation that can be re-used across the new client/server commands.
String extractServerResponse(String response) {
private String extractServerResponse(String response) {
Map<String, Object> responseMap = toMap(JSONValue.parse(stripJsonPrefix(response)));
// TODO(user): consider using jart's FormField Framework.
@@ -127,7 +135,7 @@ abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
}
// TODO(user): figure out better place to put this method to make it re-usable
static String stripJsonPrefix(String json) {
private static String stripJsonPrefix(String json) {
Verify.verify(json.startsWith(JSON_SAFETY_PREFIX));
return json.substring(JSON_SAFETY_PREFIX.length());
}

View File

@@ -36,12 +36,11 @@ public class CreatePremiumListCommand extends CreateOrUpdatePremiumListCommand {
}
@Override
ImmutableMap<String, ?> getParameterMap() {
ImmutableMap<String, String> getParameterMap() {
if (override) {
return ImmutableMap.of("override", override);
return ImmutableMap.of("override", "true");
} else {
return ImmutableMap.of();
}
}
}

View File

@@ -1,32 +0,0 @@
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument;
import com.beust.jcommander.Parameters;
import google.registry.config.RegistryEnvironment;
/** Command to create a TLD in sandbox, separated out for gTech use. */
@Parameters(separators = " =", commandDescription = "Create new sandbox TLD(s)")
final class CreateSandboxTldCommand extends CreateTldCommand {
@Override
void assertAllowedEnvironment() {
checkArgument(
RegistryEnvironment.get() == RegistryEnvironment.SANDBOX,
"This command can only be run in the sandbox environment");
}
}

View File

@@ -14,66 +14,191 @@
package google.registry.tools;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import google.registry.model.domain.DomainBase;
import com.google.common.annotations.VisibleForTesting;
import google.registry.persistence.NomulusNamingStrategy;
import google.registry.persistence.NomulusPostgreSQLDialect;
import google.registry.persistence.PersistenceModule;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Environment;
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
import org.hibernate.jpa.boot.internal.PersistenceXmlParser;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.hibernate.tool.schema.TargetType;
import org.testcontainers.containers.PostgreSQLContainer;
/**
* Generates a schema for JPA annotated classes using hibernate.
* Generates a schema for JPA annotated classes using Hibernate.
*
* <p>Note that this isn't complete yet, as all of the persistent classes have not yet been
* converted. After converting a class, a call to "addAnnotatedClass()" for the new class must be
* added to the code below.
*/
@Parameters(separators = " =", commandDescription = "Generate postgresql schema.")
@Parameters(separators = " =", commandDescription = "Generate PostgreSQL schema.")
public class GenerateSqlSchemaCommand implements Command {
@VisibleForTesting
public static final String DB_OPTIONS_CLASH =
"Database host and port may not be specified along with the option to start a "
+ "PostgreSQL container.";
@VisibleForTesting
public static final int POSTGRESQL_PORT = 5432;
private PostgreSQLContainer postgresContainer = null;
@Parameter(
names = {"-o", "--out-file"},
description = "")
names = {"-o", "--out_file"},
description = "Name of the output file.",
required = true)
String outFile;
@Parameter(
names = {"-a", "--db-host"},
names = {"-s", "--start_postgresql"},
description = "If specified, start PostgreSQL in a Docker container.")
boolean startPostgresql = false;
@Parameter(
names = {"-a", "--db_host"},
description = "Database host name.")
String databaseHost;
@Parameter(
names = {"-p", "--db-port"},
description = "Database port number. This defaults to the postgresql default port.")
int databasePort = POSTGRESQL_PORT;
names = {"-p", "--db_port"},
description = "Database port number. This defaults to the PostgreSQL default port.")
Integer databasePort;
@Override
public void run() {
// TODO(mmuller): Optionally (and perhaps by default) start a postgresql instance container
// rather than relying on the user to have one to connect to.
Map<String, String> settings = new HashMap<>();
settings.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQL9Dialect");
settings.put(
"hibernate.connection.url",
"jdbc:postgresql://" + databaseHost + ":" + databasePort + "/postgres?useSSL=false");
settings.put("hibernate.connection.username", "postgres");
settings.put("hibernate.connection.password", "domain-registry");
settings.put("hibernate.hbm2ddl.auto", "none");
settings.put("show_sql", "true");
// Start PostgreSQL if requested.
if (startPostgresql) {
// Complain if the user has also specified either --db_host or --db_port.
if (databaseHost != null || databasePort != null) {
System.err.println(DB_OPTIONS_CLASH);
// TODO: it would be nice to exit(1) here, but this breaks testability.
return;
}
MetadataSources metadata =
new MetadataSources(new StandardServiceRegistryBuilder().applySettings(settings).build());
metadata.addAnnotatedClass(DomainBase.class);
SchemaExport schemaExport = new SchemaExport();
schemaExport.setHaltOnError(true);
schemaExport.setFormat(true);
schemaExport.setDelimiter(";");
schemaExport.setOutputFile(outFile);
schemaExport.createOnly(EnumSet.of(TargetType.SCRIPT), metadata.buildMetadata());
// Start the container and store the address information.
postgresContainer = new PostgreSQLContainer()
.withDatabaseName("postgres")
.withUsername("postgres")
.withPassword("domain-registry");
postgresContainer.start();
databaseHost = postgresContainer.getContainerIpAddress();
databasePort = postgresContainer.getMappedPort(POSTGRESQL_PORT);
} else if (databaseHost == null) {
System.err.println(
"You must specify either --start_postgresql to start a PostgreSQL database in a\n"
+ "docker instance, or specify --db_host (and, optionally, --db_port) to identify\n"
+ "the location of a running instance. To start a long-lived instance (suitable\n"
+ "for running this command multiple times) run this:\n\n"
+ " docker run --rm --name some-postgres -e POSTGRES_PASSWORD=domain-registry \\\n"
+ " -d postgres:9.6.12\n\n"
+ "Copy the container id output from the command, then run:\n\n"
+ " docker inspect <container-id> | grep IPAddress\n\n"
+ "To obtain the value for --db-host.\n");
// TODO(mmuller): need exit(1), see above.
return;
}
// use the default port if non has been defined.
if (databasePort == null) {
databasePort = POSTGRESQL_PORT;
}
try {
// Configure Hibernate settings.
Map<String, String> settings = new HashMap<>();
settings.put("hibernate.dialect", NomulusPostgreSQLDialect.class.getName());
settings.put(
"hibernate.connection.url",
"jdbc:postgresql://" + databaseHost + ":" + databasePort + "/postgres?useSSL=false");
settings.put("hibernate.connection.username", "postgres");
settings.put("hibernate.connection.password", "domain-registry");
settings.put("hibernate.hbm2ddl.auto", "none");
settings.put("show_sql", "true");
settings.put(
Environment.PHYSICAL_NAMING_STRATEGY, NomulusNamingStrategy.class.getCanonicalName());
MetadataSources metadata =
new MetadataSources(new StandardServiceRegistryBuilder().applySettings(settings).build());
addAnnotatedClasses(metadata, settings);
SchemaExport schemaExport = new SchemaExport();
schemaExport.setHaltOnError(true);
schemaExport.setFormat(true);
schemaExport.setDelimiter(";");
schemaExport.setOutputFile(outFile);
// Generate the copyright header (this file gets checked for copyright). The schema exporter
// appends to the existing file, so this has the additional desired effect of clearing any
// existing data in the file.
String copyright =
"-- Copyright 2019 The Nomulus Authors. All Rights Reserved.\n"
+ "--\n"
+ "-- Licensed under the Apache License, Version 2.0 (the \"License\");\n"
+ "-- you may not use this file except in compliance with the License.\n"
+ "-- You may obtain a copy of the License at\n"
+ "--\n"
+ "-- http://www.apache.org/licenses/LICENSE-2.0\n"
+ "--\n"
+ "-- Unless required by applicable law or agreed to in writing, software\n"
+ "-- distributed under the License is distributed on an \"AS IS\" BASIS,\n"
+ "-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+ "-- See the License for the specific language governing permissions and\n"
+ "-- limitations under the License.\n";
try {
Files.write(Paths.get(outFile), copyright.getBytes(UTF_8));
} catch (IOException e) {
System.err.println("Error writing sql file: " + e);
e.printStackTrace();
System.exit(1);
}
schemaExport.createOnly(EnumSet.of(TargetType.SCRIPT), metadata.buildMetadata());
} finally {
if (postgresContainer != null) {
postgresContainer.stop();
}
}
}
private void addAnnotatedClasses(MetadataSources metadata, Map<String, String> settings) {
ParsedPersistenceXmlDescriptor descriptor =
PersistenceXmlParser.locatePersistenceUnits(settings).stream()
.filter(unit -> PersistenceModule.PERSISTENCE_UNIT_NAME.equals(unit.getName()))
.findFirst()
.orElseThrow(
() ->
new IllegalArgumentException(
String.format(
"Could not find persistence unit with name %s",
PersistenceModule.PERSISTENCE_UNIT_NAME)));
List<String> classNames = descriptor.getManagedClassNames();
for (String className : classNames) {
try {
Class<?> clazz = Class.forName(className);
metadata.addAnnotatedClass(clazz);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException(
String.format(
"Could not load class with name %s present in persistence.xml", className),
e);
}
}
}
}

View File

@@ -65,6 +65,12 @@ final class GetKeyringSecretCommand implements CommandWithRemoteApi {
case BRDA_SIGNING_PUBLIC_KEY:
out.write(KeySerializer.serializePublicKey(keyring.getBrdaSigningKey().getPublicKey()));
break;
case CLOUD_SQL_PASSWORD:
out.write(KeySerializer.serializeString(keyring.getCloudSqlPassword()));
break;
case TOOLS_CLOUD_SQL_PASSWORD:
out.write(KeySerializer.serializeString(keyring.getToolsCloudSqlPassword()));
break;
case ICANN_REPORTING_PASSWORD:
out.write(KeySerializer.serializeString(keyring.getIcannReportingPassword()));
break;

View File

@@ -1,83 +0,0 @@
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.tools;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
/** Command line interface with a subset of commands that are safe for tech support to run. */
public final class GtechTool {
/** Names of commands from {@link RegistryTool#COMMAND_MAP} to include in GtechTool. */
@VisibleForTesting
static final ImmutableSet<String> COMMAND_SET = ImmutableSet.of(
"canonicalize_labels",
"check_domain",
"check_domain_claims",
"convert_idn",
"count_domains",
"create_anchor_tenant",
"create_contact",
"create_domain",
"create_host",
"create_registrar",
"create_registrar_groups",
"create_sandbox_tld",
"delete_domain",
"generate_dns_report",
"get_allocation_token",
"get_claims_list",
"get_contact",
"get_domain",
"get_history_entries",
"get_host",
"get_registrar",
"get_routing_map",
"get_schema",
"get_schema_tree",
"get_tld",
"hash_certificate",
"list_registrars",
"list_tlds",
"lock_domain",
"login",
"logout",
"registrar_contact",
"setup_ote",
"uniform_rapid_suspension",
"unlock_domain",
"unrenew_domain",
"update_domain",
"update_registrar",
"update_sandbox_tld",
"update_server_locks",
"validate_login_credentials",
"verify_ote",
"whois_query");
@VisibleForTesting
static final ImmutableMap<String, Class<? extends Command>> COMMAND_MAP =
ImmutableMap.copyOf(Maps.filterKeys(RegistryTool.COMMAND_MAP, Predicates.in(COMMAND_SET)));
public static void main(String[] args) throws Exception {
RegistryToolEnvironment.parseFromArgs(args).setup();
try (RegistryCli cli = new RegistryCli("gtech_tool", COMMAND_MAP)) {
cli.run(args);
}
}
}

View File

@@ -31,6 +31,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import google.registry.config.RegistryConfig;
import google.registry.model.ofy.ObjectifyService;
import google.registry.model.transaction.TransactionManagerFactory;
import google.registry.tools.AuthModule.LoginRequiredException;
import google.registry.tools.params.ParameterFactory;
import java.io.ByteArrayInputStream;
@@ -44,8 +45,7 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
final class RegistryCli implements AutoCloseable, CommandRunner {
// The environment parameter is parsed twice: once here, and once with {@link
// RegistryToolEnvironment#parseFromArgs} in the {@link RegistryTool#main} or {@link
// GtechTool#main} functions.
// RegistryToolEnvironment#parseFromArgs} in the {@link RegistryTool#main} function.
//
// The flag names must be in sync between the two, and also - this is ugly and we should feel bad.
@Parameter(
@@ -211,6 +211,8 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
}
// CommandWithRemoteApis need to have the remote api installed to work.
// CommandWithCloudSql extends CommandWithRemoteApi so the command will also get the remote
// api installed. This is because the DB password is stored in Datastore.
if (command instanceof CommandWithRemoteApi) {
if (installer == null) {
installer = new RemoteApiInstaller();
@@ -234,6 +236,10 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
ofy().clearSessionCache();
}
if (command instanceof CommandWithCloudSql) {
TransactionManagerFactory.initForTool();
}
command.run();
}

View File

@@ -44,7 +44,6 @@ public final class RegistryTool {
.put("create_registrar", CreateRegistrarCommand.class)
.put("create_registrar_groups", CreateRegistrarGroupsCommand.class)
.put("create_reserved_list", CreateReservedListCommand.class)
.put("create_sandbox_tld", CreateSandboxTldCommand.class)
.put("create_tld", CreateTldCommand.class)
.put("curl", CurlCommand.class)
.put("delete_allocation_tokens", DeleteAllocationTokensCommand.class)
@@ -114,7 +113,6 @@ public final class RegistryTool {
.put("update_premium_list", UpdatePremiumListCommand.class)
.put("update_registrar", UpdateRegistrarCommand.class)
.put("update_reserved_list", UpdateReservedListCommand.class)
.put("update_sandbox_tld", UpdateSandboxTldCommand.class)
.put("update_server_locks", UpdateServerLocksCommand.class)
.put("update_tld", UpdateTldCommand.class)
.put("upload_claims_list", UploadClaimsListCommand.class)

View File

@@ -65,6 +65,12 @@ final class UpdateKmsKeyringCommand implements CommandWithRemoteApi {
throw new IllegalArgumentException(
"Can't update BRDA_SIGNING_PUBLIC_KEY directly."
+ " Must update public and private keys together using BRDA_SIGNING_KEY_PAIR.");
case CLOUD_SQL_PASSWORD:
kmsUpdater.setCloudSqlPassword(deserializeString(input));
break;
case TOOLS_CLOUD_SQL_PASSWORD:
kmsUpdater.setToolsCloudSqlPassword(deserializeString(input));
break;
case ICANN_REPORTING_PASSWORD:
kmsUpdater.setIcannReportingPassword(deserializeString(input));
break;

View File

@@ -1,32 +0,0 @@
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument;
import com.beust.jcommander.Parameters;
import google.registry.config.RegistryEnvironment;
/** Command to update a TLD in sandbox, separated out for gTech use. */
@Parameters(separators = " =", commandDescription = "Update new sandbox TLD(s)")
final class UpdateSandboxTldCommand extends UpdateTldCommand {
@Override
void assertAllowedEnvironment() {
checkArgument(
RegistryEnvironment.get() == RegistryEnvironment.SANDBOX,
"This command can only be run in the sandbox environment");
}
}

View File

@@ -21,7 +21,9 @@ import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import com.google.common.base.Joiner;
import com.google.common.io.Files;
import google.registry.model.tmch.ClaimsListDao;
import google.registry.model.tmch.ClaimsListShard;
import google.registry.schema.tmch.ClaimsList;
import google.registry.tmch.ClaimsListParser;
import java.io.File;
import java.io.IOException;
@@ -35,9 +37,14 @@ final class UploadClaimsListCommand extends ConfirmingCommand implements Command
@Parameter(description = "Claims list filename")
private List<String> mainParameters = new ArrayList<>();
@Parameter(
names = {"--also_cloud_sql"},
description = "Persist claims list to Cloud SQL in addition to Datastore; defaults to false.")
boolean alsoCloudSql;
private String claimsListFilename;
private ClaimsListShard claimsList;
private ClaimsList claimsList;
@Override
protected void init() throws IOException {
@@ -56,7 +63,10 @@ final class UploadClaimsListCommand extends ConfirmingCommand implements Command
@Override
public String execute() {
claimsList.save();
ClaimsListShard.create(claimsList.getTmdbGenerationTime(), claimsList.getLabelsToKeys()).save();
if (alsoCloudSql) {
ClaimsListDao.trySave(claimsList);
}
return String.format("Successfully uploaded claims list %s", claimsListFilename);
}
}

View File

@@ -24,6 +24,7 @@ public enum KeyringKeyName {
BRDA_RECEIVER_PUBLIC_KEY,
BRDA_SIGNING_KEY_PAIR,
BRDA_SIGNING_PUBLIC_KEY,
CLOUD_SQL_PASSWORD,
ICANN_REPORTING_PASSWORD,
JSON_CREDENTIAL,
MARKSDB_DNL_LOGIN_AND_PASSWORD,
@@ -37,5 +38,5 @@ public enum KeyringKeyName {
RDE_STAGING_KEY_PAIR,
RDE_STAGING_PUBLIC_KEY,
SAFE_BROWSING_API_KEY,
TOOLS_CLOUD_SQL_PASSWORD,
}

View File

@@ -14,17 +14,28 @@
package google.registry.tools.server;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.flogger.LazyArgs.lazy;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
import com.google.common.flogger.FluentLogger;
import google.registry.model.registry.label.PremiumList;
import google.registry.model.registry.label.PremiumList.PremiumListEntry;
import google.registry.request.JsonResponse;
import google.registry.request.Parameter;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import org.joda.money.CurrencyUnit;
/**
* Abstract base class for actions that update premium lists.
*/
/** Abstract base class for actions that update premium lists. */
public abstract class CreateOrUpdatePremiumListAction implements Runnable {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
@@ -33,24 +44,70 @@ public abstract class CreateOrUpdatePremiumListAction implements Runnable {
public static final String NAME_PARAM = "name";
public static final String INPUT_PARAM = "inputData";
public static final String ALSO_CLOUD_SQL_PARAM = "alsoCloudSql";
@Inject JsonResponse response;
@Inject @Parameter("premiumListName") String name;
@Inject @Parameter(INPUT_PARAM) String inputData;
@Inject
@Parameter("premiumListName")
String name;
@Inject
@Parameter(INPUT_PARAM)
String inputData;
@Inject
@Parameter(ALSO_CLOUD_SQL_PARAM)
boolean alsoCloudSql;
@Override
public void run() {
try {
savePremiumList();
saveToDatastore();
} catch (IllegalArgumentException e) {
logger.atInfo().withCause(e).log(
"Usage error in attempting to save premium list from nomulus tool command");
response.setPayload(ImmutableMap.of("error", e.toString(), "status", "error"));
return;
} catch (Exception e) {
logger.atSevere().withCause(e).log(
"Unexpected error saving premium list from nomulus tool command");
"Unexpected error saving premium list to Datastore from nomulus tool command");
response.setPayload(ImmutableMap.of("error", e.toString(), "status", "error"));
return;
}
if (alsoCloudSql) {
try {
saveToCloudSql();
} catch (Throwable e) {
logger.atSevere().withCause(e).log(
"Unexpected error saving premium list to Cloud SQL from nomulus tool command");
response.setPayload(ImmutableMap.of("error", e.toString(), "status", "error"));
return;
}
}
}
google.registry.schema.tld.PremiumList parseInputToPremiumList() {
List<String> inputDataPreProcessed =
Splitter.on('\n').omitEmptyStrings().splitToList(inputData);
ImmutableMap<String, PremiumListEntry> prices =
new PremiumList.Builder().setName(name).build().parse(inputDataPreProcessed);
ImmutableSet<CurrencyUnit> currencies =
prices.values().stream()
.map(e -> e.getValue().getCurrencyUnit())
.distinct()
.collect(toImmutableSet());
checkArgument(
currencies.size() == 1,
"The Cloud SQL schema requires exactly one currency, but got: %s",
ImmutableSortedSet.copyOf(currencies));
CurrencyUnit currency = Iterables.getOnlyElement(currencies);
Map<String, BigDecimal> priceAmounts =
Maps.transformValues(prices, ple -> ple.getValue().getAmount());
return google.registry.schema.tld.PremiumList.create(name, currency, priceAmounts);
}
/** Logs the premium list data at INFO, truncated if too long. */
@@ -64,6 +121,9 @@ public abstract class CreateOrUpdatePremiumListAction implements Runnable {
: (inputData.substring(0, MAX_LOGGING_PREMIUM_LIST_LENGTH) + "<truncated>")));
}
/** Creates a new premium list or updates an existing one. */
protected abstract void savePremiumList();
/** Saves the premium list to Datastore. */
protected abstract void saveToDatastore();
/** Saves the premium list to Cloud SQL. */
protected abstract void saveToCloudSql();
}

View File

@@ -27,6 +27,7 @@ import google.registry.model.registry.label.PremiumList;
import google.registry.request.Action;
import google.registry.request.Parameter;
import google.registry.request.auth.Auth;
import google.registry.schema.tld.PremiumListDao;
import java.util.List;
import javax.inject.Inject;
@@ -50,7 +51,7 @@ public class CreatePremiumListAction extends CreateOrUpdatePremiumListAction {
@Inject CreatePremiumListAction() {}
@Override
protected void savePremiumList() {
protected void saveToDatastore() {
checkArgument(
!doesPremiumListExist(name), "A premium list of this name already exists: %s.", name);
if (!override) {
@@ -71,4 +72,22 @@ public class CreatePremiumListAction extends CreateOrUpdatePremiumListAction {
logger.atInfo().log(message);
response.setPayload(ImmutableMap.of("status", "success", "message", message));
}
@Override
protected void saveToCloudSql() {
if (!override) {
assertTldExists(name);
}
logger.atInfo().log("Saving premium list to Cloud SQL for TLD %s", name);
// TODO(mcilwain): Call logInputData() here once Datastore persistence is removed.
google.registry.schema.tld.PremiumList premiumList = parseInputToPremiumList();
PremiumListDao.saveNew(premiumList);
String message =
String.format(
"Saved premium list %s with %d entries", name, premiumList.getLabelsToPrices().size());
logger.atInfo().log(message);
// TODO(mcilwain): Call response.setPayload(...) here once Datastore persistence is removed.
}
}

Some files were not shown because too many files have changed in this diff Show More