-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding info logging to display the hashed encryptionKey & adding test… #139874
Adding info logging to display the hashed encryptionKey & adding test… #139874
Conversation
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
Pinging @elastic/kibana-security (Team:Security) |
.update(config.encryptionKey) | ||
.digest('base64'); | ||
|
||
this.logger.info(`Hashed 'encryptionKey' for this instance: ${hashedEncryptionKey}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit/question - do we want to refer to the yml field path (xpack.encryptedSavedObjects.encryptionKey) just for clarity of where the setting is located?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ you can technically figure this out by reading which plugin wrote the log message, but I think spelling out the entire path would be easier to parse (and search for in logs!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! Added in latest commit!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Kurt
Would there be any benefit to spitting out hashes for the other encryption keys as well? Not sure if we have the same sort of troubleshooting issues with those like we do with SO's.
@jeramysoucy maybe this is something we could add to Discussions for the weekly sync? |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
elastic#139874) * Adding info logging to display the hashed encryptionKey & adding test cases * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Fixing test logger * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Adding config path for message * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit b474a45)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
#139874) (#140532) * Adding info logging to display the hashed encryptionKey & adding test cases * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Fixing test logger * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Adding config path for message * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit b474a45) Co-authored-by: Kurt <kc13greiner@users.noreply.github.com>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
elastic#139874) * Adding info logging to display the hashed encryptionKey & adding test cases * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Fixing test logger * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Adding config path for message * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit b474a45) # Conflicts: # x-pack/plugins/encrypted_saved_objects/server/plugin.test.ts
…ng test… (#139874) (#140759) * Adding info logging to display the hashed encryptionKey & adding test… (#139874) * Adding info logging to display the hashed encryptionKey & adding test cases * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Fixing test logger * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Adding config path for message * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit b474a45) # Conflicts: # x-pack/plugins/encrypted_saved_objects/server/plugin.test.ts * Fixing type issue Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
… cases
Summary
Adding logging to display a hashed value of the supplied encryptionKey
Release Notes
Debugging - Hashed encryption key now logged on Kibana start-up to help users solve conflicting encryptionKey configurations