Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceAccounts.Keys.Create return nil and error 404 just after create #234

Closed
sebglon opened this issue Oct 13, 2017 · 3 comments
Closed
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@sebglon
Copy link

sebglon commented Oct 13, 2017

A few time ago, when i use service clientIAM.Projects.ServiceAccounts.Keys.Create
it return serviceAccountKey = nil and error = nil...

When i have this error, i create one on google console and have an error.
Is it possible to have an operation object or solve async task?

Because create finish in 200 but if you make get just after we have 404 with the generated key name.
If i wait 10 sec under create and get, i have get 200.

@jpharaoh-google
Copy link

I have been assisting the user who raised this issue in my role for Google Cloud Platform Support. The issue is that the API call to create a service account key does not return the public key, and the call to get the key, which does include it, does not succeed until some time after the key is created.

One solution I have suggested is to poll the API call to get the key periodically until the public key is returned.

I also note that the public key itself is technically contained in the response to the "create key" call, since it can be extracted from the private key. This is, however, unsigned, whereas the "get key" call eventually returns a certificate, ie a signed copy of the public key.

I don't believe this is an issue in this API client, since it maps directly to the public API. I do believe the API could provide a solution to this rather than polling, and will suggest this as a potential feature.

Since this actually relates to the API, rather than the API client, I believe this issue should be closed. An appropriate place to suggest a change to the API itself would be the Google Cloud Platform IAM idea forum:

https://googlecloudplatform.uservoice.com/forums/580999-cloud-identity-access-management-iam

sebglon pushed a commit to sebglon/terraform-provider-google that referenced this issue Oct 16, 2017
@jba
Copy link
Contributor

jba commented Oct 16, 2017

Since this actually relates to the API, rather than the API client, I believe this issue should be closed.

Agreed.

@jba jba closed this as completed Oct 16, 2017
@aeneasr
Copy link

aeneasr commented Oct 22, 2017

Has this been reported to the GCP IAM Team or has this issue simply been closed without follow up?

danawillow pushed a commit to hashicorp/terraform-provider-google that referenced this issue Oct 25, 2017
* Initial support for google service account keys

* Add vendor for vault and encryption

* Add change for PR comment

* Add doc and improvement fo public key management

* adding waiter for compatibility with issue googleapis/google-api-go-client#234

* improvement

* Add test with pgp_key

* Perform doc anf format

* remove test if public_key exists

* Add link on doc

* correct pr
chrisst pushed a commit to chrisst/magic-modules that referenced this issue Oct 26, 2018
* Initial support for google service account keys

* Add vendor for vault and encryption

* Add change for PR comment

* Add doc and improvement fo public key management

* adding waiter for compatibility with issue googleapis/google-api-go-client#234

* improvement

* Add test with pgp_key

* Perform doc anf format

* remove test if public_key exists

* Add link on doc

* correct pr
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants