GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Signed URL does not respect host protocol when specified in StorageOptions · Issue #2870 · googleapis/java-storage

This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Signed URL does not respect host protocol when specified in StorageOptions #2870

Copy link
Copy link
Closed
#2871
#2880
Closed
Signed URL does not respect host protocol when specified in StorageOptions#2870
#2871
#2880
Copy link
Labels
api: storageIssues related to the googleapis/java-storage API.

Description

@Ragge-dev
Ragge-dev
opened on Jan 9, 2025
Issue body actions

Hello!
I am having a very similar issue as in #1094, however it is just the protocol of the host which is not respected. In the example below I specify "http://example.com" but the signed url is towards "https://example.com". I don't know enough about this topic to know if https is required, for local development we are using http so I have to replace the protocol when signing urls locally towards a fake gcs server https://github.com/fsouza/fake-gcs-server. Let me know!

Environment details

  • Running on Ubuntu 24.04.1 LTS
  • Java version 21
  • com.google.cloud:libraries-bom, version = "26.52.0"

Code example

Storage storage = StorageOptions.getDefaultInstance().toBuilder().setHost("http://example.com/").build().getService();
BlobInfo blobInfo = BlobInfo.newBuilder(BlobId.of("bucket", "object")).build()
URL signedUrl =  storage.signUrl(
                                          blobInfo,
                                          1,
                                          TimeUnit.HOURS,
                                          SignUrlOption.signWith(credentials),
                                          SignUrlOption.withV4Signature());

Produces a signed url which starts with:
https://example.com/bucket/object?X-Goog-Algorithm=...

Thanks!

Activity

  1. product-auto-label
    added
    api: storageIssues related to the googleapis/java-storage API.
    on Jan 9, 2025
  2. BenWhitehead
    added a commit that references this issue on Jan 13, 2025

    fix: update Signed URL default scheme to resolve from storage options…

    This issue will close once commit 063ed81 is merged into the 'main' branch.
    063ed81
  3. BenWhitehead
    closed this as completedin #2880on Jan 14, 2025
  4. BenWhitehead
    closed this as completedin 7ae7e39on Jan 14, 2025
  5. renovate-bot
    added a commit that references this issue on Jan 14, 2025

    fix: update Signed URL default scheme to resolve from storage options…

    This issue will close once commit 7ae7e39 is merged into the 'main' branch.
    7ae7e39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storageIssues related to the googleapis/java-storage API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.