Docs / Reference

Policy file

pql.policy.yaml holds the application-wide choices, so changing a suite or switching off legacy verification is a config change, not a code change.

01Example

pql.policy.yaml
suite: PQL-DEFAULT       # PQL-DEFAULT | PQL-HIGH | PQL-CNSA
legacy: verify-only      # verify-only | deny
rotate_every: 90d
cbom: ./cbom.json
fips: false

02Fields

FieldDefaultMeaning
suitePQL-DEFAULTSuite for new keysets
legacyset it explicitlyverify-only lets legacy.verifyJwt read old RS256 and ES256 tokens during migration; deny refuses them
rotate_everynoneThe rotation interval the application commits to, for example 90d
cbomnonePath to the CycloneDX CBOM that records accepted findings
fipsfalseReserved for FIPS mode, which requires the engine's FIPS 140-3 mode in review

03Loading

const p = policy.load();                  // reads ./pql.policy.yaml
keyset.create('seal', { suite: p.suite });
p = policy.load("pql.policy.yaml")
keyset.create("seal", suite=p.suite)
p, err := policy.LoadFile("pql.policy.yaml")

The parser is strict: unknown fields and invalid values are errors, raised as PolicyError in Python and pql.ErrPolicy in Go.

pqlock v0.1.0 · unaudited preview · source of truth: spec/