Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Bug - GCS - Signed URL doesn't work in App Engine #862

Closed
saturnism opened this issue Jul 14, 2018 · 3 comments
Closed

Bug - GCS - Signed URL doesn't work in App Engine #862

saturnism opened this issue Jul 14, 2018 · 3 comments
Labels
storage GCP Storage

Comments

@saturnism
Copy link
Contributor

Signed URL seem to work only when a service account was provided.

It doesn't work when:

  • using gcloud Application Default Credential on local machine
  • when deployed in GAE Standard
Signing key was not provided and could not be derived
2018-07-14 21:20:30.285 ERROR [-,f5bce59075bfb85a7bcbbb60799142d1,b217fbcc91bee489,true] 1 --- [Request3FF4E602] o.s.c.s.i.web.ExceptionLoggingFilter     : Uncaught exception thrown

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Signing key was not provided and could not be derived
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866) ~

...

 2018-07-14 21:20:30.288 ERROR [-,,,] 1 --- [Request3FF4E602] o.s.b.w.servlet.support.ErrorPageFilter  : Forwarding to error page from request [/redirect/22ed5fd4-87e4-485d-ab38-0df7e1e58d6d.jpg] due to exception [Signing key was not provided and could not be derived]

java.lang.IllegalStateException: Signing key was not provided and could not be derived
	at com.google.common.base.Preconditions.checkState(Preconditions.java:444) ~[guava-20.0.jar:na]
	at com.google.cloud.storage.StorageImpl.signUrl(StorageImpl.java:509) ~[google-cloud-storage-1.35.0.jar:1.35.0]
	at org.springframework.cloud.gcp.storage.GoogleStorageResource.createSignedUrl(GoogleStorageResource.java:183) ~[spring-cloud-gcp-storage-1.1.0.BUILD-SNAPSHOT.jar:1.1.0.BUILD-SNAPSHOT]
	at com.example.frontend.FrontendController.redirect(FrontendController.java:154) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112-google-v7]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_112-google-v7]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112-google-v7]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112-google-v7]
	at ...
@saturnism
Copy link
Contributor Author

Related bug: googleapis/google-cloud-java#2629

/cc @jabubake

@saturnism saturnism modified the milestone: 1.1.0.M1 Jul 17, 2018
@ChengyuanZhao ChengyuanZhao added the storage GCP Storage label Jul 27, 2018
@meltsufin
Copy link
Contributor

@saturnism I can't repro this problem with gcloud default creds. Is this still an issue for you?

@meltsufin
Copy link
Contributor

Closing because unable to reproduce it. Please re-open if the issue sill occurs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
storage GCP Storage
Development

No branches or pull requests

4 participants
@saturnism @meltsufin @ChengyuanZhao and others