@W-21148602: Internal Server List does not respect changes made to Servers.xml file#2845
Conversation
| Context.MODE_PRIVATE); | ||
|
|
||
| // Reset non-custom servers from mobile device management (MDM) and servers XML. | ||
| resetNonCustomLoginServers(runtimePrefs); |
There was a problem hiding this comment.
@wmathurin, @brandonpage and @bbirman, before I update the tests and move this into ready-for-review I wanted to run the concept of the change past you all.
I chatted briefly with @bbirman to review the iOS behavior since the work item specifically hails that logic as working compared to Android's. Currently, MSDK Android loads the servers.xml only once on install. The work item mentions upgrade, but I didn't see that logic. More, when MDM provides servers they're additive only. When MDM drops a server, the app doesn't reflect that.
What I'm trying here and seems to manually test well is:
- Drop both sets of non-custom servers on startup, including non-custom servers from
servers.xmland MDM. - Load the current set of non-custom servers from either
servers.xmlor MDM according to the existing logic, as much as possible. - When MDM is not enabled, preserve the user's custom login servers at the end of the list
I'm doing a little more testing around the behavior of the only show authorized hosts parameter. I want to be sure the MDM flow still respects the user's custom servers.
The question to answer is: Does this seem like a reasonable update to the existing logic to resolve this work item? I can manipulate servers.xml and the MDM data and the app seems to keep the servers list adds, updates or removes non-custom servers just as we'd want. The logic here is older and the methods are not as self-contained as our newer logic, so I wanted to be sure we all got to review any potential side-effects of this before moving further!
There was a problem hiding this comment.
For #3 (and pending your authorized hosts testing), on iOS the custom login servers would be preserved if MDM was enabled as long as "onlyShowAuthorizedHosts" is false
There was a problem hiding this comment.
This sounds good to me.
One thought though: Should we only remove MDM servers when network is available? Security wise, it would be bad it:
- Put device in airplane mode
- Open app. MDM servers are deleted and updated servers cannot be retrieved.
- Turn airplane mode off.
LoginServerManagerconstructor does not run again. MDM server list is not respected.
Is that scenario possible?
There was a problem hiding this comment.
Thanks and that thought about network is a great topic. I'll do some research!
There was a problem hiding this comment.
I took a manual look and also asked our agents. RuntimeConfig does cache the policy locally and will give MSDK those values when no network is present ✅
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2845 +/- ##
============================================
+ Coverage 64.55% 64.82% +0.27%
- Complexity 2925 2961 +36
============================================
Files 222 222
Lines 17323 17364 +41
Branches 2471 2477 +6
============================================
+ Hits 11182 11257 +75
+ Misses 4934 4906 -28
+ Partials 1207 1201 -6
🚀 New features to boost your workflow:
|
be2307b to
f7984d3
Compare
…rvers.xml file (Greatly Improved Shared Preferences Data Integrity And Dynamic Handling Of RuntimeConfig. Removal Of To-Dos And Diagnostics Pending)
f7984d3 to
84a6441
Compare
…rvers.xml file (Remove Diagnostics And To-Dos)
…rvers.xml file (Slight Self-Review Cleanup, Revert `getLoginServersFromRuntimeConfig` To Maintain Point Release API Compatibility)
…rvers.xml file (Unit Test Updates)
Generated by 🚫 Danger |
…rvers.xml file (Unit Tests For Add, Update And Remove Servers Via Resources)
…rvers.xml file (Unit Tests For Add, Update And Remove Servers Via Runtime Config Mobile Device Management)
…rvers.xml file (Enhancements For Null Safety And Related Unit Tests)
3e8aa3f to
463b95c
Compare
…rvers.xml file (Additional Enhancements For Null Safety And Related Unit Tests)
…rvers.xml file (Improve Logic Branching In `getSelectedLoginServer`)
b58c7aa to
686e433
Compare
…rvers.xml file (Additional Tests And Improved Branching Logic In `removeServer`)
🚧 Draft For Conceptual Review. Please Review Commentary For Questions 🧱