ASCP - why is APPAudit.log growing significantly large on Tomcat server?
Question
- Is there any reason I may see the provider retrieving the password repeatedly for my Tomcat application, even though the application is not running? APPAudit.log example:
- APPAU001I Provider Prov_<providername> has successfully fetched password [<password_path>] with query [<password_query>] for application [<appID>]
- Should I be concerned about the space these logs may consume on the provider machine?
Environment
10.10;11.3;11.4;12.0;12.1;12.4;12.6 Privileged Access Manager (PAM, self-hosted) Application Server Credential Provider (ASCP)
Answer
- With the Tomcat ASCP, the provider is only called when new connections are needed and calls that utilize existing connections will not be seen by the provider. The Tomcat server may be testing the datasource health when you see regular connections like this.
- Also, when the provider is configured to use the cache (CacheLevel=persistent in the provider configuration), calls to provider will only go to the vault when a password object is first called or when the password is being changed. All other calls will show up the the provider audit log.
- There are settings in the basic_appprovider.conf file that are configured and can be modified to rotate the logs regularly.
- LogRetentionOnSizeMB – The size in MB of the log files when they are moved to a subfolder of the Logs folder. New log files will be started automatically. The default value is 25MB.
- LogRetentionOnTimeIntervalMinutes – The number of minutes after which the log files are moved to a subfolder of the Logs folder. New log files will be started automatically.
- OldLogsRetention – The number of days that trace and console log files will be saved, after which they will be deleted. By default, log files are saved for 30 days. The Provider will automatically search every hour for log files to delete; this cannot be configured. To prevent old log files from being deleted, specify 0 (zero).
- OldAuditLogsRetention – The number of days that audit log files stored in the ‘Old’ subfolder of the Logs folder will be saved, after which they will be deleted. By default, old audit log files are saved for 90 days. The Provider will automatically search for log files to delete every hour; this cannot be configured.
- For more information on these settings and how to configure them, please refer to this documentation site.
Additional Information
Details
Q:
Is there any reason I may see the provider retrieving the password repeatedly for my Tomcat application, even though the application is not running?
APPAudit.log example:
APPAU001I Provider Prov_<providername> has successfully fetched password [<password_path>] with query [<password_query>] for application [<appID>]
A:
With the Tomcat ASCP, the provider is only called when new connections are needed and calls that utilize existing connections will not be seen by the provider. The Tomcat server may be testing the datasource health when you see regular connections like this.
Also, when the provider is configured to use the cache (CacheLevel=persistent in the provider configuration), calls to provider will only go to the vault when a password object is first called or when the password is being changed. All other calls will show up the the provider audit log.
Q:
Should I be concerned about the space these logs may consume on the provider machine?
A:
There are settings in the basic_appprovider.conf file that are configured and can be modified to rotate the logs regularly.
LogRetentionOnSizeMB – The size in MB of the log files when they are moved to a subfolder of the Logs folder. New log files will be started automatically. The default value is 25MB.
LogRetentionOnTimeIntervalMinutes – The number of minutes after which the log files are moved to a subfolder of the Logs folder. New log files will be started automatically.
OldLogsRetention – The number of days that trace and console log files will be saved, after which they will be deleted. By default, log files are saved for 30 days. The Provider will automatically search every hour for log files to delete; this cannot be configured.
To prevent old log files from being deleted, specify 0 (zero).
OldAuditLogsRetention – The number of days that audit log files stored in the ‘Old’ subfolder of the Logs folder will be saved, after which they will be deleted. By default, old audit log files are saved for 90 days. The Provider will automatically search for log files to delete every hour; this cannot be configured.
For more information on these settings and how to configure them, please see the "Configuring Auditing and Monitoring Log Files" section of the Credential Provider and ASCP Implementation Guide.