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

Add dummy value for Jetty 9 logging system property when using Jetty 12. #100

Closed
wants to merge 1 commit into from

Conversation

lachlan-roberts
Copy link
Collaborator

see jetty/jetty.project#11499

The code in https://github.com/googleapis/google-auth-library-java/blob/main/oauth2_http/java/com/google/auth/oauth2/DefaultCredentialsProvider.java#L321 is checking the org.eclipse.jetty.util.log.class system property to determine whether it is on GAE Standard 7. But this system property was not set for Jetty 12 because we use the SLF4J to JUL bridge.

If we set this property to a dummy value we can make Jetty 12 work better with google-auth-library-java.

I experienced this issue when trying to use google-cloud-logging-logback for google cloud logging with logback on the Java21 runtime. And got errors saying:

ERROR: onFailure exception: com.google.cloud.logging.LoggingException: 
io.grpc.StatusRuntimeException: PERMISSION_DENIED: Method doesn't allow 
unregistered callers (callers without established identity). Please use 
API Key or other form of API consumer identity to call this API.

I have tested the logging after this change and it works without any errors.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
copybara-service bot pushed a commit that referenced this pull request Mar 13, 2024
--
845d97f by Lachlan Roberts <lachlan@webtide.com>:

Add dummy value for Jetty 9 logging system property when using Jetty 12.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
COPYBARA_INTEGRATE_REVIEW=#100 from GoogleCloudPlatform:fix-jetty12-logging-property 845d97f
PiperOrigin-RevId: 615280309
Change-Id: If4494705a666235b0b30b50aec7dadfbce3a8645
@ludoch ludoch closed this Mar 13, 2024
@ludoch
Copy link
Collaborator

ludoch commented Mar 13, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants