Signed policy packs
A policy pack is a team’s rules that each person installs once, for every project. It has the same shape as a repository policy (version, deny, review and allow) and comes with an OpenSSH signature. OpenMoat installs a pack only when the signature verifies against a key you trusted.
-
The maintainer signs the pack
Terminal window ssh-keygen -Y sign -f ~/.ssh/id_ed25519 -n openmoat-pack team.yaml # writes team.yaml.sigA pack signature (
-n openmoat-pack) never passes as a repository policy signature, or the other way round. -
Each person trusts the maintainer’s public key, once
Terminal window openmoat policy trust-key alice.pub --name alice@example.comIt prints the key’s fingerprint and trusts the key for packs and repository policies only (the
openmoat-packandopenmoat-repo-policynamespaces), so the same key’s signature on a git commit is never taken as a policy signature. -
Install the pack
Terminal window openmoat policy install team.yaml # the signature defaults to team.yaml.sigopenmoat policy install team.yaml --sig other.sig --name teamopenmoat policy remove team # take it out againA signature that does not verify, or one from a key you did not trust, is refused and nothing is written. Installing a pack again under the same name replaces it.
The pack’s rules show up as pack:<name>:<id>, such as pack:team:no-deploy. Its deny rules join yours, its review rules come before your allow rules, and its allow rules come after yours, so your deny rules still win. Deny and allow rules also reach the agents’ sandboxes at the next openmoat sandbox sync; review rules apply in the hook only.
The installed pack is pinned by the lock: a pack changed after install blocks every call with kernel-integrity until you look. Verification uses the system ssh-keygen (OpenSSH 8.1 or later); without it the three commands refuse and nothing else changes. Agents cannot run them.
Require a signature on repository policies
Section titled “Require a signature on repository policies”With this line in your own policy (openmoat edit), a signature decides whether a repository policy may allow, instead of openmoat trust:
require_signed_repo_policy: true- A repository policy signed by a key you trusted (
.moat/policy.yaml.sigbeside it) has its allow rules applied, withoutopenmoat trust. - An unsigned one, one signed by another key, or one changed after signing gets deny and review only, even after
openmoat trust.
Sign it the same way, in its own namespace: ssh-keygen -Y sign -f ~/.ssh/id_ed25519 -n openmoat-repo-policy .moat/policy.yaml, and commit .moat/policy.yaml.sig with it. Sign it again after every change. Without the setting, which is the default, a signature changes nothing and openmoat trust decides. openmoat status, run in the project, says which applies, for example trusted: signed by alice@example.com.