Skip to content

cta-tape-label logging exposes database password

When running cta-tape-label the logging prints the entire Postgres connection string which includes the database password.

The following is a snippet (info redacted of course, where everything in brackets is the actual strings)

Feb  4 15:01:30.741690581 gmv18014.fnal.gov cta-tape-label: LVL="INFO" PID="1008144" TID="1008144" MSG="Label session read configuration" catalogueDbType="DBTYPE_POSTGRESQL" catalogueDatabase="postgresql://[user]:[password]@[hostname]:5468/[dbname]" catalogueUsername="" devFilename="/dev/nst1" rawLibrarySlot="smc5" logicalLibrary="G1_LTO8" unitName="G1_F3C3R3"