[
https://issues.apache.org/jira/browse/BEAM-895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15634905#comment-15634905
]
ASF GitHub Bot commented on BEAM-895:
-------------------------------------
GitHub user peihe opened a pull request:
https://github.com/apache/incubator-beam/pull/1280
[BEAM-895] Allow empty GCP credential for pipelines that only access to
public data.
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [ ] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
- [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [ ] If this contribution is large, please file an Apache
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.txt).
---
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/peihe/incubator-beam validation
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-beam/pull/1280.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1280
----
commit a134d91e12b50e2a05aff2b2a9bc4c1dadb66c5f
Author: Pei He <[email protected]>
Date: 2016-11-03T20:47:45Z
[BEAM-895] Allow empty GCP credential for pipelines that access to
public data.
----
> Transport.newStorageClient requires credentials
> -----------------------------------------------
>
> Key: BEAM-895
> URL: https://issues.apache.org/jira/browse/BEAM-895
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Frances Perry
> Assignee: Pei He
> Fix For: 0.4.0-incubating
>
>
> Transport.newStorageClient requires credentials, even if those aren't needed.
> Impact: Examples use publicly accessible files on Google Cloud Storage,
> however reading those is still requiring the user to authenticate with Google
> Cloud Storage.
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: Unable to get application default
> credentials. Please see
> https://developers.google.com/accounts/docs/application-default-credentials
> for details on how to specify credentials. This version of the SDK is
> dependent on the gcloud core component version 2015.02.05 or newer to be able
> to get credentials from the currently authorized user via gcloud auth.
> at
> org.apache.beam.sdk.util.Credentials.getCredential(Credentials.java:123)
> at
> org.apache.beam.sdk.util.GcpCredentialFactory.getCredential(GcpCredentialFactory.java:43)
> at
> org.apache.beam.sdk.options.GcpOptions$GcpUserCredentialsFactory.create(GcpOptions.java:264)
> at
> org.apache.beam.sdk.options.GcpOptions$GcpUserCredentialsFactory.create(GcpOptions.java:254)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.returnDefaultHelper(ProxyInvocationHandler.java:549)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.getDefault(ProxyInvocationHandler.java:490)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:152)
> at com.sun.proxy.$Proxy52.getGcpCredential(Unknown Source)
> at
> org.apache.beam.sdk.util.Transport.newStorageClient(Transport.java:148)
> at
> org.apache.beam.sdk.util.GcsUtil$GcsUtilFactory.create(GcsUtil.java:96)
> at
> org.apache.beam.sdk.util.GcsUtil$GcsUtilFactory.create(GcsUtil.java:84)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.returnDefaultHelper(ProxyInvocationHandler.java:549)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.getDefault(ProxyInvocationHandler.java:490)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:152)
> at com.sun.proxy.$Proxy52.getGcsUtil(Unknown Source)
> at
> org.apache.beam.sdk.util.GcsIOChannelFactory.match(GcsIOChannelFactory.java:43)
> at org.apache.beam.sdk.io.TextIO$Read$Bound.apply(TextIO.java:283)
> at org.apache.beam.sdk.io.TextIO$Read$Bound.apply(TextIO.java:195)
> at
> org.apache.beam.sdk.runners.PipelineRunner.apply(PipelineRunner.java:76)
> at
> org.apache.beam.runners.direct.DirectRunner.apply(DirectRunner.java:226)
> at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:400)
> at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:323)
> at org.apache.beam.sdk.values.PBegin.apply(PBegin.java:58)
> at org.apache.beam.sdk.Pipeline.apply(Pipeline.java:173)
> at org.apache.beam.examples.WordCount.main(WordCount.java:195)
> ... 6 more
> Caused by: java.io.IOException: The Application Default Credentials are not
> available. They are available if running on Google App Engine, Google Compute
> Engine, or Google Cloud Shell. Otherwise, the environment variable
> GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining
> the credentials. See
> https://developers.google.com/accounts/docs/application-default-credentials
> for more information.
> at
> com.google.api.client.googleapis.auth.oauth2.DefaultCredentialProvider.getDefaultCredential(DefaultCredentialProvider.java:98)
> at
> com.google.api.client.googleapis.auth.oauth2.GoogleCredential.getApplicationDefault(GoogleCredential.java:213)
> at
> com.google.api.client.googleapis.auth.oauth2.GoogleCredential.getApplicationDefault(GoogleCredential.java:191)
> at
> org.apache.beam.sdk.util.Credentials.getCredential(Credentials.java:121)
> ... 30 more
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)