Commit Graph
2990 Commits
Author SHA1 Message Date
riccardom 779cf9e3e9 align comment to removal of DisableAutoConnect
DisableAutoConnect should just avoid the connection attempts *when the service starts*.
If we are started and we are up and running, DisableAutoConnect should not kick in
2026-06-11 14:13:41 +02:00
riccardom d8ba5e6f6b Moves callback into Run method arg 2026-06-11 12:58:33 +02:00
riccardom ccc33ccd65 Removes unused vars 2026-06-11 12:55:37 +02:00
riccardom ba12ba5bec DisableAutoConnect should not stop a running connection.
DisableAutoConnect should just avoid the connection attempts *when the service starts*.
If we are started and we are up and running, DisableAutoConnect should not kick in.

Another PR will follow about this topic
2026-06-11 12:50:58 +02:00
riccardom 281f958554 Since we ARE running there should be a config
If the config was cancelled midflight, connect will abort later on
2026-06-11 12:50:58 +02:00
riccardom 0206e318d1 Prevents engine not stopping within 10 secs from being paired by another instance
We instead juts SKIP updating the policy, so
1. the MDM ticker will kick in 1 minute time,
2. find the policy misaligned,
3. enter the onMDMPolicyChange,
4. find the s.clientRunning == true
   (because it is set to false only in server cleanupConnection,
   and not by s.actCancel())
5. call s.actCancel() again if not nil
6. immediately return from <-s.clientGiveUpChan
7. finally call s.restartEngineForMDMLocked()
2026-06-11 12:50:58 +02:00
riccardom 650d2e3d58 No lock no copy 2026-06-11 09:09:26 +02:00
riccardom aac109f47f Addresses github comments 2026-06-10 16:00:23 +02:00
riccardom 98e304044c Moves test helper at te very bottom 2026-06-10 16:00:23 +02:00
riccardom 05c09bb203 Avoid locking on clientRunning bool when the connection is aborted for whatever reason
We want to just signal this through the giveUpChan, we will manage the signal from
the waiter side and in case set it to false there. THis way we avoid locking,
which should allow the MDM down+wait_for_term_chan_signal_+up procedure

clientRunning is used to signal two different conditions here:

1. the initialization procedure is over (we have an engine)
2. the connection being up (or being attempted)

Probably these two functionalities should not alias, and the failure of the second condition
(because of any error) should just drive a reconnection (currently it's not happening,
and we silently go idle).
OR, mor probably, the two things are the SAME and there should not exist a case where
we did the "Up" initialization and connection attempt but we are not still attempting it.
2026-06-10 15:22:15 +02:00
riccardom a400186124 Renaming fix 2026-06-10 09:30:43 +02:00
riccardom 5b02246f4f Partial revert coderabbit added docstrings 2026-06-10 09:07:36 +02:00
riccardom 1d94513520 Fixes Rosenpass left disable after MDM unlock 2026-06-09 19:45:47 +02:00
riccardom 5777a4091c exclude MDM profile adminstrated keys data from debug bundle 2026-06-09 19:45:47 +02:00
riccardom 43ce85fbfe nil,nil is no policy and no error. Allow it 2026-06-09 19:45:47 +02:00
riccardom 1f3e5a2ace nil,nil is no policy and no error. Allow it 2026-06-09 19:45:47 +02:00
riccardom bd9fed41ad Add docstrings to mdm_integration 2026-06-09 19:45:47 +02:00
riccardom d7f00b3beb Linting 2026-06-09 12:45:50 +02:00
riccardom d806f25b33 CI fixes
- Add docstrings to `mdm_integration`
- refactor for cognitive complexity
- mod tidy
2026-06-09 12:15:49 +02:00
riccardom 46602e4176 [PROVISIONING] ADMX/ADML/PS/bash scripts/templates 2026-06-09 09:21:03 +02:00
riccardom b09a07023a Tests MDM config reload via ticker 2026-06-08 18:06:02 +02:00
riccardom 61b5b6b1a1 Introduces support for darwing plist loading 2026-06-08 18:06:02 +02:00
riccardom b8818adc41 Adds dep for reading plist files 2026-06-08 18:06:02 +02:00
riccardom 83430c39e4 [UI] Fix for "hide" not working when propagating to parent with children 2026-06-08 18:06:02 +02:00
riccardom 47d438976e Pins feat profile retrieval to notif event 2026-06-08 18:06:02 +02:00
riccardom 3bef0fec5b [UI] Removes --disable-advanced-settings 2026-06-08 18:06:02 +02:00
riccardom be3fe6edd6 [PROTO] Removes --disable-advanced-settings 2026-06-08 18:06:02 +02:00
riccardom 04998f6a1c Removes --disable-advanced-settings
It was a typo in our meetings. the actual thing is --disable-update-settings
2026-06-08 18:06:02 +02:00
riccardom e55b64f2f7 Fixup: MDM wins. always 2026-06-08 18:06:02 +02:00
riccardom d6780522ea [UI] Aligns to "enable/disable once on change only" 2026-06-08 18:06:02 +02:00
riccardom 01a4c245a7 Enforces disable networks 2026-06-08 18:06:02 +02:00
riccardom 6355a24deb [UI] Fixup for profile enable/disable toggle
We need to align the initial state to evaluate the delta in case.

The initial state has to be "true" since the profile starts visible.
Then we receive MDM and transition the cache bool value to the actual
MDM imposed state
2026-06-08 18:06:02 +02:00
riccardom 3d4240b979 [UI] Fixup for preshared key 2026-06-08 18:06:02 +02:00
riccardom 2be7ef4929 [UI] Fixup advanced Settings 2026-06-08 18:06:02 +02:00
riccardom 6509174400 Evaluate disable-update-settings errors only when there's an actual override 2026-06-08 18:06:02 +02:00
riccardom b200f47e6d Adds Gate Login as well when --disable-update-settings=true is given to service
This commit tries to settle things with an old PR-4237 which had relaxed
the case where the SetConfig returned an `Unavailable` code error.

Under this circumnstance the PR allowed the upFunc to just emit a warning and
progress further with the login gRPC. Since the login call is consuming
the --management-url coming from the `up` command, it might be possible
to abuse the "Unavailable" code to inject a management URL that is different
from the configured one even though the --disable-update-settings is set
to true (?)
2026-06-08 18:06:02 +02:00
riccardom 1b477d39a8 Adds support for disabling of Profiles and UpdateSettings feature flags 2026-06-08 18:06:02 +02:00
riccardom 7570c5c911 Toggle gray in/out for Advanced Settings 2026-06-08 18:06:02 +02:00
riccardom bf8c8b0ea3 Apply MDM locks 2026-06-08 18:06:02 +02:00
riccardom 362efb832c Fixup presharedkey 2026-06-08 18:06:02 +02:00
riccardom 1543d43a20 Advanced Settings locking 2026-06-08 18:06:02 +02:00
riccardom cee17ebc36 Lock toggle Settngs 2026-06-08 18:06:02 +02:00
riccardom aab1a3e150 UI behavior conflicts relaxation
UI sends full config snapshot with all values. It doesn't
make sense to block it if the values are aligned with the
values constrained by the MDM policy. It's just simplier
to allow values that are compliant. (this goes for the CLI
as well at this point)
2026-06-08 18:06:02 +02:00
riccardom 1100cea6a4 Add events to resync UI to actual config
This also provide fixup for UI no aligning to changed config when coming from cli up with config flags.
2026-06-08 18:06:02 +02:00
riccardom 029e69279c Publishes event for UI to sync upon MDM changes 2026-06-08 18:06:02 +02:00
riccardom c759aed3a3 Adds also up/start after cancel 2026-06-08 18:06:02 +02:00
riccardom c36bf3a171 Adds MDM 1m diff checker & reloader 2026-06-08 18:06:02 +02:00
riccardom 08966adf30 Adds debug config cobra command
This can be useful for troubleshooting and checking config
now that its resolution is not trivial

defaults > config > env cars > CLI/UI > MDM
2026-06-08 18:06:02 +02:00
riccardom 0db22debaf Prefix every log with MDM 2026-06-08 14:37:10 +02:00
riccardom 0594f76655 Adds some log 2026-06-08 14:37:10 +02:00