Skip to content

Commit

Permalink
Merge pull request #8 from timp21337/master
Browse files Browse the repository at this point in the history
Avoid logging db connection details
  • Loading branch information
wakaleo committed May 20, 2012
2 parents 2d688cb + 507cdce commit a5a5d52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/com/wakaleo/schemaspy/SchemaSpyReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ public class SchemaSpyReport extends AbstractMavenReport {
* Specifies additional properties to be used when connecting to the database.
* Specify the entries directly, escaping the ='s with \= and separating each key\=value
* pair with a ;.
*
* May also be a file name, useful for hiding connection properties from public logs.
*
* @parameter connprops
*/
private String connprops;
Expand Down Expand Up @@ -460,7 +463,7 @@ protected void executeReport(Locale locale) throws MavenReportException {
addFlagToArguments(argList, "-sso", singleSignOn);
addFlagToArguments(argList, "-lq", lowQuality);
addFlagToArguments(argList, "-hq", highQuality);
addToArguments(argList, "connprops", connprops);
addToArguments(argList, "-connprops", connprops);
addFlagToArguments(argList, "-cid", commentsInitiallyDisplayed);
addFlagToArguments(argList, "-noads", noAds);
addFlagToArguments(argList, "-nologo", noLogo);
Expand Down
9 changes: 8 additions & 1 deletion src/site/apt/faq.apt
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,11 @@ but it keeps crashing on me.

Sure. Just use the <<<\<cssStylesheet\>>>> configuration option. The default one
is called schemaSpy.css, and can be found bundled in the plugin JAR (in the resources
directory). You can also check it out online in the Subversion repository.
directory). You can also check it out online in the Subversion repository.

* The SchemaSpy plugin is logging my database password, so exposing it in Jenkins logs. Can I hide it?

The way to do this is to put the database connection details in a separate file
of key=value pairs containing a <<<password=mypassword>>> entry.
Point to that file with the <<<\<connprops\>>>> option.

0 comments on commit a5a5d52

Please sign in to comment.