-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Storage.signUrl() fails with default credentials in java8 standard runtime #2629
Comments
@neozwu Do you have context around this? It looks like the relevant auth library code was last updated in these PRs: |
@phimar For GAE java 8 standard, metadata server is used to retreive credentials. The current implementation for |
No, but its a very important thing to fix. |
Thank you for your comments and the linkage to the issue on google/google-auth-library-java. |
I can successfully sign urls with the default storage options (on Java8 GAE Standard) using google-cloud 0.20.3-alpha. When I upgrade to 0.32.0-alpha I see this error. I've reverted to the old version. |
Same issue is present in flexible runtime too? |
@vchudnov-g FYI |
@frankyn FYI |
It seems #2504 can also be solved by this. |
should be solved by googleapis/google-auth-library-java#150 |
doesn't look like it's resolved. |
@jadekler @garrettjonesgoogle @ludoch : has anybody diagnosed what the issue is ? It seems like |
cc @chingor13, who dealt with the linked CL |
nothing magical here, the version hasn't been bumped to the new version of the related library current master: |
(the linked PR has been released in https://github.com/google/google-auth-library-java/releases/tag/v0.10.0) |
@pongad Let's bump auth to 0.10.0 for the next release |
Yes this issue present in flexible runtime too, and locally when running through the appengine maven plugin.
|
google.auth.version has been bumped. Please update the library to the latest version (1.38.0) and see if the problem is resolved. |
I had the same problem (using Using AppEngine standard, I solved like this:
|
It would seem that this method documentation no longer applies to GCE, right? Based on the above PRs and commentary, when running on GCE with Wondering if anything else has to be done as we are still having trouble (different error message, getting a little farther in the code as far as execution) and not sure why things fail when running on GCE using ADC vs. when we provide the key file directly via thanks y'all for the support. |
The ComputeEngineCredentials signing method requires 2 things:
@NicolaSpreafico try updating the @noahdietz ADC prefers the key file provided by Created googleapis/google-auth-library-java#175 for documentation and will open a new issue for docs here as well. |
@chingor13 fixed! we had set all of the scopes and IAM policies we thought were necessary (devstorage.full_control & bucket objectAdmin). Didn't work. Turns out we needed to use the Thanks for the help. |
Greetings folks! It looks like this issue has been resolved. If you're still running into problems... let us know! |
I needed to grant |
Invocation:
Stacktrace:
I tracked the problem down to the
com.google.auth.oauth2.GoogleCredentials.getDefaultCredentialsUnsynchronized()
(https://github.com/google/google-auth-library-java/blob/51a5445b33d10f252cadfdcca82dd9e68512e483/oauth2_http/java/com/google/auth/oauth2/DefaultCredentialsProvider.java#L182) where it skips overtryGetAppEngineCredential()
to return an instance ofcom.google.auth.oauth2.AppengineCredentials
which is one of the implementations ofServiceAccountSigner
required by thesignUrl
call with default credentials.This may also affect other services assuming an instance of
com.google.auth.oauth2.AppengineCredentials
.Is there any specific reason why to check for java7 only?
Background: We moved to the java8 runtime on GAE and upgraded our api clients to the google-cloud-java api clients version 1.10.0.
The text was updated successfully, but these errors were encountered: