Problem/Motivation

Composite-child entities (paragraphs) cannot be created over JSON:API at all: the paragraphs module's access handler allows creation only when the request format is HTML (entity-form context) and returns neutral for every API format, which collapses to 403. An MCP agent following the standard create-then-reference flow therefore cannot build paragraph-based pages, even when its policy profile allows writes. This is upstream design, not a defect — standalone creation has no host to derive access from — but the governed agent channel supplies exactly the policy context that is missing.

Proposed resolution

When a request is governed and the resolved policy profile permits writes for the entity type, MCP Sentinel's create-access hook grants (rather than stays neutral on) creation of composite-child entity types — those declaring entity_revision_parent_type_field. Scope is deliberately narrow: non-composite entity types keep their existing neutral/forbidden semantics so core role permissions still decide them; ungoverned traffic is untouched; denied entity types and the write gate still forbid first. A standalone composite child is inert until a host references it, and the referencing host save runs the full governance stack (publish gate, composite redirect, write preconditions).

Acceptance criteria

- A governed request whose profile allows writes can create a paragraph over JSON:API.
- The write gate and denied_entity_types still forbid composite creation when policy says no.
- Ungoverned requests keep the upstream neutral behavior (no change for ordinary traffic).
- Non-composite entity types keep their existing create semantics.
- Kernel tests cover the grant, both denial paths, the ungoverned pass-through, and a non-composite control, exercising the real paragraphs access handler in an API request context.

API changes

McpAccessChecker::checkCreateAccess() learns the composite-child grant; no new configuration.

Comments

jmcerda created an issue. See original summary.

jmcerda’s picture

Status: Active » Needs review

Implementation is up for review on the public working mirror: https://github.com/Wilkes-Liberty/mcp_sentinel/pull/123 — the grant applies only to composite (revision-parented) entity types after every existing gate passes; non-composite types, ungoverned traffic, and the denial paths are unchanged. Five kernel tests against the real paragraphs handler in an api_json context; full suite 504 tests / 4438 assertions green.

  • jmcerda committed 687d29ab on 1.x
    Issue #3616669: Use the spelling the dictionary accepts
    

  • jmcerda committed 4adfc14a on 1.x
    Issue #3616669: Grant governed composite-child creation on the agent...
jmcerda’s picture

Status: Needs review » Fixed

Merged to 1.x (https://github.com/Wilkes-Liberty/mcp_sentinel/pull/123). The governed composite-child creation grant ships in the next release; the mirror branch and git.drupalcode.org are in sync.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.