openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <>
Subject Logging SQL parameters
Date Thu, 03 Jun 2010 16:17:04 GMT
Hi all,

Yesterday I opened
suppress SQL parameter logging in exceptions and trace. While making
SQL values visible is a great benefit when debugging, it can present a
security issue in production (e.g. if the column is a social security

To resolve the problem I've posted a couple of patches to the JIRA. They
both boil down to adding a configuration option in openjpa.Log or
openjpa.ConnectionFactoryProperties to enable/disable parameter printing.

This brings up the question of what the default behavior should be.  With
something like this I'd prefer to err on the side of caution and disable
parameter logging by default. It'd be easy to not notice the parameter
values while testing an application (or to be unconcerned with them since
they're 'dummy data') - if you hit an error in production it's too late and
the cat's out of the bag.

Does anyone feel strongly about the correct default (either way)?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message