You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to use ApplicationDefaultCredentials for SignUrlOption? #701
Currently Storage.SignUrlOption receives com.google.gcloud.AuthCredentials.ServiceAccountAuthCredentials, but how to use ApplicationDefaultAuthCredentials with that method? I think we should allow using ApplicationDefaultAuthCredentials if possible.
Indeed as of now you can only explicitly set com.google.gcloud.AuthCredentials.ServiceAccountAuthCredentials.
However if you don't specify it signUrl may still work based on your service auth config (if it is configured with AuthCredentials.ServiceAccountAuthCredentials or using ApplicationDefaultAuthCredentials AND the default auth config is associated with a service account.
ApplicationDefaultAuthCredentials is not required to be associated with a service account (and provide private-key).
Ok, thanks! I didn't know that you can not use the GCE service account for signing URL. However, isn't it appropriate for that method to receive an interface? Especially if there is a possibility that GCE service account can be used for signing in the future (I'm not sure though).
Yes, we could do something similar to gcloud-python and accept AuthCredentials instead of the specific ServiceAccountAuthCredentials but similar to the Python API this class does not expose
in its API a service-account or private key.
We could still get it and then reject any instances that are not known to us to support the signing.
I don't like that such enforcement is a run-time failure but maybe that is not too bad as a runtime
failure is already possible when not providing anything.
Also, I don't like that this way a user could not implement its own AuthCrendentials to work
with the signing as the signature does not specify it.
We could define a Signing interface and make some of our AuthCrendentials credentials implement it.
I am +1 for it. Is that what you are suggesting?
@ajkannan is it something that you will be interested in and have time for it?
For the record the proposed change will allow us to support signing on App Engine (and we plan to do so). However, it is still not supported via the default compute engine credentials.
Activity
tmatsuo commentedon Mar 2, 2016
I think there should be an interface for Credentials and use it as the argument, just my 2 cents
aozarov commentedon Mar 2, 2016
Indeed as of now you can only explicitly set
com.google.gcloud.AuthCredentials.ServiceAccountAuthCredentials.However if you don't specify it
signUrlmay still work based on your service auth config (if it is configured withAuthCredentials.ServiceAccountAuthCredentialsor usingApplicationDefaultAuthCredentialsAND the default auth config is associated with a service account.ApplicationDefaultAuthCredentialsis not required to be associated with a service account (and provide private-key).tmatsuo commentedon Mar 2, 2016
Ok, thanks! I didn't know that you can not use the GCE service account for signing URL. However, isn't it appropriate for that method to receive an interface? Especially if there is a possibility that GCE service account can be used for signing in the future (I'm not sure though).
Related:
http://googlecloudplatform.github.io/gcloud-python/stable/storage-blobs.html#gcloud.storage.blob.Blob.generate_signed_url
googleapis/google-cloud-python#922
aozarov commentedon Mar 3, 2016
Yes, we could do something similar to
gcloud-pythonand acceptAuthCredentialsinstead of the specificServiceAccountAuthCredentialsbut similar to the Python API this class does not exposein its API a service-account or private key.
We could still get it and then reject any instances that are not known to us to support the signing.
I don't like that such enforcement is a run-time failure but maybe that is not too bad as a runtime
failure is already possible when not providing anything.
Also, I don't like that this way a user could not implement its own AuthCrendentials to work
with the signing as the signature does not specify it.
We could define a Signing interface and make some of our AuthCrendentials credentials implement it.
I am +1 for it. Is that what you are suggesting?
@ajkannan is it something that you will be interested in and have time for it?
tmatsuo commentedon Mar 3, 2016
@aozarov Yeah, that seems a right approach!
ajkannan commentedon Mar 3, 2016
Sure, I can take this issue.
aozarov commentedon Mar 10, 2016
For the record the proposed change will allow us to support signing on App Engine (and we plan to do so). However, it is still not supported via the default compute engine credentials.
mziccard commentedon Apr 6, 2016
Fixed with #854
17 remaining items
chore(main): release 0.123.16 (#712)
chore(main): release 0.9.5 (#720)
chore(main): release 2.6.5 (#712)
deps: update dependency com.google.errorprone:error_prone_annotations…
chore(main): release 2.0.0 (#739)
deps: update dependency com.google.errorprone:error_prone_core to v2.…
chore(main): release 2.3.1 (#703)
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
deps: update dependency com.google.cloud:google-cloud-core to v1.95.1 (…
chore: release 1.113.2 (#702)
deps: update dependency com.google.cloud:google-cloud-core to v1.95.1 (…
chore: release 1.113.2 (#702)
chore: release 1.22.0 (googleapis#701)