Uh oh!
There was an error while loading. Please reload this page.
Making it possible to run integration tests against any Firebase project - #22
Conversation
bojeil-google
left a comment
There was a problem hiding this comment.
Looks good. Just a couple of minor stuff.
| } | ||
| var apiKey = process.argv[2]; | ||
| if (apiKey == undefined) { |
There was a problem hiding this comment.
typeof apiKey === 'undefined'
| return serviceAccount.project_id; | ||
| } | ||
| function getApiKey() { |
There was a problem hiding this comment.
nit: add javadoc for this function like you did for the ones above.
jshcrowthe
left a comment
There was a problem hiding this comment.
Changes seem pretty straightforward. I'd address @bojeil-google's comments then this LGTM.
On a side note, with the hardcoded API key here being removed, is there any concern over that project being discovered and used maliciously?
bojeil-google
left a comment
There was a problem hiding this comment.
They would need to get hold of the service account credentials which are not exposed here and can only be obtained via the Firebase Console.
hiranya911
commented
May 11, 2017
Thanks for the reviews. I've made the suggested changes. As @bojeil-google mentioned, it seems there's no risk in exposing the API key. See http://stackoverflow.com/questions/37482366/is-it-safe-to-expose-firebase-apikey-to-the-public for more details. |
* Implement the App Check API
* Refactor CryptoSigner (#21) * Refactor Crypto Signer * Introduce new CryptoSignerError type * reorder imports * PR fixes * PR clean up * feat(fac): Implement the App Check API (#22) * Implement the App Check API * Add AppCheck public API (#23) * Add AppCheck public API * Add AppCheck public api unit tests * Add FAC Verify Token API (#26) * (feat): Add FAC Verify token API - Re-try with all the keys when kid is not present in the token header. - Add JWKS key fetcher - Add public API for FAC verify token * Add ref docs and unit tests * PR fixes * Update api extractor report * Add more tests for token-verifier * export jwks key pairs * PR fixes * More PR fixes * Update src/app-check/index.ts Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com> Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com> * Add App ID Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com>
* Refactor CryptoSigner (#21) * Refactor Crypto Signer * Introduce new CryptoSignerError type * reorder imports * PR fixes * PR clean up * feat(fac): Implement the App Check API (#22) * Implement the App Check API * Add AppCheck public API (#23) * Add AppCheck public API * Add AppCheck public api unit tests * Add FAC Verify Token API (#26) * (feat): Add FAC Verify token API - Re-try with all the keys when kid is not present in the token header. - Add JWKS key fetcher - Add public API for FAC verify token * Add ref docs and unit tests * PR fixes * Update api extractor report * Add more tests for token-verifier * export jwks key pairs * PR fixes * More PR fixes * Update src/app-check/index.ts Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com> Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com> * Add App ID Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com>
Currently integration tests are run against a specific Firebase project (admin-sdks-integration). This enables running integration tests against any Firebase project. This will allow external developers to run the test suite against their own projects/credentials.
See issue: #21