Commit graph

25 commits

Author SHA1 Message Date
Lai Jiang
c7478fc52b
Fix expired access token bug in the proxy (#217)
https://github.com/google/nomulus/pull/129 migrated `GoogleCredential`
to `GoogleCredentialsBundle` and introduced a subtle bug. I don't fully
understand why but there are times when the access token is null but
`credentials.refresh()` is not called, resulting in NullPointerException
when `credentials.getAccessToken().getTokenValue()` is called.

Since the new GoogleCredentials class supports `shouldRefresh()`, we now
just rely on it to make sure that we always get a value access token.
2019-08-08 14:44:33 -04:00
Lai Jiang
4fd32c8b5c
Add a Gradle task to deploy the proxy (#214)
Also refactored some common code regarding the mapping between
environments and projects.

The script to update proxy deployments and kill all pods are lifted from
https://cs.corp.google.com/piper///depot/google3/domain/registry/tools/bashrc?l=163
2019-08-06 11:45:34 -04:00
gbrodman
3488f95990
Clean up Gradle stylings and fix issues IDed in Prober (#212) 2019-08-05 15:54:20 -04:00
Lai Jiang
b878e5acc1
Remove port to protocol map (#200)
There's no need for it. We can get the port from the protocol.
2019-07-25 22:05:12 -04:00
Lai Jiang
8fd5ab2bec
Build proxy image in Gradle (#179) 2019-07-17 20:38:03 -04:00
Lai Jiang
25ee92b5d8
Re-add hello.xml file (#147)
* Re-add hello.xml file

Apparently it was lost during the great refactoring.

* Remove hello.xml from test resources
2019-07-02 17:21:40 -04:00
gbrodman
cf507dad6d
Move test resource files into src/test/resources (#143)
* Move test resource files into src/test/resources

* fix a test

* Remove references to javatests/ in Java files

* fix import order

* fix semantic merge conflict
2019-07-02 16:54:49 -04:00
gbrodman
0e8724a48f
Require the license in Gradle files (#149) 2019-07-02 11:47:35 -04:00
Shicong Huang
6daf72a54e
Replace deprecated GoogleCredential with new auth lib (#129)
Replace deprecated GoogleCredential with new lib

This PR also introduced a CredentialsBundle class to carry
HttpTransport and JsonFactory object which are needed by
most of the GCP library to instantiate client.
2019-07-02 10:29:51 -04:00
Lai Jiang
368c264e3c
Update IAM binding to restrict proxy service account's access to GCS (#125)
Per
https://cloud.google.com/container-registry/docs/access-control#granting_users_and_other_projects_access_to_a_registry,
for a service account to access GCR, it does not need reader access to *all*
buckets in a project, but just the specific one.

This is duped from cl/254092941.
2019-06-21 15:59:01 -04:00
Lai Jiang
520145f641
Move terraform and kubernetes folder to be under proxy (#127)
* Move terraform and kubernetes folder to be under proxy

There is no reason for them to be under proxy/src/... any more now that
we have a Gradle-idiomatic folder structure.
2019-06-20 14:28:32 -04:00
Lai Jiang
c56432ea09 Add tasks used in release as dependencies of the build task
Our CI (Travis & Kokoro) runs "gradle build", so we need to make
sure that all tasks used in the release process are called during
the build so that breakage can be caught earlier.

In order to stage the GAE folder we need gcloud to be present.
Therefore the Travis config is changed to install gcloud.

See: https://gist.github.com/mjackson/5887963e7d8b8fb0615416c510ae8857
2019-06-19 18:46:46 -04:00
gbrodman
e1db339b88
Add Spotless to the Gradle build (#88)
* Add Spotless to the Gradle build

* spotless apply

* one dot instead of two
2019-06-19 16:24:46 -04:00
Weimin Yu
efe33fc66e
Merge pull request #121 from weiminyu/deprecate
Fix or suppress some deprecation warnings
2019-06-19 11:30:02 -04:00
Shicong Huang
0630b371df Upgrade google-auth-library-java to latest version
This is a preparation for replacing the deprecated GoogleCredential
library.
2019-06-18 17:27:21 -04:00
Weimin Yu
e2a44b19ef Fix or suppress some deprecation warnings
Fix or suppress deprecation warnings except those about GoogleCredential,
which is being handled separately.

The @SuppressWarnings("deprecation") annotation does not cover imports
even when it is at the class level. We removed imports of deprecated
classes and use their fully qualified names in class body.
2019-06-18 17:23:45 -04:00
gbrodman
1e8b464c67
Merge branch 'master' into gb/upgradeJCommander 2019-06-13 18:18:55 -04:00
Lai Jiang
8c5fc6410b
Remove Bazel build (#94)
* Remove bazel build

Also updated the build badge to reflect internal build status.
2019-06-13 18:15:33 -04:00
Gus Brodman
f06975df75 Upgrade jcommander dep 2019-06-13 13:04:48 -04:00
Gus Brodman
0a34c5ba36 More moving of hello.xml files -- they're all the same 2019-06-13 11:52:04 -04:00
Gus Brodman
b883f86933 Move hello.xml and don't use project.ext.foo 2019-06-13 10:14:50 -04:00
Gus Brodman
a7a983bfed Refactor to be more in line with a standard Gradle project structure 2019-06-13 09:41:11 -04:00
jianglai
3fc7271145 Move GCP proxy code to the old [] proxy's location
1. Moved code for the GCP proxy to where the [] proxy code used to live.
3. Corrected reference to the GCP proxy location.
4. Misc changes to make ErrorProne and various tools happy.

+diekmann to LGTM terraform whitelist change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213630560
2018-09-20 11:19:36 -04:00
jianglai
5be04f45b2 Do not send SNI headers in the GCP proxy
The server no longer checks it as of []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213278568
2018-09-20 11:19:36 -04:00
mcilwain
a483beef28 Add MOE equivalence for 2018-09-14 sync
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212996616
2018-09-20 11:19:36 -04:00