Claus Ibsen created CAMEL-27782:
-----------------------------------
Summary: camel-openfga: writeTuples/deleteTuples ignore
authorizationModelId with an injected client, zero timeouts fail late
Key: CAMEL-27782
URL: https://issues.apache.org/jira/browse/CAMEL-27782
Project: Camel
Issue Type: Bug
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-openfga for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31132).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. writeTuples and deleteTuples ignore the endpoint authorizationModelId
with an injected openFgaClient
{{OpenFgaProducer}} calls {{client.writeTuples}} / {{deleteTuples}}; in SDK
0.11.0 their options have no model field, so the model of the client's own
ClientConfiguration is used. {{write}} and the query operations pass the
endpoint model.
Proposed change: use {{client.write(ClientWriteRequest,
ClientWriteOptions.authorizationModelId(...))}}.
h4. 2. readTimeout=0 or connectTimeout=0 fail late
They are validated only for streamedListObjects. Otherwise a zero readTimeout
fails every request ("Could not build the OpenFGA request") and a zero
connectTimeout fails the endpoint start inside the JDK HttpClient builder.
Proposed change: validate both as positive in {{OpenFgaEndpoint.doStart}};
check maxRetries (0..15) there too for a clearer message.
h4. 3. batchCheck does not set CamelOpenFgaStoreId
A successful batchCheck sets {{CamelOpenFgaAllowed}} but not
{{CamelOpenFgaStoreId}}, unlike check.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)