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

DEBUG [org.apache.http.wire] logs are getting printed in keycloak.log file #27752

Closed
1 of 2 tasks
atul-epam opened this issue Mar 11, 2024 · 5 comments
Closed
1 of 2 tasks
Labels
area/account/api kind/bug Categorizes a PR related to a bug team/core-shared

Comments

@atul-epam
Copy link

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

account/api

Describe the bug

Following logs are getting printed in keycloak.log file with all request parameters including password.

DEBUG [org.apache.http.wire] (executor-thread-1) http-outgoing-1 >>

Version

23.0.4

Regression

  • The issue is a regression

Expected behavior

The above log should not get printed.

Actual behavior

Http logs are getting printed with request parameters

How to Reproduce?

Hit the /protocol/openid-connect/token API with all valid parameters.

Anything else?

No response

@atul-epam
Copy link
Author

I already referred jfrog/artifactory-client-java#77 but it's not working for me.

@stianst
Copy link
Contributor

stianst commented Mar 14, 2024

I'm closing this as this is expected behaviour.

~invalid

@keycloak-github-bot keycloak-github-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
@keycloak-github-bot
Copy link

Thanks for reporting this issue. However, after review this is not considered a valid issue, or has been recently resolved.

As the issue is not valid it will be automatically closed.

@atul-epam
Copy link
Author

atul-epam commented Mar 21, 2024

@stianst I can see PASSWORD in following logs in DEBUB/TRACE mode
org.apache.http.wire, org.hibernate.internal.util.EntityPrinter, org.hibernate.orm.jdbc.extract, org.hibernate.orm.results

This is a security threat. Is this expected behavior?

@sschu
Copy link
Contributor

sschu commented Mar 27, 2024

@atul-epam At this layer, the http framework and Hibernate just log raw data. It is not really feasible to filter raw data for sensitive information (and if it was, it would have to be supported by these frameworks). So this behaviour is expected and you should not enable debug or trace logging for these frameworks in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/account/api kind/bug Categorizes a PR related to a bug team/core-shared
Projects
None yet
Development

No branches or pull requests

3 participants