cloud.policy setting on, PMG applies the cloud policy of your tenant: its block entries, its trust entries and its dependency cooldown. Your security admin changes the policy in SafeDep Cloud, and PMG gets the change with no new config on each machine.
The cloud policy needs the SafeDep Cloud Team or Enterprise plan. See pricing. Without
cloud.policy, PMG works as before and blocks malicious packages with no account.Turn on the cloud policy on one machine
pmg cloud loginstores the tenant ID and an API key of the tenant. PMG can also read them from theSAFEDEP_TENANT_IDandSAFEDEP_API_KEYenvironment variables.cloud.policyapplies only whencloud.enabledistrue.pmg cloud syncfetches the policy at once.pmg config setaddscloud.policyto a config file that an older PMG wrote. If the command printskey not found, the file has nocloudsection. Runpmg setup installto add the missing keys of the PMG template to your config file, then runpmg config setagain. You can also add the key by hand withpmg config edit.
Turn on the cloud policy with MDM
On an endpoint with a managed config file, users cannot change the PMG config. Set both keys in the managed config file:cloud.policy: false in the managed config file. Under global_lockdown: true, the cloud policy does not change a key that the managed config file sets. So keep each key that the cloud policy must manage out of that file. See Deploy PMG with MDM.
What PMG fetches
PMG fetches the resolved policy of the endpoint. It holds the package rules that apply to the endpoint and the dependency cooldown. PMG sends the labelsreported/os and reported/arch with each fetch, so a policy override can select endpoints by operating system or CPU architecture.
PMG fetches the policy in the background after each command, also after a command that PMG blocked. It fetches at most once every 5 minutes, also when cloud.auto_sync.enabled is false. pmg cloud sync fetches at once. The persistent proxy applies a new policy with no restart.
PMG keeps the policy in the cloud-policy/ folder of its config folder. Under sudo, PMG reads the cache of the user who ran sudo first.
On a short-lived CI runner, run pmg cloud sync before the first install. A new runner has no cache, so it applies only the PMG config until the first fetch.
Offline and failed fetches
PMG never drops the cloud policy because it is offline. It keeps the last policy that it applied until a newer one arrives.
A fetch that fails keeps the cache. When you log out, PMG keeps the last policy. PMG drops a trust entry at its expiry, also with no network.
Which settings the cloud policy changes
A trust entry of the policy never skips the malware analysis and never allows verified malware. See Package Rules.
What a block looks like
A block entry of the cloud policy stops the install with a message that names the rule and the revision. This example comes from the PMG tests:cloud.enabled on, PMG syncs each decision of the cloud policy to your tenant. Your security admin can list them with safedep policy decision list. See Explain a Decision.
Known gaps
PMG keeps the policy cache in the folder of the user, so a user can change the cache on a laptop. For each gap of this release, see Cloud Policy Limits.Next steps
Cloud Policy
What the cloud policy controls and who can change it.
Hold Back Newly Published Versions
The dependency cooldown of PMG.
Deploy PMG with MDM
Ship the managed config file to a fleet.
PMG configuration
The config reference in the PMG repository.

