Release v20.56.0
Summary
Two additions in this release: opt-in support for the HTTP QUERY method (RFC 10008) for Arc queries, and a sanctioned server-side path for executing [Roles]/[Authorize] commands from non-HTTP (background) code. Both are additive — GET remains the default query transport, and HTTP request authorization is unchanged.
Added
- Queries can now be invoked with the HTTP
QUERYmethod (RFC 10008), sending arguments, paging and sorting as a JSON request body instead of the URL query string — useful for large or sensitive query arguments that don't belong in a URL. [QueryHttpMethod]attribute on a read model or a static query method declares the client transport in C#; it flows through proxy generation so the generated proxy uses that method by default (a method-level attribute overrides a read-model-level one).- On the client, opt in per query with
query.setHttpMethod(QueryHttpMethod.Query), globally withGlobals.queryHttpMethod, or withQueryHttpMethod.Autowhich prefersQUERYand falls back toGET(remembering the outcome per backend). Globals.queryHttpMethodResolverfor choosing the transport per request, with a built-inlengthBasedQueryHttpMethodpolicy that keeps short queries onGETand prefersQUERYonly when the URL would exceed a threshold.ArcOptions.GeneratedApis.EnableQueryHttpMethod(defaulttrue) to disable theQUERYendpoints and restrict queries toGETonly.ISystemExecutionfor executing[Roles]/[Authorize]commands from server-side or background code (reactors, hosted services, sagas, command-to-command) as a trusted system actor carrying named roles, via an explicitusing systemExecution.AsSystem(...)scope.[ExecuteCommandsAsSystem]attribute to run a reactor's returned commands under declared roles automatically — opt-in; reactors without it are unchanged.
Changed
- Every generated query endpoint now also accepts the
QUERYmethod alongsideGET; theGETbehavior is unchanged. The OpenAPI/Swagger document notes theQUERYoption on each query operation. [Roles]/[Authorize]commands can now be authorized from non-HTTP callers through the new server-side execution scope. HTTP requests are unaffected — the request principal stays authoritative and request data can never enter the scope.