Harden export token checks, remap analysis IDs, and seed the settings device#9
Open
mateuscardosodeveloper wants to merge 2 commits into
Open
Harden export token checks, remap analysis IDs, and seed the settings device#9mateuscardosodeveloper wants to merge 2 commits into
mateuscardosodeveloper wants to merge 2 commits into
Conversation
…evice Validate tokens by behavior instead of a fixed length so the new p- prefixed format passes; the import token is now confirmed against a live run.info call. Build the full analysis old->new ID map before writing any variables so env vars that reference another analysis (CRUD Alerts' alert_dispatcher_id) resolve to the new analysis regardless of export order. Also preserve run_on, interval and description on the recreated analysis. Seed the default global-inactivity alert into the freshly created settings device when exporting the Default Kickstarter, identified by the device_type=settings tag.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes four issues in the Kickstarter export flow: token validation that broke
on the new
p-prefixed token format, stale analysis ID references in env varsafter export, a missing default alert configuration on the settings device of
the Default Kickstarter, and TagoRUN
custom_fields(Custom Settings for Users)not being copied to the target profile.
Why
The backend changed the token format to add a
p-prefix, which changed itslength and tripped the old fixed-length check. Separately,
[TagoIO] - CRUD Alertsstores the[TagoIO] - Alert Dispatchanalysis ID in an env var; theexport never remapped analysis IDs, so the Action it creates ended up with no
analysis selected. The Default Kickstarter also shipped without a working
global-inactivity alert. Finally, the RUN export read
custom_fieldsfrom thetarget profile and wrote it straight back (a no-op), so the source profile's
custom user fields were never carried over.
Test plan
p-prefixed import token; export proceeds past validation[TagoIO] - CRUD Alertsin the target profile and confirmalert_dispatcher_idpoints to the new[TagoIO] - Alert Dispatchanalysisdevice_type=settings) in a freshly created Default profile carries theglobal-inactivitygroup datacustom_fieldsRisk (CIA)
Likelihood: 🟢 Low | Impact: 🟢 Low | Exposure: 🟢 Low