-
Notifications
You must be signed in to change notification settings - Fork 369
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
feat: hmac service account #751
Conversation
Codecov Report
@@ Coverage Diff @@
## master #751 +/- ##
==========================================
- Coverage 95.05% 94.59% -0.46%
==========================================
Files 10 11 +1
Lines 1152 1202 +50
Branches 288 296 +8
==========================================
+ Hits 1095 1137 +42
- Misses 29 37 +8
Partials 28 28
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.
this is looking pretty lovely to me, on a quick read.
looking fairly good to me, once tests are passing 😄 |
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.
Overall, looks good. I have two nit questions.
* Note: this does not fetch the HMAC key's metadata. Use HmacKey#get() to | ||
* retrieve and populate the metadata. | ||
* | ||
* @param {string} accessId The HMAC key's access ID. |
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.
@jkwlui could you add an optional parameter for projectId? This would help in the case the user doesn't want to use the project defined by credentials or GOOGLE_CLOUD_PROJECT.
LGTM, thanks @jkwlui! |
@jkwlui a new linty error has appeared, seemingly after I updated this PR to use the new common:
|
* npm run fix * test: add second service account email for testing multiple SAs HMAC keys * npm run fix * test: add second service account email for testing multiple SAs HMAC keys * fix tests * use HMAC_PROJECT in env variable
* update HMAC samples to not require creds, and add projectId * setup second system test service account * fix sample tests * fix sample metadata for hmac keys * reorder hmackey argument * run synthtool * put projectId at the end so its optional * synthtool * fix cleanup after test * log service account used * fixy * fix(tests): create needs projectId * npm run fix * use gimmeproj instead of gimme-acc * fix hmacKeyGet * fix system-test * fix check active * fix HMAC_PROJECT in system-test * properly unlease all service accounts * fix unleasing
…into hmac-sa-admin
The tests are blocked by #818 |
Added the following
Storage
client methods:HmacKey class and methods: