diff --git a/client/mdm/policy.go b/client/mdm/policy.go index f072d3485..f469c03fa 100644 --- a/client/mdm/policy.go +++ b/client/mdm/policy.go @@ -20,7 +20,6 @@ import ( // configuration field. const ( KeyManagementURL = "managementURL" - KeySetupKey = "setupKey" KeyDisableAdvancedSettings = "disableAdvancedSettings" KeyDisableUpdateSettings = "disableUpdateSettings" KeyDisableProfiles = "disableProfiles" @@ -42,7 +41,6 @@ const ( // configuration are ignored but logged. var AllKeys = []string{ KeyManagementURL, - KeySetupKey, KeyDisableAdvancedSettings, KeyDisableUpdateSettings, KeyDisableProfiles, @@ -62,7 +60,6 @@ var AllKeys = []string{ // SecretKeys lists keys whose values must be redacted in logs. var SecretKeys = map[string]struct{}{ - KeySetupKey: {}, KeyPreSharedKey: {}, } diff --git a/client/mdm/policy_test.go b/client/mdm/policy_test.go index 70bbac85f..d7632e786 100644 --- a/client/mdm/policy_test.go +++ b/client/mdm/policy_test.go @@ -37,7 +37,7 @@ func TestPolicy_HasKey(t *testing.T) { assert.False(t, p.IsEmpty()) assert.True(t, p.HasKey(KeyManagementURL)) assert.True(t, p.HasKey(KeyDisableProfiles)) - assert.False(t, p.HasKey(KeySetupKey)) + assert.False(t, p.HasKey(KeyPreSharedKey)) } func TestPolicy_ManagedKeysSorted(t *testing.T) { @@ -54,7 +54,7 @@ func TestPolicy_GetString(t *testing.T) { p := NewPolicy(map[string]any{ KeyManagementURL: "https://corp.example.com", KeyDisableProfiles: true, // wrong type for GetString - KeySetupKey: "", // empty rejected + KeyPreSharedKey: "", // empty rejected }) v, ok := p.GetString(KeyManagementURL) assert.True(t, ok) @@ -63,7 +63,7 @@ func TestPolicy_GetString(t *testing.T) { _, ok = p.GetString(KeyDisableProfiles) assert.False(t, ok, "non-string value must not be reported as string") - _, ok = p.GetString(KeySetupKey) + _, ok = p.GetString(KeyPreSharedKey) assert.False(t, ok, "empty string treated as unset") _, ok = p.GetString("nonexistent")