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

README should be updated with required permissions #570

Closed
averikitsch opened this issue Jul 2, 2021 · 2 comments · Fixed by #582
Closed

README should be updated with required permissions #570

averikitsch opened this issue Jul 2, 2021 · 2 comments · Fixed by #582
Assignees
Labels
api: logging Issues related to the googleapis/java-logging API. lang: java Issues specific to Java. type: docs Improvement to the documentation for an API.

Comments

@averikitsch
Copy link

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
    General, Core, and Other are also allowed as types
  2. OS type and version:
  3. Java version: 11
  4. logging version(s): 2.3.1

Steps to reproduce

  1. Deploy to Cloud Run
  2. See error: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: The caller does not have permission

Code example

Call MonitoredResourceUtil.getResource() directly or through using LoggingHandler.addHandler(LOGGER, new LoggingHandler()); for example with java.util.logging.Logger.

private final static Logger LOGGER = Logger.getLogger("HelloWorldApplication");
LoggingHandler.addHandler(LOGGER, new LoggingHandler());
LOGGER.log(new LogRecord(Level.FINEST, "my message!"));

Stack trace

java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: The caller does not have permission
	at com.google.cloud.logging.LoggingImpl.flush(LoggingImpl.java:717)
	at com.google.cloud.logging.LoggingImpl.write(LoggingImpl.java:699)
	at com.google.cloud.logging.LoggingHandler.publish(LoggingHandler.java:237)
	at java.logging/java.util.logging.Logger.log(Unknown Source)
	at com.example.helloworld.HelloworldApplication$HelloworldController.hello(HelloworldApplication.java:59)

The docs need to be updated to mention that the service account of the Google Cloud service (for example Cloud Run) needs to be updated to have role Logs Writer,roles/logging.logWriter.

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging API. label Jul 2, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jul 4, 2021
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Jul 13, 2021
@minherz minherz assigned minherz and unassigned simonz130 Jul 14, 2021
@minherz minherz added lang: java Issues specific to Java. type: docs Improvement to the documentation for an API. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jul 14, 2021
@minherz
Copy link
Contributor

minherz commented Jul 14, 2021

@averikitsch can you please provide a link to the documentation that is missing the explanation about required permission(s)?

@averikitsch
Copy link
Author

This repo's README does not contain this info.

minherz added a commit that referenced this issue Jul 15, 2021
Adds description of the authorization requirements for a service object.

Fixes markdown warnings in the document.

Fixes #570
minherz added a commit that referenced this issue Jul 27, 2021
* fix: adds  authorization description

Adds description of the authorization requirements for a service object.

Fixes markdown warnings in the document.

Fixes #570

* Improve description and update autogen template

fix the wording for "creating an authorized service object" section
update the readme template so the next autgen event will keep changes in

* make authorization section match synthool template

update the authorization section to make it more generic following
other blocks in the synthool template.
gcf-merge-on-green bot pushed a commit to googleapis/synthtool that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
gcf-owl-bot bot added a commit to googleapis/java-accessapproval that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-owl-bot bot added a commit to googleapis/java-apigee-connect that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-owl-bot bot added a commit to googleapis/java-api-gateway that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-owl-bot bot added a commit to googleapis/java-area120-tables that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-owl-bot bot added a commit to googleapis/java-analytics-admin that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-owl-bot bot added a commit to googleapis/java-artifact-registry that referenced this issue Jul 27, 2021
as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-contact-center-insights that referenced this issue Jul 28, 2021
#35)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-private-catalog that referenced this issue Jul 28, 2021
#36)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-debugger-client that referenced this issue Jul 28, 2021
#25)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-billing that referenced this issue Jul 28, 2021
#462)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-data-fusion that referenced this issue Jul 28, 2021
#19)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-artifact-registry that referenced this issue Jul 28, 2021
#84)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-policy-troubleshooter that referenced this issue Jul 28, 2021
#75)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-memcache that referenced this issue Jul 28, 2021
#449)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-vpcaccess that referenced this issue Jul 28, 2021
#38)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-gkehub that referenced this issue Jul 28, 2021
#81)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-service-usage that referenced this issue Jul 28, 2021
#62)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-billingbudgets that referenced this issue Jul 28, 2021
#525)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-orchestration-airflow that referenced this issue Jul 28, 2021
#27)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-essential-contacts that referenced this issue Jul 28, 2021
#60)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-container that referenced this issue Jul 28, 2021
#514)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-profiler that referenced this issue Jul 28, 2021
#108)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-filestore that referenced this issue Jul 28, 2021
#21)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-life-sciences that referenced this issue Jul 28, 2021
#31)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-tpu that referenced this issue Jul 28, 2021
#38)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-gsuite-addons that referenced this issue Jul 28, 2021
#61)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-resource-settings that referenced this issue Jul 28, 2021
#20)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-service-management that referenced this issue Jul 28, 2021
#86)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-eventarc that referenced this issue Jul 28, 2021
#28)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-notebooks that referenced this issue Jul 28, 2021
#215)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-redis that referenced this issue Jul 28, 2021
#459)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-translate that referenced this issue Jul 28, 2021
#707)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-datalabeling that referenced this issue Jul 28, 2021
#542)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
gcf-merge-on-green bot pushed a commit to googleapis/java-servicedirectory that referenced this issue Aug 10, 2021
#458)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this issue Jun 29, 2022
…eapis#1161) (googleapis#554)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
github-actions bot pushed a commit to googleapis/google-cloud-java that referenced this issue Jul 1, 2022
#298)

as a part of the PR 582 for java-logging an authorization section is added to the Java README template.

Fixing googleapis/java-logging#570.
Source-Link: googleapis/synthtool@3d32990
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:2904b9ad921ecc1343d1cf815bfaafbcc1115c1f39593aef9f8e333ffda552f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. lang: java Issues specific to Java. type: docs Improvement to the documentation for an API.
Projects
None yet
4 participants