Assigned
Status Update
Comments
pu...@google.com <pu...@google.com>
nr...@google.com <nr...@google.com> #2
Hello,
Thank you for reaching out to us with your request.
We have duly noted your feedback and will thoroughly validate it. While we cannot provide an estimated time of implementation or guarantee the fulfillment of the issue, please be assured that your input is highly valued. Your feedback enables us to enhance our products and services.
We appreciate your continued trust and support in improving our Google Cloud Platform products. In case you want to report a new issue, please do not hesitate to create a new issue on the
Once again, we sincerely appreciate your valuable feedback; Thank you for your understanding and collaboration.
Description
Motivation
I want to be able to test a pubsub push subscription locally. In order to fully test this, I need to test the JWT verification as well.
Currently, when using the emulator, there is no
Authorization
header sent with the push request to my backend. This is despite settingoidcToken
in thepushConfig
(node client lib). I would expect to either receive an error somewhere, or receive anAuthorization
header. This is also not documented anywhere, unless I've missed it.Full use-case
I have front-end functionality to upload a file from frontend. I am sending a Cloud Storage signed upload URL from the backend to the frontend. The URL is baked with relevant metadata for the file to be uploaded. When the upload is complete, Cloud Storage will send a notification to a Pub/Sub topic, which has a Push subscription set up to my backend. Once the message hits my backend, the JWT token is validated to make sure this is really from Pub/Sub, and the upload is registered in my DB with the aforementioned metadata.
Went testing this locally, I use a pull subscription to replay the message through a locally running Pub/Sub Emulator. Everything works, except for the missing Authentication header. This means I cannot know if the token is being validated correctly unless I deploy the application and test it live.
Implementation
When setting the
oidcToken
property, it's implied that you want a token to be sent with the push request. A token should be able to be generated from the local application-default credentials, as I understand it.Here is an example of a configuration, that I think should warrant sending an
Authorization
header with the request: