Configuration
The agent reads one file, config.yaml:
| Platform | Path |
|---|---|
| Windows | C:\ProgramData\SofCat\config.yaml |
| macOS | /Library/Application Support/SofCat/config.yaml (root-owned, 0600) |
A change to this file takes effect when the service restarts. The minimum is the repository URL, the machine’s manifest and the catalogs to search:
url: https://example.com/sofcat/manifest: example_manifestcatalogs: - example_catalogManaged settings from MDM or Group Policy override this file key by key, and can replace it entirely. See Managed settings.
Managed settings
Section titled “Managed settings”Most config.yaml keys can also come from managed policy. A managed value
wins over the same key in config.yaml; keys the policy leaves out, or sets
to an empty string or empty list, keep the file’s value. A list replaces the
file’s list whole. When policy supplies url and manifest, config.yaml
is optional.
The service reads policy at the start of every run, so a policy change needs
no restart. It applies from the next run, and a run under way finishes with
the settings it started with. A key you remove from the policy goes back to
the file’s value. A new service_interval applies after the next scheduled
run.
| Platform | Where | Types |
|---|---|---|
| Windows | Values under HKLM\SOFTWARE\Policies\SofCat; branding under its branding subkey |
REG_SZ or REG_EXPAND_SZ (environment variables are expanded) for strings, REG_MULTI_SZ for lists, REG_DWORD for booleans (non-zero is true) |
| macOS | Top-level keys of /Library/Managed Preferences/ca.hrndz.sofcat.plist, delivered by a configuration profile; branding as a branding dict |
string, array of strings, true/false or integer |
A rebranded build reads HKLM\SOFTWARE\Policies\<NAME> and its own
<IDENTIFIER>.plist. Value names are the YAML key names; the registry
matches them case-insensitively. On macOS the plist is ignored unless root
owns it and neither its group nor others can write it.
| Key | Managed |
|---|---|
url, url_packages, manifest, local_manifests, catalogs |
Yes |
verbose, debug, log_file_plain, checkonly, service_interval |
Yes |
tls_auth, tls_client_cert, tls_client_key, tls_server_cert (file paths) |
Yes |
tls_client_cert_store, tls_client_cert_store_field |
Yes |
branding, every key under Customization |
Yes, field by field. See Delivering settings. |
auth_user, auth_pass |
No: ignored with a warning in sofcat.log |
app_data_path, service_name, service_pipe_name |
No: they must match the installed build |
A value of the wrong type is dropped with a warning and the rest of the policy still applies.
The WriteRoots policy lives in the same places; see
Write roots.
On Windows, for example:
$key = 'HKLM:\SOFTWARE\Policies\SofCat'New-Item -Path $key -Force | Out-NullSet-ItemProperty -Path $key -Name url -Value 'https://sofcat.example.com/repo/'Set-ItemProperty -Path $key -Name manifest -Value 'site_default'New-ItemProperty -Path $key -Name catalogs -PropertyType MultiString -Value @('production') -Force | Out-NullNew-ItemProperty -Path $key -Name tls_auth -PropertyType DWord -Value 1 -Force | Out-NullRestart-Service sofcatCredentials
Section titled “Credentials”Policy never carries auth_user or auth_pass. Both policy stores are
readable by every local user, while config.yaml is readable only by SYSTEM
and Administrators (root on macOS).
Basic auth with auth_user and auth_pass gives every machine the same
shared secret, and it ends up in plain text in each machine’s config. We
strongly advise against using it for a repository reachable from the
internet. Use mutual TLS instead:
- Issue each machine its own client certificate, from your MDM’s certificate payload, SCEP or ACME, or your PKI’s enrollment agent. The private key stays on the machine and you can revoke one machine without touching the rest.
- Set
tls_authandtls_client_cert_store, a regular expression that picks the certificate from the machine store:LocalMachine\Myon Windows, the System keychain on macOS. It matches the subject’s common name, or the fieldtls_client_cert_store_fieldnames:issuer(its common name),serialordns_names(any of them). Of the matching certificates SofCat presents the one valid now that expires last, so a renewed certificate replaces the old one at the next run without a restart. The key never leaves the store, so a non-exportable or TPM-backed key works. On macOS the key’s access control must let the daemon use it, since a daemon cannot answer the keychain’s prompt: setAllowAllAppsAccessin the certificate payload of the MDM profile (PKCS #12, SCEP or ACME), or import it by hand withsecurity import -A. Without it the log showsCFError -25308with that advice. - Or point
tls_client_certandtls_client_keyat PEM files. Restrict the key file to SYSTEM and Administrators (root on macOS). tls_server_certis a PEM file of the roots that verify the repository. Leave it out to use the system’s. Policy can set every one of these keys; none is a secret.- Terminate TLS at a reverse proxy or CDN that requires a client certificate from your CA in front of a static repository.
Example files
Section titled “Example files”The repository’s examples/
directory has an annotated file for each format. They are the reference for
every key.
| File | What it shows |
|---|---|
example_config.yaml |
The agent’s config.yaml: repository, credentials, service settings and the branding: block. |
example_manifest.yaml |
A manifest: managed, optional and default installs, updates, uninstalls and conditional_items. |
example_catalog.yaml |
A catalog as makecatalogs writes it: installers, checks, dependencies, action labels and required software. |
example_package-info.yaml |
One item’s package info, the input to makecatalogs. |
placements.yaml |
Placements for zip items. See Zip items. |
zip-items/ |
Two zip items’ sources, item trees and generated package-info files. |
branding/ |
Two logo-banner wordmarks for branding.banner_style: logo: light lettering for a dark or accent banner, dark for a light one. |
brand/ |
A rebrand: your own name, icon, service and installer. See Rebranded builds. |
Branding
Section titled “Branding”The storefront’s name, banner, navigation and behaviour come from the
branding: block in config.yaml or from
managed settings, with no rebuild. To ship SofCat under
your own name, icon, service and installer, build a rebrand. Both are covered
under Customization.
Write roots
Section titled “Write roots”Zip items are placed only under write roots, which the build sets. Policy can
add more, never through config.yaml: on Windows the REG_MULTI_SZ values
Machine and User under HKLM\SOFTWARE\Policies\SofCat\WriteRoots, on
macOS the WriteRoots dictionary in
/Library/Managed Preferences/ca.hrndz.sofcat.plist. See
Write roots.
Conditions
Section titled “Conditions”Items can be limited to machines whose facts match an expression, in a
catalog’s installable_condition or a manifest’s conditional_items. See
Installable conditions.