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

internal/resource: fix gs:// fetches in GCE without a service account #1363

Merged
merged 1 commit into from
May 10, 2022
Merged

Commits on May 9, 2022

  1. internal/resource: fix gs:// fetches in GCE without a service account

    When running in GCE, we assumed that we should always perform
    authenticated GS fetches.  However, these can fail if the VM is not
    associated with a service account, even if the object being fetched is
    publicly readable:
    
        error while reading content from ...: metadata: GCE metadata "instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.read_only" not defined
    
    Query the VM's service account scopes first, and if that query fails
    (presumably because there is no service account), fall back to anonymous
    access.
    bgilbert committed May 9, 2022
    Configuration menu
    Copy the full SHA
    2febcab View commit details
    Browse the repository at this point in the history