Skip to content

Commit f4921e3

Browse files
Adding properties for logging user/client info
Taking property implementation from cristiantm in PR #529 for issue #527. Adding properties for whether to log the username information and/or the client connection information to the DefaultSecurityConfiguration. Applying the default TRUE state to ESAPI.properties in both test and configuration scope.
1 parent 1e930c4 commit f4921e3

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

configuration/esapi/ESAPI.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,10 @@ Logger.LogServerIP=true
391391
Logger.LogFileName=ESAPI_logging_file
392392
# MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)
393393
Logger.MaxLogFileSize=10000000
394-
394+
# Determines whether ESAPI should log the user info.
395+
Logger.UserInfo=true
396+
# Determines whether ESAPI should log the app info.
397+
Logger.AppInfo=true
395398

396399
#===========================================================================
397400
# ESAPI Intrusion Detection

src/main/java/org/owasp/esapi/reference/DefaultSecurityConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ public static SecurityConfiguration getInstance() {
152152
public static final String LOG_ENCODING_REQUIRED = "Logger.LogEncodingRequired";
153153
public static final String LOG_APPLICATION_NAME = "Logger.LogApplicationName";
154154
public static final String LOG_SERVER_IP = "Logger.LogServerIP";
155+
public static final String LOG_USER_INFO = "Logger.UserInfo";
156+
public static final String LOG_APP_INFO = "Logger.AppInfo";
155157
public static final String VALIDATION_PROPERTIES = "Validator.ConfigurationFile";
156158
public static final String VALIDATION_PROPERTIES_MULTIVALUED = "Validator.ConfigurationFile.MultiValued";
157159
public static final String ACCEPT_LENIENT_DATES = "Validator.AcceptLenientDates";

src/test/resources/esapi/ESAPI.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,10 @@ Logger.LogServerIP=true
424424
Logger.LogFileName=ESAPI_logging_file
425425
# MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)
426426
Logger.MaxLogFileSize=10000000
427-
427+
# Determines whether ESAPI should log the user info.
428+
Logger.UserInfo=true
429+
# Determines whether ESAPI should log the app info.
430+
Logger.AppInfo=true
428431

429432
#===========================================================================
430433
# ESAPI Intrusion Detection

0 commit comments

Comments
 (0)