GuardSQL v0.4.0¶
Released: 2026-10-23
This is a security release. A policy compiled from an authorization decision that allows nothing now denies every query instead of leaving the query unrestricted, and joined entities are checked against the entity allowlist.
Security¶
authz.PolicyFromDecisioncopied a decision's allowlists into aPolicy, where an emptyAllowedEntitiesorFieldsmeans "no restriction". A decision that granted a principal nothing therefore produced a policy that allowed every entity and field the schema exposes. The policy now setsStrictAllowlists, so nothing granted means nothing allowed.CheckPolicychecked only theFROMentity againstAllowedEntities, so a query could join an entity the policy did not allow. Joined entities are now checked the same way.CheckAnalysisPolicyalready covered them.
Added¶
Policy.StrictAllowlistsmakesAllowedEntitiesandFieldsstrict allowlists even when empty: an unlisted entity is refused, and an entity without aFieldsentry has no usable fields.
Upgrade Notes¶
- Policies built with
authz.PolicyFromDecisionare strict. A decision must list every entity, and the fields of each, that the principal may use. - A
Policybuilt by hand keeps the previous meaning of empty allowlists; setStrictAllowlistswhen it comes from an authorization result. - Queries joining an entity outside a non-empty
AllowedEntitiesare now refused byCheckPolicy.
Documentation¶
- The policy guide explains empty allowlists and
StrictAllowlists. - The authorization guide points to SystemForge's
authzguardsqladapter.