You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add POST /solid_objects/transmit, the engine-mounted ingest that #47
deferred. The route parses the body, authorizes it through the new
authorize_transmission policy, and hands it to Transmission.receive
with the new transmission_actor_type_resolver configuration.
The policy denies by default like the other five, because the ingest
skips authorize_message by design. It receives the parsed envelope
and the controller as authorization_context, so an application can
bind actorType and actorId to the authenticated caller rather than
only compare a shared token. An unauthorized envelope gets 403; a
permanently unappliable one (malformed, unknown type or operation,
oversized, conflicting replay, unparseable body) gets 422, so a
sending outbox dead-letters it instead of retrying forever.
The controller inherits ActionController::API: the endpoint is
token-authenticated machine traffic with no session, which keeps the
Brakeman scan warning-free where a null_session forgery setting does
not. The install generator template gains the policy with a bearer
token example, and the generator test pins six deny-by-default
policies.
Verified live in a scratch Rails app: 403 without or with a wrong
token, 200 with the token, 422 for malformed and unparseable bodies,
and the effect worker delivering through the engine route end to end
with the configured actor type resolver.
0 commit comments