-
Notifications
You must be signed in to change notification settings - Fork 18
create property for specifying google-compute project id #7
Comments
I understand the underlying objective behind this issue, but currently the option to specify an alternate project_id would never be used (there is no case that I know of where a project's identity can be used on another project). |
This issue is low priority while service account authentication is the only Fwiw, service accounts are absolutely in the same ballpark as what you can |
gce service accounts are currently basically aliases, i.e. alternative credentials to the same project, AFAIK IAM does much more than that. |
Not sure if you've used IAM much. I have. You can create a federated On Sunday, March 10, 2013, David Ribeiro Alves wrote:
|
Anyway if you don't yet understand or see the value, just leave this issue On Sunday, March 10, 2013, Adrian Cole wrote:
|
I have only limited experience from IAM, but what I was trying to say is that while IAM allows cross-account API access with possibly different permissions, google for the moment allows to create multiple identities for the same account which are all the same permissions-wise. That being said there is a situation where the current implementation would fail as I've just noticed that service accounts beyond the first one have an additional key in front of the project id (e.g. my_id-2nsqe58q5ci79v4r7derqfitk543qah1@developer.gserviceaccount.com). This requires additional parsing but still doesn't require to allow to specify a project id. Now If I'm wrong and if there is of a case where an identity would be able to authenticate to a different project and/or a case where it would not be possible to infer the project id from the identity then +1. |
didn't see your response until I posted mine. I'll leave it to you... |
Cool. Like I said, this change isn't highest priority, but I'll be sure to On Sunday, March 10, 2013, David Ribeiro Alves wrote:
|
Notes for future implementer of this issue: Similar to keystone, there are multiple ways to authenticate against gce. Some of which, you can parse the project number from another piece of auth data. Here are the three ways: Access Token As long as we only support service account and service account remains limited to a single project, we can use the current code as is. At any point where we support other flows or service account becomes not pinned to a single project, this issue needs to be implemented. For context, every API that has multiple authentication means has resulted in us implementing multiple authentication means so far. For example, keystone, amazon, and cloudstack all expose optional means to choose a non-default authentication system. If one ever uses something besides the service account flow, gce will need this change. I know this as I've asked google if there is a way to query for ones project number last week and they replied no. In short, while we restrict users to service account flow and service account flows are 1-1 with project number, this issue can stay dormant. If anything changes though, this issue will help whoever that is know exactly what is needed to accommodate specification of a project id without asking me :) |
While parsing project id from the service account in
GoogleComputeRestClientModule.supplyProject
is helpful to avoid excess configuration, we've learned in keystone that project identifiers are things that should be allowed independently.You can refer to how keystone specifies and reads tenant id optionally from a property.
actions to take:
org.jclouds.googlecompute.config.GoogleComputeProperties.PROJECT_ID
asjclouds.google-compute.project-id
GoogleComputeRestClientModule.supplyProject
to use a function class instead of an anonymous one.supplyProject(@org.jclouds.location.Provider final Supplier<Credentials> creds, ReadProjectIdFromPropertyOrParseEmail fn)
ReadProjectIdFromPropertyOrParseEmail
, make an@Inject(optional=true) @Named(GoogleComputeProperties.PROJECT_ID)
setter. On apply, read this, falling back to the old implementation in `supplyProject.BaseGoogleComputeApiLiveTest
and the pom.xml to optionally readjclouds.google-compute.project-id
during test runs.cc @mattstep @dralves
The text was updated successfully, but these errors were encountered: