-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use gcp-metadata for compute credentials #409
Conversation
Codecov Report
@@ Coverage Diff @@
## master #409 +/- ##
==========================================
- Coverage 94.93% 94.89% -0.04%
==========================================
Files 15 15
Lines 967 960 -7
Branches 224 218 -6
==========================================
- Hits 918 911 -7
Misses 49 49
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ a few nits.
src/auth/computeclient.ts
Outdated
export class Compute extends OAuth2Client { | ||
private serviceAccountEmail: string; | ||
|
||
// Google Compute Engine metadata server token endpoint. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -18,7 +18,7 @@ import assert from 'assert'; | |||
import child_process from 'child_process'; | |||
import crypto from 'crypto'; | |||
import * as fs from 'fs'; | |||
import {BASE_PATH, HEADER_NAME, HOST_ADDRESS} from 'gcp-metadata'; | |||
import {BASE_PATH, HEADERS, HOST_ADDRESS} from 'gcp-metadata'; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
BREAKING CHANGE: The
OAuth2Client
,JWT
, andCompute
classes no longer accept parameters to override the authBaseUrl and tokenUrl. These properties were largely available for testing, but there are better ways to test.Old code
New code