Conversation
…nd the policy source In a guarded environment, the OPAL scope data sources and the proxy configs (URL mapping rules) can't be written. In a project with a guarded environment, a request that changes the policy source (activate, disable, create with activate_when_validated, delete of an active repository, PATCH of active_policy_repo_id) is refused. Notes on the data source, URL mapping and GitOps pages link to the Policy Guard page.
✅ Deploy Preview for permitio-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
zeevmoney
left a comment
There was a problem hiding this comment.
Changes requested — 1 HIGH, 1 MEDIUM, 2 LOW.
Blocking:
- HIGH
docs/how-to/policy-guard/policy_guard.mdx:46— the error-code sentence now covers guarded-permission refusals, which returnFORBIDDEN_ACCESS
Non-blocking:
- MEDIUM
docs/how-to/enforce-permissions/url-mapping/url-mapping-check.mdx:58—permit env apply openapiandpermit api create proxypages don't mention the refusal - LOW
docs/integrations/gitops/github.mdx:157— the short notes say to remove the project from the scope, but not to add it back - LOW
docs/how-to/policy-guard/policy_guard.mdx:44— the way out names only "the project", but a repository delete is checked against every project that uses it
Details are in the inline comments on each line.
…ll way out The POLICY_GUARD_PROTECTED sentence names the refusals that carry it; a refused change to a guarded permission has FORBIDDEN_ACCESS. permit env apply openapi and permit api create proxy get the same 403 on a guarded environment. Each note gives the full way out (remove the project from the scope, make the change, add it back), and a repository delete names every project that uses the repository.
|
@zeevmoney all four are fixed in
|
zeevmoney
left a comment
There was a problem hiding this comment.
Approved — no CRITICAL or HIGH issues found.
Non-blocking:
- MEDIUM
docs/how-to/policy-guard/policy_guard.mdx:46— most permissions403responses have no error code, so "the same code as any other permissions403" is wrong
All four findings from the previous review are fixed (replies on each thread).
Details are in the inline comments on each line.
A plain permissions 403 carries no error code, so the guarded-permission refusal is told apart by FORBIDDEN_ACCESS, not POLICY_GUARD_PROTECTED, rather than compared with it.
|
@zeevmoney fixed in |
Summary
PUTandDELETE …/opal_scope) and URL mapping rules (POST,PATCHandDELETE …/proxy_configs) answer403 Forbiddenwith the error codePOLICY_GUARD_PROTECTED, for every caller allowed to make the request.GETstill works.403: activating another repository, disabling the active one, creating a repository withactivate_when_validated: true, deleting a repository that a project with a guarded environment uses, and a projectPATCHthat changesactive_policy_repo_id.permit api create proxy,permit env apply openapi(its URL mappings) andpermit gitops create github.Merge this after the matching backend release reaches production.
Changes
docs/how-to/policy-guard/policy_guard.mdxPOLICY_GUARD_PROTECTED(environment record, data sources, URL mapping rules, policy source, project and organization delete), and says a refused guarded permission carriesFORBIDDEN_ACCESS.docs/how-to/manage-data/use-external-data-source.mdx403in a guarded environment.docs/how-to/enforce-permissions/url-mapping/regex-url-mapping-check.mdx403in a guarded environment.docs/how-to/enforce-permissions/url-mapping/url-mapping-check.mdxdocs/integrations/gitops/github.mdx403when the project has a guarded environment.docs/how-to/permit-cli/permit-cli-gitops.mdxpermit gitops create githubwithout--inactivefails with the403on such a project; with--inactive, the later activation does.docs/how-to/permit-cli/permit-cli-api.mdxpermit api create proxy: Permit refuses the proxy configuration with the403in a guarded environment.docs/how-to/permit-cli/permit-cli-policy.mdx403; the command still creates the policy objects, then prints the mapping error.Checks
node scripts/check-relative-links.mjsandnode scripts/check-private-paths.mjspass.^2.7.1range inpackage.json) reformats each changed file exactly as much as it reformatsmaster's copy: the new lines add nothing to format.#how-permit-applies-a-policy-guardis an explicit anchor on the Policy Guard page. The fullnpm run build(withhyperlink --check-anchors) runs in the Netlify deploy preview.Description updated during review to match 30f25c6 (added the two Permit CLI pages to Summary and Changes, and the scoped error-code paragraph).
🤖 Generated with Claude Code