-
Notifications
You must be signed in to change notification settings - Fork 431
Allow GCE credentials to sign blobs #471
Comments
Woo hoo! |
* Now tracks Token Expire times * Adds project_id property in preparation for googleapis#471 PR * Allows usage of custom service accounts from in GCE accordance with the [beta capabilities](https://cloud.google.com/compute/docs/authentication#createcutomserviceaccount) * Now properly knows scopes of the service account
Started work on this master...elibixby:master |
@dhermes @jonparrott So there are several options:
I think (4) is best but I'm not sure how to implement it. To see what I previously had in mind (before I was aware of this awkwardness) check out elibixby#1 |
@elibixby For what it's worth, I'd much prefer this be supported (though understand time/effort is limited). If a choice between 2 vs 3, 3 (as far as I understand) gives developers a bit more testing capability while developing applications (through |
GCS on GCE/GKE is really the key use case here. I'm okay with 3/4 being the approach. Explicit is better than implicit. |
K, I made the implementation a little bit more flexible in the latest commit. elibixby/oauth2client@master...elibixby:iamsigner |
Working on a pre-pre-PR for this here #520 |
Update: Blob signing with the metadata server is coming down the pipe from the metadata server team. An implementation that uses the metadata server will be preferable to one that uses the IAM API for a number of reasons, so I'm going to hold off implementing this until after this feature is available. |
With the understand that GCE/GKE is the key use case, does using the metadata route block the ability to use this outside GCP, like on developer boxes? Simply curious :) |
No, outside of GCP you'll have the private key and can sign blobs with that directly. |
Ah, yes I forget to clarify (as in #471 (comment)) that having the private key is less than favorable locally, but that's understandable. Thanks for the info |
Moving to googleapis/google-auth-library-python#92 |
The IAM API which is now in Beta has a signBlob method which signs a blob on behalf of a service account for an authorized users. This should allow GCE credentials to act like fully fledged service accounts by signing blobs with this API call after acquiring an access token from the metadata server. This would only work on GCE instances that have the cloud-platform or iam scopes, but it would still be quite nice as it would allow application_default_credentials to almost always have the capacity to sign blobs.
@jonparrott
The text was updated successfully, but these errors were encountered: