You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
For a JDBC url of the format jdbc:mysql://username:password@host:port/db for MySQL, the instrumentation sets the db.user semantic attribute as username:password. This inadvertently exposes the database password.
In the application properties replace spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/db_example with spring.datasource.url=jdbc:mysql://springuser:ThePassword@${MYSQL_HOST:localhost}:3306/db_example
Describe the bug
For a JDBC url of the format
jdbc:mysql://username:password@host:port/db
for MySQL, the instrumentation sets thedb.user
semantic attribute asusername:password
. This inadvertently exposes the database password.Steps to reproduce
complete
project folderspring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/db_example
withspring.datasource.url=jdbc:mysql://springuser:ThePassword@${MYSQL_HOST:localhost}:3306/db_example
spring.datasource.username=springuser
spring.datasource.password=ThePassword
db.user
attributes valueWhat did you expect to see?
The semantic attribute
db.user
should contain onlyspringuser
What did you see instead?
The semantic attribute
db.user
containsspringuser:ThePassword
What version are you using?
1.22.0
Environment
Compiler: openjdk version "11.0.18" 2023-01-17 LTS
OS: Mac OS Monterey
Runtime: Same as above
OS: Same as above
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: