andreas-kreuzenbeck commented on PR #2978:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2978#issuecomment-7219741965

   Thanks for this change. I believe the origin replacement may have an 
unintended side effect when the Management Console connects to a **central, 
standalone Data Index** serving multiple process runtimes.
   
   ### Setup
   
   - Management Console: `http://localhost:18280`
   - Central Data Index: `http://localhost:18180`
   - Process runtime: `http://kogito-runtime.test:8080`
   - The Console connection URL is `http://localhost:18180`, because the 
runtime does not expose the Data Index GraphQL API.
   
   The Data Index returns a task `endpoint` pointing to the process runtime. 
However, the Console replaces its origin with the connection URL:
   
   ```text
   Expected: http://kogito-runtime.test:8080/persons/ChildrenHandling/schema
   Actual:   http://localhost:18180/persons/ChildrenHandling/schema
   ```
   
   The actual request returns **404**, because the schema endpoint belongs to 
the runtime, not the Data Index. The Console therefore cannot display the task 
form.
   
   The same origin transformation is also applied when submitting task 
transitions. I have not independently tested the resulting transition request.
   
   ### Possible cause
   
   Before this commit, the Management Console's task provider used the original 
task endpoint. This commit passes `transformEndpointBaseUrl` to the task 
provider, replacing the endpoint origin with the Console connection origin. The 
behavior is still present in KIE 10.2.0.
   
   I understand why this transformation is useful when the Console connects 
**directly to a runtime** whose advertised address is not browser-accessible. 
In the central Data Index scenario, however, the connection URL and the task's 
runtime URL refer to different services.
   
   Would it make sense to make the origin replacement configurable, so that the 
Console can use the indexed task endpoint directly when connected to a central 
Data Index? This would still require browser-accessible runtime URLs, CORS and 
appropriate authentication.``


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to