This also raises their access level so they can be called by other classes that
extend EppTestCase (which I'm writing in a follow-up CL).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223512618
This temporarily disables the ability to download service account credentials. We'd like this to go in to next week's release so that we do not expose this functionality to users who otherwise do not have the ability to download the service account credential, while we research on a more secure solution.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223397754
Add a first pass add Nomulus GAE deployment to our gradle build scripts. This
attempt could stand some improvement. In particular:
- It currently only deploys to crash, per discussion we will make the
environment a parameter.
- This uses a different import mechanism from the other plugins (via a
"buildscript" section) and it looks like the lint plugin is very similar.
I'll experiment with getting it to work that way.
- There is a lot of redundancy in the deployment scripts for each module, and
given that we have the full power of a general programming language it
should be possible for us to reuse the common parts.
But that said, this is a pretty good first step and I wanted to put it out
there.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223366370
I'm adding another EPP lifecycle test that will need to be in the tools package
because it has to call tools as part of the lifecycle. This commit consolidates
common functionality within the EppTestCase abstract base class (and increases
visibility) so that it can easily be referenced by more extending classes, even
ones in a different package.
This also explicitly loads the test files from the testdata directory collocated
with EppTestCase, so that new tests in other packages won't have to duplicate
lots of these same test files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223365398
content-type needs to be parsed (no automatic parsing from String)
data was splitting on commas, meaning --data="key=value1,value2" was sent to the server as "key=value1&value2"
NOTE - you'd expect there to already be a "do nothing splitter", right? But there isn't :/
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223346887
EppResource's lastEppUpdateTime and lastEppUpdateClientId need
to be updated whenever the domain is updated, renewed, deleted or
transfered.
This commit applied the change to the following domain EPP commands:
- Update (already implemented)
- Renew
- Delete
- Restore
- Transfer request
- Transfer approve
- Transfer reject
- Transfer cancel
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223344758
Registrars that are PENDING or SUSPENDED should not have access to
EPP commands that cost money, as in either case it's not likely we'd
actually be able to get payment from said registrar. For this reason
we already prevented access to the domain create flow for non-active
registrars. This commit extends that to other commands that cost
money, including renewals, restores, and transfer requests.
Note that implicit autorenews will still occur for suspended
registrars, as in our point-in-time data model there's no good way
to prevent them. So when a registrar is suspended for non-payment,
the game plan is to get all of their domains transferred out to a
registrar that will pay as soon as possible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223173677
As previously written, it loaded up all history entries into memory and then
processed them. This was OOMing for some registrars on sandbox who had performed
a large number of testing actions, most of them long OT&E was passed.
This commit changes the verify OT&E action to stream the history entries in
batches, ordered by when they were made, and then terminates once all tests have
passed. This prevents OOMing because only a single batch of history entries need
reside in memory at once.
This does necessitate the creation of a new composite Datastore index on
HistoryEntry, so we'll need to run the ResaveAllHistoryEntriesAction in sandbox
after this change is deployed before the new verify OT&E code will work.
Note that the "history viewer" is long dead, but that the pre-existing index
on HistoryEntries is still used for many other purposes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223163337
This allows us to provide the keyring a blob of encrypted data and a key name, and have it decrypt it for us.
Also fixed javadoc length in Keyring.java. It seems like it was using a 80-character length limit.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222995542
These targets are removed in [] as they are not compile-time
dependencies. But they are needed at runtime by GetRoutingMapCommand to load
the specific classes to generate routing map for.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222916432
This makes it possible to request the encrypted data directly in application code. It will be used to download service account credential during "nomulus login".
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222847905
The @JsonPayload qualifier is not used because the field are contrustor injected.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222829281
This commit introduced a new flag to enable SetNumInstancesCommand to
be able to set the number of instances for all non-live versions for
a given service or for all deployed services.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222826003
The console will have 2 different "updatable things":
- only ADMINs (GAE-admins and users in the support G-Suite group) can change the things in the "admin settings" tab (currently just the allowed TLDs)
- only OWNERs can change things from the other tabs: WHOIS info, certificates, whitelisted IPs, contacts etc.
Also, all ADMINs are now OWNERS of "non-REAL" registrars. Meaning - we're only
preventing ADMINs from editing "REAL" registrars (usually in production).
Specifically, OTE registrars on sandbox are NOT "REAL", meaning ADMINS will
still be able to update them.
This only changes the backend (registrar-settings endpoint). As-is, the console
website will still make ADMINs *think* they can change everything, but if they
try - they will get an error.
Changing the frontend will happen in the next CL - because I want to get this
out this release cycle and getting JS reviewed takes a long time :(
TESTED=deployed to alpha, and saw I can't update fields even as admin on REAL
registrars, but could change it on non-REAL registrars. Also checked that I can
update the allowed TLDs on REAL registrars
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222698270
EppConsoleAction still "manually" checks access by going over the
RegistrarContacts. We need it to use AuthenticatedRegistrarAccessor just like
every other part of the registrar console.
We still need to remove the (now unneeded) login EPP sent by the console, but that's left for a followup CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222404208
Forgot to do this when I exported... Will have to do another export after this CL is added.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222296851
This is a temporary measure until we implement access control for Support.
Once we implement access control, we will only block Support from removing TLDs
on production.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222180321
This CL adds two ways to build an docker image with gradle:
1) Adds a :proxy:deployJar task that builds an uber jar that contains all runtime dependencies. The jar can then be add to a docker image by calling docker with the added Dockerfile. The base image for this image can be both distroless java or openjdk:alpine.
2) Uses the Gradle distribution plugin to build a distribution tar file that contains all dependencies (as separate jar files) and a run script that sets up the classpath before calling the main class. Then the docker application plugin can build a docker image (with the dockerBuildImage task) using the application tar file. This only works with openjdk:alpline base image as the distroless java image does not contain a shell and therefore the script created by the distribution plugin cannot be launched.
We may later decide to use one of the method and remove the other.
Also adds an outcast test pattern that caused the tests to be flaky.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222145192
It will make it easier later to have the proxy project depend on it, rather
than on the entire core project
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222081994
1. Updated nebula lint version to 10.3.1
2. Do not apply plugins in the root projects that are not needed.
3. Only do linting when a build is successful, so that build failure message are not flushed by linter warnings.
4. Added explicitly stated java source and target version.
5. Moved source sets set up to the root project so that it applies to all subprojects. Currently there is only "core", but we will add at least "proxy" and "util" later, both of which will use mostly the same source sets (but with additional inclusion rules to only build classes in a specific sub folder in the source tree). By putting the set up closure inside the subprojects block in the root script, it can be reused.
6. Rename maybe_runtime configuration to maybeRuntime, which is consistent with other camelCase configuration names like testCompile.
7. Added a runtime dependency of the JAXB API which is removed from Java SE as of version 11.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222081092
These source sets are not configured correctly (no classpaths for example) and
they subsequently cannot compile. The special tests are put into separate tasks that
run from the same source set (test).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222080273
Add {java,tests}/google/registry/export/datastore to open source.
This is part of the migration to Datastore Managed Import/Export
for backup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221800709
This is surprisingly difficult to fix correctly, so for now, just don't
worry about the content type.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221694745
Tests are divided into three test suites without intra-suite conflicts.
This allows us to unset forkEvery=1 (4x improvement on my desktop) and
increase execution parallelism (additional 2x improvement on my desktop).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221656972
It is starting to be used in more places than just ur/server/registrar. Even now it's used in the RDAP, and we are going to start using it for the registrar-xhr endpoint meaning it will be used in EPP flows as well.
Also logically - this is part of the request authentication.
While moving - we also refactor it to make it easier to use in tests. Instead of mocking, we will be able to create instances with arbitrary roles.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221645055
This makes it simpler to package google.registry.util as a separate project in
Gradle that can be depended upon by the proxy package. Currently the proxy
package depends on both google.registry.util and google.registry.config.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221450085
Currently, OTE creates an invalid address "state", which doesn't pass validation when trying to update it on the console.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221372006
Many registry tools tests modify system properties but do not
restore them to original state. These tests must be isolated
from each other and cannot share the same test execution process.
This has a huge impact on test performance under Gradle, which
seems to have higher process startup overhead. Current Gradle
test config has to set 'forEvery' to 1, i.e., every test class
must be run in a freshly started process.
This change significantly reduces the number of tests that need
isolation, making it easier to optimize test config for the
remaining tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221350284
The old pattern did an implicit iteration over a depset which will be forbidden in the future since it is potentially expensive. The new to_list() call is still expensive but it will be more visible.
LSC: []
Tested:
TAP --sample for global presubmit queue
[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221266626
for a given service and version at runtime.
Note that this CL only supports the adjustment for a given service and version. I will add another functionality to let this command be able to detect all non-live versions automatically and apply the adjustment.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221092001
After this CL, "support" accounts (accounts that are part of the "support" G-Suite group) will the same access to the registrar console as GCP "admins". However, they don't won't have access to the GCP project itself.
We could give them their own Role in the future (say SUPPORT) and give them different access than "admins", but right now we don't need it and YAGNI or something :)
NOTE: we identify users by their email (they need to be logged in to a google account). I don't know if that's best practice, since I guess different google accounts might have the same email address. However, G-Suite groups' membership is by email so there's not much we can do about it if we want to use G-Suite groups.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220804273
Without the net.ltgt.apt plugin, Dagger does not retain generated source code,
and AutoValue mixes generated source code with classes. The new plugin fixes this
problem, making it easier to work with IDEs.
Based on limit experience, Intellij Idea can properly import this project. We
may consider adding IDE-specific plugins in the future.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220802052
Since we're explicitly downloading a version of travis anyway, just run that
and don't bother with creating gradlew which does nothing but download the
same version over again.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220618139
This tab will set the "allowedTlds", but might have other functionality in the
future.
It is based on (branches from) the security-settings tab, because I'm copying the functionality of the "whitelisted IPs" to the "allowed TLDs": they are both lists of "arbitrary" strings that you can remove from and add to.
There are a lot of moving parts in this CL, because of how all the different elements need to interact, and how intertwined they are (for example, we need to disable the admin-settings view for non admins both in the soy and in the JS code)
It's really time to refactor the console given all we've learned... :/
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220373443
This is patched from [] We should have done this when we migrated to
Flogger.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219860046
This is in preparation for having other "command changing things" like
redirecting to file and maybe variable substitutions in the arguments.
"On the way" added a
RUNNING "some_command" "--some_flag" "some_value"
to the output encapsulator so that if we run multiple commands, we know what
command was called where.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219837452
It was failing to send alert emails because the email address it was
constructing did not have permission through GAE to send emails. This switches
it over to using the send from email address already in use elsewhere in the app
that does successfully send emails.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219812019
Enabled unused-dependency check using nebula-lint.
Dependencies that are not used by compile or testing are
labeled with 'maybe_runtime". We leave these dependencies
in the script for easy reference. Before launching Gradle-based
release process we must determine which of these should
be removed and which should be relabeled as runtime.
Label assignment:
- All dependencies recommended for removal from 'compile'
are changed to maybe_runtime
- All dependencies recommended for move from 'compile' to
testCompile are split into two lines, one with testCompile,
the other maybe_runtime
Incidentally, Gradle 4.10.2 needs a groovy upgrade before
it can work with Oracle JDK 11.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219803797