Skip to content

Commit

Permalink
Filtered the auth key in api.log
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuldip-Nanda committed Sep 30, 2020
1 parent 7702e71 commit 20f06e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vmdb/loggers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.create_loggers
$log = create_multicast_logger(path_dir.join("evm.log"))
$rails_log = create_multicast_logger(path_dir.join("#{Rails.env}.log"))
$audit_log = create_multicast_logger(path_dir.join("audit.log"), AuditLogger)
$api_log = create_multicast_logger(path_dir.join("api.log"))
$api_log = create_multicast_logger(path_dir.join("api.log"), ProviderSdkLogger)
$ansible_tower_log = create_multicast_logger(path_dir.join("ansible_tower.log"))
$miq_ae_logger = create_multicast_logger(path_dir.join("automation.log"))
$aws_log = create_multicast_logger(path_dir.join("aws.log"))
Expand Down
1 change: 1 addition & 0 deletions lib/vmdb/loggers/provider_sdk_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def call(severity, datetime, progname, msg)
msg = msg.sub(/Bearer(.*?)\"/, 'Bearer [FILTERED] "')
msg = msg.sub(/SharedKey(.*?)\"/, 'SharedKey [FILTERED] "')
msg = msg.sub(/client_secret=(.*?)&/, "client_secret=[FILTERED]&")
msg = msg.sub(/auth_key\"=>\"(.*?)\"/, 'auth_key"=>"FILTERED"')
super(severity, datetime, progname, msg)
end
end
Expand Down

0 comments on commit 20f06e3

Please sign in to comment.