Refactor #19534

Excessive amount of log messages around db field encryption

Added by Lukas Zapletal 7 months ago. Updated 7 months ago.

Status:Closed
Priority:Normal
Assigned To:Lukas Zapletal
Category:Logging
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4529, https://github.com/theforeman/foreman/pull/4548
Story points-
Velocity based estimate-
Release1.15.1Release relationshipAuto

Description

Foreman logs tremendous amount of messages about db field encryption. Major issues: Every en/decryption is logged at info level:

Successfully decrypted field for XYZ

Every attempt to decrypt unencrypted field is reported via debug (annoying in dev mode):

String does not start with the prefix 'encrypted-' XYZ

We should not log success scenarios at all (maybe into TRACE level if we had one) and we need to decrease amount of logs for the other actions, like the annoying "String does not start" messasges.


Related issues

Related to Foreman - Refactor #19558: Improve orchestration queue logging Closed 05/16/2017

Associated revisions

Revision bed45946
Added by Lukas Zapletal 7 months ago

Fixes #19534 - removed excessive encryptor logging

Revision 1da8bd42
Added by Dominic Cleal 7 months ago

refs #19534 - check EncryptValue class variables are defined

bed4594 added class variables to record logging state, but failed to
check it was defined before accessing them, causing exceptions when
decryption failed. Tests added for this new behaviour.

Revision ad5b976d
Added by Lukas Zapletal 6 months ago

Fixes #19534 - removed excessive encryptor logging

(cherry picked from commit bed45946878572b854e64b54ca63a8b294cb53bf)

Revision bf1a55e3
Added by Dominic Cleal 6 months ago

refs #19534 - check EncryptValue class variables are defined

bed4594 added class variables to record logging state, but failed to
check it was defined before accessing them, causing exceptions when
decryption failed. Tests added for this new behaviour.

(cherry picked from commit 1da8bd42a95c9e254ea28efbd1b409ac5ab3033e)

History

#1 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman/pull/4529 added

#2 Updated by Lukas Zapletal 7 months ago

  • Release set to 1.15.1

Daniel, I am proposing this for 1.15.1 as this is constantly flooding our logs.

#3 Updated by The Foreman Bot 7 months ago

  • Pull request https://github.com/theforeman/foreman/pull/4533 added

#4 Updated by Lukas Zapletal 7 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal 7 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/4533)

04d9f6e has the incorrect ticket number, it should have referred to #19558.

#6 Updated by The Foreman Bot 7 months ago

  • Pull request https://github.com/theforeman/foreman/pull/4548 added

#7 Updated by The Foreman Bot 7 months ago

  • Pull request https://github.com/theforeman/foreman/pull/4533 added

#8 Updated by Lukas Zapletal 7 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/4533)

04d9f6e has the incorrect ticket number, it should have referred to #19558

#9 Updated by Lukas Zapletal 7 months ago

Also available in: Atom PDF