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

How to access GCS bucket from another project? #1073

Closed
the1plummie opened this issue Jun 23, 2016 · 2 comments
Closed

How to access GCS bucket from another project? #1073

the1plummie opened this issue Jun 23, 2016 · 2 comments
Assignees

Comments

@the1plummie
Copy link

So I have files in a bucket BK1 created in gcloud project A, and I have appengine service running in project B. How do I configure BK1 bucket (or object) permissions so B's appengine service can access those files?

My sample code looks like this

        Storage storage = StorageOptions.defaultInstance().service();
        String filename = "foo.json";
        Blob blob = storage.get(BlobId.of("BK1", filename));
        if (blob == null) {
            return null;
        }
        System.out.println("blob content: " + new String(blob.content()));

I'm getting "login required" error.

I tried adding app engine default service account to BK1's permission, still not working either.
Any pointer would be appreciated.
Thx!

@mziccard
Copy link
Contributor

Hi @the1plummie,

which version of gcloud-java are you using? We have seen this "login required" issue before (see here). This should be fixed in 0.2.3 now.

Also remember that to get blob content/metadata the app engine service account must also have (at least) READER permission to the blob itself.

@the1plummie
Copy link
Author

Good point. I was using version 0.2.0. Confirmed it's fixed in 0.2.3. Thanks! 👍

github-actions bot pushed a commit that referenced this issue Sep 15, 2022
…#1073)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.8.10` -> `2.8.11` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.11/compatibility-slim/2.8.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.11/confidence-slim/2.8.10)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-core</summary>

### [`v2.8.11`](https://togithub.com/googleapis/java-core/blob/HEAD/CHANGELOG.md#&#8203;2811-httpsgithubcomgoogleapisjava-corecomparev2810v2811-2022-09-08)

[Compare Source](https://togithub.com/googleapis/java-core/compare/v2.8.10...v2.8.11)

##### Dependencies

-   Update dependency com.google.auth:google-auth-library-bom to v1.11.0 ([#&#8203;911](https://togithub.com/googleapis/java-core/issues/911)) ([4656905](https://togithub.com/googleapis/java-core/commit/4656905956504e4bc4fe224d1f8cd70bbab614d8))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-translate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTQuMiIsInVwZGF0ZWRJblZlciI6IjMyLjE5NC4yIn0=-->
github-actions bot pushed a commit that referenced this issue Sep 19, 2022
🤖 I have created a release *beep* *boop*
---


## [2.3.4](googleapis/java-translate@v2.3.3...v2.3.4) (2022-09-15)


### Dependencies

* Update dependency com.google.cloud:google-cloud-core to v2.8.10 ([#1069](googleapis/java-translate#1069)) ([2bee3ba](googleapis/java-translate@2bee3ba))
* Update dependency com.google.cloud:google-cloud-core to v2.8.11 ([#1073](googleapis/java-translate#1073)) ([8a869f6](googleapis/java-translate@8a869f6))
* Update dependency com.google.cloud:google-cloud-core to v2.8.9 ([#1066](googleapis/java-translate#1066)) ([69d391c](googleapis/java-translate@69d391c))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1074](googleapis/java-translate#1074)) ([c8bfd65](googleapis/java-translate@c8bfd65))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1077](googleapis/java-translate#1077)) ([aa9ef02](googleapis/java-translate@aa9ef02))
* Update dependency com.google.cloud:google-cloud-storage to v2.11.3 ([#1060](googleapis/java-translate#1060)) ([4d9a7ad](googleapis/java-translate@4d9a7ad))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this issue Feb 1, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.grpc:grpc-bom](https://togithub.com/grpc/grpc-java) | `1.51.1` -> `1.52.1` | [![age](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/compatibility-slim/1.51.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/confidence-slim/1.51.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>grpc/grpc-java</summary>

### [`v1.52.1`](https://togithub.com/grpc/grpc-java/releases/tag/v1.52.1)

[Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.52.0...v1.52.1)

##### Bug Fixes

-   xds: Fix an internal bug in xds resource subscription that might cause xds stream not accepting response update for that resource type entirely. ([#&#8203;9810](https://togithub.com/grpc/grpc-java/issues/9810))

### [`v1.52.0`](https://togithub.com/grpc/grpc-java/releases/tag/v1.52.0)

[Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.51.3...v1.52.0)

#### gRPC Java 1.52.0 Release Notes

**grpc-xds starting with 1.51.0 had a regression where resources might stop receiving updates. The trigger could happen hours or days after the binary had started. xDS users should avoid this release and use 1.50.x until patch releases with the fix are available. [https://togithub.com/grpc/grpc-java/pull/9809](https://togithub.com/grpc/grpc-java/pull/9809)**

##### API Changes

-   Fix CallOptions to be properly `@Immutable` ([#&#8203;9689](https://togithub.com/grpc/grpc-java/issues/9689))
-   binder: Promote out of experimental status ([#&#8203;9669](https://togithub.com/grpc/grpc-java/issues/9669)). Much of the API is now stable

##### New Features

-   xds: Support localities in multiple priorities ([#&#8203;9683](https://togithub.com/grpc/grpc-java/issues/9683))
-   xds: Log xDS node ID with verbosity INFO when environment variable GRPC_LOG_XDS_NODE_ID=true ([#&#8203;9731](https://togithub.com/grpc/grpc-java/issues/9731))

##### Examples

-   Add examples for name resolver and load balancer ([#&#8203;9700](https://togithub.com/grpc/grpc-java/issues/9700))
-   Swap to ChannelCredentials/ServerCredentials API, as it is preferred

##### Bug Fixes

-   xds:Fix ConcurrentModificationException in PriorityLoadBalancer ([#&#8203;9728](https://togithub.com/grpc/grpc-java/issues/9728))
-   ManagedChannelImpl.SubchannelImpl fix args check to avoid NPE ([#&#8203;9651](https://togithub.com/grpc/grpc-java/issues/9651))
-   okhttp: Add missing server support for TLS ClientAuth ([#&#8203;9711](https://togithub.com/grpc/grpc-java/issues/9711))
-   binder: Ensure the security interceptor is always closest to the actual transport ([#&#8203;9716](https://togithub.com/grpc/grpc-java/issues/9716))
-   bazel: Include [@&#8203;Generated](https://togithub.com/Generated) dep for autovalue. This fixes builds of xds and rls using Java 9+
-   xds: Nack xds response when weighted cluster total weight sums zero  ([#&#8203;9738](https://togithub.com/grpc/grpc-java/issues/9738))
-   core: Fix a bug about a retriable stream lifecycle. It stops using the call executor resource in a retriable stream when the client call is closed, thus preventing potential channel panics. ([#&#8203;9626](https://togithub.com/grpc/grpc-java/issues/9626))

##### Behavior Changes

-   binder: Set default idle timeout to 60 seconds, and enable "strict lifecycle management". ([#&#8203;9486](https://togithub.com/grpc/grpc-java/issues/9486))
-   xds: Limit ring hash max size to 4K instead of 8M ([#&#8203;9709](https://togithub.com/grpc/grpc-java/issues/9709)). `RingHashOptions.setRingSizeCap()` can increase the limit
-   binder: Set default idle timeout to 60 seconds, and add `BinderChannelBuilder.strictLifecycleManagement()` which disables idle timeout and prevents it from being changed ([#&#8203;9486](https://togithub.com/grpc/grpc-java/issues/9486)). Disabling idle timeout can be useful to find bugs in applications that fail to promptly shut down the channel and are particularly sensitive to keeping Binder instances alive.
-   bazel: Replace ctx.host_configuration.host_path_separator with ctx.configuration.host_path_separator ([#&#8203;9742](https://togithub.com/grpc/grpc-java/issues/9742)). This changes no behavior today, but improves future compatibility with newer versions of Bazel
-   xds: Refactor internal logics about LDS and CDS resource handling. It may cause minor log line changes about corresponding RDS and EDS subscriber event notification, but it should not change xds name resolution and LB behavior. ([#&#8203;9724](https://togithub.com/grpc/grpc-java/issues/9724))

##### Dependencies

##### Acknowledgement

[@&#8203;RapperCL](https://togithub.com/RapperCL)
[@&#8203;Smityz](https://togithub.com/Smityz)
[@&#8203;pandaapo](https://togithub.com/pandaapo)

### [`v1.51.3`](https://togithub.com/grpc/grpc-java/releases/tag/v1.51.3)

[Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.51.1...v1.51.3)

##### Bug Fixes

-   xds: Fix an internal bug in xds resource subscription that might cause xds stream not accepting response update for that resource type entirely. ([https://togithub.com/grpc/grpc-java/pull/9811](https://togithub.com/grpc/grpc-java/pull/9811))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC43My4zIiwidXBkYXRlZEluVmVyIjoiMzQuOTcuNiJ9-->
suztomo pushed a commit that referenced this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants