`/hosts` with `device_mapping` returns `idp` for `source` in response after human-device mapping has been manually updated
customer-shackleton: Slack thread.
Fleet version: v4.77.0
Web browser and operating system: N/A: this is in the API
💥 Actual behavior
After manually setting a host's human-device mapping data (either with the UI or API), the source under the host's device_mapping is changed to "idp", instead of remaining as "mdm_idp_accounts".
🛠️ To fix
- When manually updating human-device mapping, if
sourceparameter is set to"idp", set the end user'ssourcetomdm_idp_accounts. - When upgrading, existing end users with
"source": "idp"are updated to have"source": "mdm_idp_accounts"
Note that this could potentially be considered a breaking change. Since this is a Premium feature and we know who's using it, we'll go ahead with the change since customer workflows are broken.
🧑💻 Steps to reproduce
These steps:
- [ ] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [x] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
- List a host (with IdP data) with
device_mapping = trueand see"source": "mdm_idp_accounts". - Manually update a host's human-device mapping data.
- List the host again with
device_mapping = true, and now see"source": "idp".
🕯️ More info (optional)
acc-shackleton: Slack thread.
FYI @rachaelshaw I assigned this bug to you
Hey @rachaelshaw @sharon-fdm we think this bug deserves P1 because it's blocking customer-shackleton's activation (macOS MDM migration).
@spalmesano0 just a reminder to follow the notification step in high priority bug process. I did it this time. ^^
Approved and pulled into the sprint. Thanks @ksykulev, for taking it! ❤️
Was able to reproduce the original issue on an earlier build. With the fix the source always remains mdm_idp_accounts
Hosts with idp as a source also get updated to mdm_idp_accounts
For any host that didn't have device_mapping configured source is also set to mdm_idp_accounts
Manual mapping change, idp to mdm brings range, flexible, not strange.