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 — Java Storage test fails with 403 Forbidden error message. · Issue #3594 · googleapis/google-cloud-java

Java Storage test fails with 403 Forbidden error message. #3594

New issue
Copy link
New issue
Copy link
Closed
#3608
Closed
Java Storage test fails with 403 Forbidden error message.#3594
#3608
Copy link
Assignees
garrettjonesgoogle
Labels
api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@suhasm21
suhasm21
opened on Aug 22, 2018
Issue body actions

URL: https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage

Steps:
1 . cd google-cloud-java/google-cloud-clients/google-cloud-storage
2. Set JSON key file path to GOOGLE_APPLICATION_CREDENTIALS
3. mvn verify

RESULT:

T E S T S

Running com.google.cloud.storage.it.ITStorageTest
caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException:
403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Permission denied on Cloud KMS key. Please ensure that your Cloud Storage service account has been authorized to use this key.",
"reason" : "forbidden"
} ],
"message" : "Permission denied on Cloud KMS key. Please ensure that your Cloud Storage service account has been authorized to use this key."
}

Results :
Failed tests:
ITStorageTest.testGetServiceAccount:1923 expected:<[gcloud-devel]@gs-project-accounts...> but was:<[service-725184503843]@gs-project-accounts...>
Tests in error:
ITStorageTest.testCreateBlobWithDefaultKmsKeyName:276 » Storage Permission den...
ITStorageTest.testCreateBlobWithKmsKeyName:243 » Storage Permission denied on ...
ITStorageTest.testGetBlobKmsKeyNameField:378 » Storage Permission denied on Cl...
ITStorageTest.testListBlobsKmsKeySelectedFields:482 » Storage Permission denie...
ITStorageTest.testRotateFromCustomerEncryptionToKmsKey:987 » Storage Permissio...

Tests run: 76, Failures: 1, Errors: 5, Skipped: 0

Please refer attached doc for command output
JavaStorageFailures.docx

It looks like the test is using some default service account and not using the service account set as part of GOOGLE_APPLICATION_CREDENTIALS

Activity

  1. pongad commented on Aug 22, 2018

    @pongad
    pongad
    on Aug 22, 2018
    Contributor
    More actions

    @frankyn I believe you are the expert on this. Could you take a look? Please let me know if I should bug someone else :)

  2. frankyn commented on Aug 22, 2018

    @frankyn
    frankyn
    on Aug 22, 2018
    Contributor
    More actions

    @suhasm21 getService and CMEK for GCS have hardcoded values here. When you are running tests you'd need to update these values with a GCS managed serviceAccount for the project and two KMS keys. Hardcoded values are too brittle in this case.

    One action item would be to move these hardcoded values that are project dependent to an environment variable so they can be set before being ran.

    There's additional to setup is required to use KMS key with GCS to encrypt/decrypt objects.

  3. suhasm21 commented on Aug 22, 2018

    @suhasm21
    suhasm21
    on Aug 22, 2018
    Author
    More actions

    Thanks for the update. A similar issue was reported in Python Storage system test. It was fixed by making the test to be more generic and use values set in the environment variable (As mentioned in your comment). Would really appreciate if thats done.

  4. frankyn
    self-assigned this
    on Aug 22, 2018
  5. frankyn commented on Aug 22, 2018

    @frankyn
    frankyn
    on Aug 22, 2018
    Contributor
    More actions

    I'll pick up the fix.

  6. JustinBeckwith
    added
    triage meI really want to be triaged.
    on Aug 23, 2018
  7. yihanzhen
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Aug 24, 2018
  8. JustinBeckwith
    removed
    triage meI really want to be triaged.
    on Aug 24, 2018
  9. garrettjonesgoogle
    closed this as completedin #3608on Aug 29, 2018
  10. theacodes
    unassigned
    frankyn
    on Sep 28, 2018
  11. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  12. chingor13
    added 2 commits that reference this issue on Mar 24, 2026

    chore(main): release 2.53.0 (#3594)

    b367c0a

    deps: update dependency com.google.re2j:re2j to v1.8 (#3594)

    d0d84b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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.