Greetings, all!
My team’s use case is bidirectional communication (more precisely, we’re designing two “pushing” REST APIs) between Corteza and a second app that supports REST. On the Corteza side, I’d prefer to use Sink Routes as they’re secured with signatures. We don’t need anything much more sophisticated than that, as this bidirectional communication will be happening server-side.
To test this Corteza functionality, I spun up a v2023.9.8 container (as service server
in a Docker Compose config), added myself as a user, and created a completely generic Sink signature with the following CLI call:
docker compose exec server corteza-server sink signature
I then created a workflow that was set to trigger on “onRequest” events of the “System” resource; no constraints. A screen grab of the workflow is below:
With all that configured, trying to trigger the Sink with a curl
call results in an HTTP 200, but an error message in the resulting JSON:
$ curl -v http://localhost:80/api/system/sink/toyendpoint?__sign=[REDACTED]
* Trying 127.0.0.1:80...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /api/system/sink/toyendpoint?__sign=[REDACTED] HTTP/1.1
> Host: localhost:80
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Vary: Origin
< Vary: Origin
< X-Request-Id: 101cac61107c/SEoisGvJtd-001467
< Date: [REDACTED]
< Content-Length: 51
<
{"error":{"message":"sink request process error"}}
* Connection #0 to host localhost left intact
And in the Docker Compose log, Corteza server only reports the following:
server-1 | [REDACTED] DEBUG actionlog {"timestamp": [REDACTED], "requestOrigin": "api/rest", "requestID": "101cac61107c/SEoisGvJtd-001467", "actorIPAddr": [REDACTED], "actorID": "0", "resource": "system:sink", "action": "request", "severity": 0, "error": "sink request process error", "description": "", "policy-match": true, "meta": {"sinkParams":null}}
What am I missing from the sink config? As I’ve understood the documentation I’ve read, this workflow should fire on any sink call using the wide-open sink signature.