GeezerVison is showing github.com — pubsub emulator authinterceptor question · Issue #1381 · googleapis/google-cloud-java
pubsub emulator authinterceptor question #1381DescriptionI get the following when subscribing to a topics subscription locally:
...
[pubsub] Nov 09, 2016 1:46:17 PM com.google.cloud.iam.testing.v1.shared.authorization.AuthInterceptor interceptCall
[pubsub] INFO: Authentication interceptor: Header value is null
[pubsub] Nov 09, 2016 1:46:17 PM com.google.cloud.iam.testing.v1.shared.authorization.AuthInterceptor interceptCall
[pubsub] INFO: Authentication interceptor: invalid or missing token
[pubsub] Nov 09, 2016 1:46:17 PM com.google.cloud.iam.testing.v1.shared.authorization.AuthInterceptor interceptCall
[pubsub] INFO: Authentication interceptor: Header value is null
...
Given the below information, what could be wrong?
My java code works with the actual cloud service but when using the following code:
PubSubOptions.Builder optionsBuilder = PubSubOptions.newBuilder().setProjectId("project");
optionsBuilder.setAuthCredentials(AuthCredentials.noAuth());
optionsBuilder.setHost("localhost:8989");
PubSub pubsub = optionsBuilder.build().getService();
//then using pubsub.pullAsync(...) for the actual pulling of messages
gcloud pubsub emulator started like this:
gcloud beta emulators pubsub start --host-port=0.0.0.0:8989
Versions:
gcloud-java-pubsub -> 0.5.1
$ gcloud --version
Google Cloud SDK 133.0.0
alpha 2016.01.12
beta 2016.01.12
bq 2.0.24
bq-nix 2.0.24
core 2016.11.01
core-nix 2016.11.01
gcloud
gsutil 4.22
gsutil-nix 4.22
pubsub-emulator 2016.08.19 Activitymziccard commented on Nov 9, 2016 Nothing is going wrong. When using the emulator we pass no credentials and this is what the logs are telling you, that no authentication header was provided with any of the requests.
Code running against the emulator is working as expected right? fondberg commented on Nov 9, 2016 Oh, it was spitting out soo much that I thought it was wrong. I will test. Maybe a good idea to disable that particular logging (many lines per second) mziccard commented on Nov 9, 2016 @fonzy2013 I believe there might be some users interested in that log (the interceptor also logs the header if one is set in the request).
@hbchai could we make the logging level FINE for AuthInterceptor? fondberg commented on Nov 9, 2016 Just for knowledge, when running in pull mode in gcloud-java I get more entries then my console can handle... I think it would be great if it could be tuned down or collapsed into 1 line instead of 3 hbchai commented on Nov 17, 2016 @mziccard Good idea about using FINE - will do that. garrettjonesgoogle commented on Dec 8, 2016 Looks like nothing more is necessary for this. Ghazgkull commented on Oct 11, 2017 @garrettjonesgoogle Would you mind summarizing the resolution of this one? As a user of the emulator, how do I get it to stop logging this warning?
It's particularly a problem when using docker-compose to run a number of containers, as the pubsub container spam consistently scrolls away the output from other containers. asnare commented on Dec 8, 2017 It looks like @hbchai said (paraphrased) "Great, we'll change it to FINE" but @garrettjonesgoogle then closed it before the change was made? garrettjonesgoogle commented on Dec 20, 2017 I think I didn't look carefully enough and assumed the message from @hbchai was from a user, but now I see it was from the implementer of the emulator. I will re-open so we can check the log levels in google-cloud-java code.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|