Repository navigation
v0.13.0
·
12 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Upgrade notes
- Redacted JSON plans also redact comments and role configuration values.
pgroles diff --format json(single manifests andpgroles.bundle_plan.v2bundles) previously replaced only password values. It now also replaces role comments andconfigvalues with"[REDACTED]", as--format markdowndoes; keys and shape are unchanged.--format sqlstill prints comments and configuration values and never prints password values. Read comment and configuration values from the manifest rather than fromdiffJSON. (#236) pgroles-corehas a defaultpasswordsfeature. It gates thescrammodule,diff::resolve_passwords,diff::inject_password_changes, and their SCRAM dependencies. Default builds are unchanged. Crates that setdefault-features = falsemust enablepasswordsto keep these APIs; parsing, planning, SQL rendering, visualization, authoring, and review artifacts remain available without it. (#236)- Browser authoring endpoints limit policy YAML to 1 MiB.
authoring::validate_policyandauthoring::compile_policyreturn apolicy_too_largediagnostic aboveauthoring::MAX_POLICY_YAML_BYTES, and the explorer'sanalyzeapplies the same limit.pgroles validate,diff, andapply, bundles, the operator, andauthoring::prepare_policyhave no byte limit; manifest entry bounds still apply everywhere. Rust code that matchesManifestErrorexhaustively needs an arm for the newYamlTooLargevariant.pgroles_cli::ValidatedManifestis now an alias ofauthoring::PreparedPolicy, with the same fields. (#236, #241) - New
diffreview flags need this release.--review-out,--target-label,--policy-commit, and--executor-roleare usage errors in 0.12.0 and earlier, and usage errors exit with code 2 like drift. Pin the image or binary version in CI jobs that use them, and accept exit code 2 as drift only when the review file was written, as the updated PR-comment recipe does. (#236, #241) - Routine grant targets are resolved during inspection. An
ensure: presentrule for a function or procedure that does not exist, a bare name that matches several overloads, or a named-argument signature spelled differently from the catalog now fails inspection of that policy, listing the input-type signatures to use; the operator reportsInvalidRoutineTarget. Previouslydiffplanned aGRANTthat failed on apply.pgroles generatenow writes input-type signatures such asprocess(integer); policies generated by earlier versions keep working. (#239)
Added
- Plan explorer. The documentation site has a browser explorer that shows a policy's ordered plan, executor authority, and findings against a sanitized snapshot, and opens
diff --review-outfiles, without connecting to a database. (#236, #241) pgroles diff --review-outwrites a sanitized recorded review from the same inspection and planning run as the normal output, with any--format. The file records the ordered changes, bundle attribution, SQL preview, phase authority, findings, lifecycle-managed scope (external: trueroles excluded), tool and PostgreSQL versions, capture time, policy content digest, and preflight evidence that names the targeted checks performed and the changes they did and did not cover.--target-labelnames the environment and rejects values containing://;--policy-commitrecords the source revision;--executor-rolerecords an intended executor without verifying it. Password values, role configuration values, and comments are omitted with explicit omission records, and the whole SQL preview is omitted when any change carries them. The artifact never readspassword.from_envvariables. (#236, #241)- Review fingerprints link reports to files. With
--review-out, the Markdown report ends with the artifact's review fingerprint, and stderr prints the file path and the same fingerprint. If the file cannot be written,diffstill prints the report, then exits with code 1, including with--no-exit-code. (#241) - Policy authoring API.
pgroles_core::authoring::prepare_policyis the parse, expansion, and normalization step shared by the CLI and explorer.validate_policyandcompile_policyaccept a versionedPolicyRequest(pgroles.policy.v1) and return structured diagnostics with stable codes, manifest field paths, and syntax byte ranges; compilation also returns the expanded policy and normalized desired graph. Neither resolves password sources.diff::plan_changesis the canonical planner for retirements, reconciliation mode, external roles, and preserved grants, shared by the CLI, operator, and explorer. (#236) - Review artifact contract.
pgroles_core::review_artifacttypes implementDeserializeandJsonSchema, andparse_review_artifactchecks the size limit, schema version, change-index partition, reachability deltas, and fingerprint. The JSON Schema is generated todocs/public/generated/review-artifact.schema.jsonand served with the documentation. (#241) - Row-level security lesson. The Acme PostgreSQL course adds an advanced lesson between membership mechanics and the security review. Its labs use PostgreSQL to demonstrate default deny, tenant row visibility, rejected writes, owner and
FORCEbehaviour, bypass roles, and policy composition. Six cumulative chapter policies preserve earlier access. (#236)
Changed
diffno longer computes password verifiers. Everydiffformat redacts password values, so plans carry declared password intent.sql,json, andsummarystill fail when a declaredpassword.from_envvariable is unset;markdowndoes not read them. Output is unchanged. (#241)- Documentation navigation separates Docs, Learn PostgreSQL, and Explorer. A canonical page registry drives sidebars, breadcrumbs, and reading sequences; product docs are grouped by task; the homepage routes to trying pgroles, adopting a database, and reviewing a plan. New planning and recorded-review guides replace sections of the CI/CD guide, whose anchors keep working. (#237)
Fixed
- Routine grants no longer churn on equivalent signatures. Function and procedure grants are keyed by input types across inspection, planning, export, and revoke preflight, so
process(integer)and the catalog'sprocess(job_id integer)no longer produce a grant followed by a revoke of the same routine. PostgreSQL type aliases such asint2resolve to one target, and opposite present and absent rules for that target fail before apply. (#239)
Documentation
- The documentation site has full-text search across Docs and Learn PostgreSQL, a mobile "On this page" menu, linked breadcrumbs, and a footer naming the source commit and latest release. (#238)
- The PR-comment CI recipe pins an image version that supports
--review-out, runs the container as the runner user so it can write into the workspace, removes stale review files, and accepts exit code 2 as drift only when the review file exists. It reads the report as data rather than interpolating it into JavaScript, uploads both files, and bounds comment size. A documentation test runs the recipe against a stubbed container. (#236, #241) - Correct the Acme course's reset-sensitive instructions, evidence cards, membership direction and options,
ADMINself-grant implications, creator-specific default privileges, and multi-database retirement guidance. Capstone repairs are optional challenges. (#236) - The
pgroles-policyskill documents the recorded-review workflow and links to the published documentation instead of repository paths, which are absent from release archives. (#236, #241)