Configuration files
Harbor is configured with a few JSON files. Most settings also have a console page or a cmdlet, which validate the change and record it; edit the files by hand only for settings that have neither.
The files
Section titled “The files”| File | Product | Holds | Page |
|---|---|---|---|
environment.json + environment.local.json |
Both | Tenant profiles: URLs, the service account, sign-in, notifications, console settings. Harbor Health also keeps its check thresholds here. | environment.json and profiles |
naming-standard.json |
Onboard | The safe naming standard. | naming-standard.json |
rbac-map.json |
Onboard | Persona groups, group naming and permissions per safe type. | rbac-map.json |
safe-defaults.json |
Onboard | Safe properties applied at creation. | safe-defaults.json |
policy-rules.json |
Onboard | Governance rules checked before a safe is created. | policy-rules.json |
The shipped files are in each module’s Config folder. None of them contains a
secret.
Where your settings go
Section titled “Where your settings go”Profiles are read in three layers. A later layer wins, profile by profile:
Config\environment.jsonin the module: the shipped template.Config\environment.local.jsonin the module, if present: an older, per-install override.%ProgramData%\Harbor\environment.local.json: the shared override, read by both consoles. Every writer (the setup wizard, Tenant & service account, single sign-on setup,Set-HarborWebLogin,Set-HarborServiceAccount, …) writes here, and moves an older per-install file here on its first write.
The HARBOR_SHARED_CONFIG environment variable moves the shared folder elsewhere
(tests and sandboxes use it); none turns the shared layer off.
The shared folder is protected: Harbor keeps it to SYSTEM, Administrators and the account that created it, and a console refuses to start when anyone else owns or can write it.
Changing a file safely
Section titled “Changing a file safely”- Prefer the console or a cmdlet. Standards (naming, permissions, policy) validates a change, can Preview impact on your existing safes, keeps a backup, and records who changed what in the change history.
- No restart needed. A running console re-reads the configuration within a couple of seconds when a file changes.
- A file that cannot be read (invalid JSON, or held by another program) does not reset anything: the console keeps its last known settings, shows “Harbor could not read its configuration”, and reads again two seconds later.
- Back up
%ProgramData%\Harbor\environment.local.jsonand any standard you changed.
Check a configuration
Section titled “Check a configuration”Test-HarborSetup # loads and validates the configuration, offlineGet-HarborConfigDocument -Name naming # the naming standard as Harbor reads itCovers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
