GoogleCloudPlatform / appengine-gcs-client

App Engine-Cloud Storage custom client library
Apache License 2.0
124 stars 112 forks source link

Allow for local credentials #43

Closed nickretallack closed 7 years ago

nickretallack commented 8 years ago

The existing workflow for using remote GCS in dev is not so good. You have to manually acquire a token every hour and somehow get it into the code in a way that doesn't affect production deployments.

With this change, passing credentials to dev_appserver.py on the commandline will cause it to use the remote GCS API automatically.

Try it like this:

dev_appserver.py app.yaml
  --appidentity_email_address=CLIENT_EMAIL \
  --appidentity_private_key_path=KEY_PATH \
  --default_gcs_bucket_name=BUCKET_NAME

app_identity.get_service_account_name() evaluates to emptystring unless you passed the appidentity flags. Note that the file you must pass as the private key has to be in PKCS#1 format for app engine to accept it.

googlebot commented 8 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


nickretallack commented 8 years ago

I signed it!

BrandonY commented 8 years ago

Hi Nick,

Thanks for the contribution! Always happy to see pull requests from new people.

I don't see your GitHub name or email address in the CLA registry. Can you make sure that you've signed it?

nickretallack commented 8 years ago

I am a google employee. I verified my email address on github but it doesn't seem to notice. On Fri, Aug 12, 2016 at 12:30 PM BrandonY notifications@github.com wrote:

Hi Nick,

Thanks for the contribution! Always happy to see pull requests from new people.

I don't see your GitHub name or email address in the CLA registry. Can you make sure that you've signed it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/appengine-gcs-client/pull/43#issuecomment-239524530, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAz6zUJv1RBr2OcTTmgDpjflxLASNIAks5qfLvDgaJpZM4JgrBb .

nickretallack commented 8 years ago

Well I mean, technically I'm a contractor, but I still have a google email address. On Fri, Aug 12, 2016 at 12:31 PM Nicholas Retallack nickretallack@gmail.com wrote:

I am a google employee. I verified my email address on github but it doesn't seem to notice. On Fri, Aug 12, 2016 at 12:30 PM BrandonY notifications@github.com wrote:

Hi Nick,

Thanks for the contribution! Always happy to see pull requests from new people.

I don't see your GitHub name or email address in the CLA registry. Can you make sure that you've signed it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/appengine-gcs-client/pull/43#issuecomment-239524530, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAz6zUJv1RBr2OcTTmgDpjflxLASNIAks5qfLvDgaJpZM4JgrBb .

BrandonY commented 8 years ago

Hey Nick,

If you could address the note above, I'm still happy to bring in your change.

nickretallack commented 8 years ago

Ok, I updated the comment.