Repository navigation
pubsub emulator authinterceptor question #1381
Copy link
Copy link
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.triaged for GAtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
I 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 messagesgcloud 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.triaged for GAtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
mziccard commentedon 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 commentedon 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 commentedon 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
FINEforAuthInterceptor?fondberg commentedon 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 commentedon Nov 17, 2016
@mziccard Good idea about using
FINE- will do that.garrettjonesgoogle commentedon Dec 8, 2016
Looks like nothing more is necessary for this.
Ghazgkull commentedon 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 commentedon 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 commentedon 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.
25 remaining items
chore: Java 8 unit test to build code in Java 17 and run tests on Jav…
chore: Enable Size-Label bot in all googleapis Java repositories (#1381…
chore: remove DocFX profile (#1381)
chore: Enable Size-Label bot in all googleapis Java repositories (goo…
chore: bump urllib3 from 1.26.16 to 1.26.17 in /synthtool/gcp/templat…
chore: Enable Size-Label bot in all googleapis Java repositories (#1381…
deps: update dependency com.google.apis:google-api-services-storage t…
chore: Enable Size-Label bot in all googleapis Java repositories (#1381…
deps: update dependency com.google.apis:google-api-services-storage t…
chore: Enable Size-Label bot in all googleapis Java repositories (#1381…
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
chore: Enable Size-Label bot in all googleapis Java repositories (#1381…
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
chore: Enable Size-Label bot in all googleapis Java repositories (goo…
chore(deps): update dependency com.google.cloud:google-cloud-bigtable…