Claus Ibsen created CAMEL-26197:
-----------------------------------

             Summary: camel-openfga - batchCheck with a Map body splits its 
toString and fails with HTTP 400, and listRelations returns the relations in a 
different order each call
                 Key: CAMEL-26197
                 URL: https://issues.apache.org/jira/browse/CAMEL-26197
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of openfga (CAMEL-24961, PR #28416).

h4. 1. batchCheck with a Map body fails the whole exchange with HTTP 400

{{OpenFgaProducer.bodyAsList}} (main 2a465aa4814c, line 681 to 695) takes a 
Collection body as the objects, otherwise converts the body to text and splits 
it on commas. A Map body is split from its toString (relation=reader, 
user=user:dan, ...) and the pieces are sent as objects, so OpenFGA answers HTTP 
400 and the exchange fails. Checked on 4.24.0-SNAPSHOT with OpenFGA v1.22.0 
from test-infra (docker).

Proposed: reject a Map body with a clear error (or read the objects from a 
known key).

h4. 2. listRelations returns the relations in a different order each call

{{OpenFgaProducer.listRelations}} (line 279 to 281) sets the relations as the 
SDK returns them; the SDK runs the checks in parallel, so the List order 
changes from call to call. Checked on 4.24.0-SNAPSHOT with OpenFGA from 
test-infra.

Proposed: return the relations in the order of the configured relations option.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to