-
Notifications
You must be signed in to change notification settings - Fork 355
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
Stack Trace providing too much information when e.g. org.springframework.dao.DuplicateKeyException is thrown #1985
Comments
Thanks for reaching out. Care to post an example that you're talking about? Feel free to obfuscate sensitive parts. |
I am using JdbcAggregateTemplate to do an update or insert. In the complete stack trace there are actually 3 levelse of causes which prints out all data.
which are caused by org.springframework.dao.DuplicateKeyException which also prints out all data, |
I think that this ticket will be marked as duplicate of one of these above and we might not throw |
This might also contain sensitive data.. Perhaps a table should not have PK containing sensitive data, but in context of our application a primary key containing personal identification could be considered sensitive. Should the plain sql which failed be printed at all as the default behaviour? |
I think the SQL is very important for debugging these problems and therefore definitely should get logged. |
Indeed it is. But should the actual data which failed be at debug level? |
The assembly of
|
Sorry if the responsible for this issue doesn't belong in this repo, but I don't know any better. 🦆
We are using Spring Data JDBC in our application, and when these kind of exceptions are thrown, the default is to print the entire sql which failed into console. I'm thinking that i want most of the information like db-operation, table, columns, etc, etc, but the actual data could be sensitive and should not appear in logs by default.
Could it be an idea to atleast hide the actual data behind debug/trace or another kind of solution?
The text was updated successfully, but these errors were encountered: