-
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
[Synthetics] preserve id field on monitor attributes #142478
[Synthetics] preserve id field on monitor attributes #142478
Conversation
…-ref HEAD~1..HEAD --fix'
…ributes' of https://github.com/dominiqueclarke/kibana into fix/synthetics-preserve-monitor-id-field-on-monitor-attributes
Pinging @elastic/uptime (Team:uptime) |
@elasticmachine merge upstream |
…monitor-attributes
…ributes' of https://github.com/dominiqueclarke/kibana into fix/synthetics-preserve-monitor-id-field-on-monitor-attributes
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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.
Tested per the instructions in the description, did not see any decryption issues.
Code LGTM.
* synthetics - preserve id field on monitor attributes * adjust tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * adjust jest tests * adjust tests * adjust types * adjust tests * adjust types * update tests * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 61342b3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
* synthetics - preserve id field on monitor attributes * adjust tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * adjust jest tests * adjust tests * adjust types * adjust tests * adjust types * update tests * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 61342b3) Co-authored-by: Dominique Clarke <[email protected]>
I'm not sure if I tested this right, but I:
Both before and after monitor management looked like this: So, I saw no URL before, or after. Did I test things wrong? The URL shows up in the monitor detail page |
I personally post FF tested this by doing the following.
Steps 4 and 5 ensure that the keys |
* synthetics - preserve id field on monitor attributes * adjust tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * adjust jest tests * adjust tests * adjust types * adjust tests * adjust types * update tests * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <[email protected]>
* synthetics - preserve id field on monitor attributes * adjust tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * adjust jest tests * adjust tests * adjust types * adjust tests * adjust types * update tests * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <[email protected]>
Summary
Preserves monitor attribute
id
on monitor saved objects. Also preserves attributeurls
on tcp monitors.Background
In #140553, we hardened our validation to ensure that unknown keys cannot be added to monitor saved objects. This will be release in 8.5.0
Prior to 8.5.0, however, the enable/disable toggle in Uptime Monitor management already introduced an unknown key:
id
. Thisid
key was added to the attributes of every monitor that was enabled or disabled via the enable/disable toggle.Because our monitor saved object contains encrypted secrets, values on the monitor saved object are added to the encryption AAD (additionally authenticated data), but default. If values are omitted from the AAD, the secrets will not be able to be decrypted.
Because of this limitation, we must continue to keep the
id
field on all monitors until the time at which we are able to remove the id field through a saved object migration.Note on the
urls
field for TCP:This PR also ensures that the
urls
field for tcp is preserved. The urls field was defined on all tcp monitors prior to 8.4.2 through our now removed hydration feature, which updated monitor saved objects with extra values based on the heartbeat documents. Preservingurls
on TCP fields is necessary for the same reason it is necessary to preserve the id field: to prevent decryption errors resulting from missing fields that are part of AAD.Testing
git checkout v8.4.0
xpack.uptime.index: remote_cluster:heartbeat-*
toxpack.uptime.index: synthetics-*
.urls
field for the browser monitor to populate.