In workflows, Infomaniak AI works fine as a custom OpenAI credential in OpenAI nodes; however, when using it via the chat hub, requests fail immediately with “The requested resource was not found.”
I know Infomaniak blocks direct browser requests with CORS, so now I am wondering if the chat hub proxies requests made via Chat Hub or if it sends the API key to the browser and makes it from there. That seems like a bad idea and a security issue.
The Chat Hub works fine with providers such as Mistral and Phoenix Technologies, which do not block browser requests.
What is the error message (if any)?
The requested resource was not found.
Please share your workflow
No workflow, it is in chat hub. Workflows work just fine.
Information on your n8n setup
n8n version: Behavior observed on 2.8.3 and 2.9.4
Database: Postgresql
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Hi @wired_n8n_auto If Infomaniak blocks which makes browser originated requests its very possible chat hub is calling the API on client side rather than proxying through the server, this is probably something the n8n team needs to clarify.
Yes, thank you. I am just concerned since I am evaluating n8n for a customer, and it would not fit into their enterprise security concept if API keys are sent to the client. If anyone from n8n clarifies, could you also clarify this is not an issue in the self-hosted business or enterprise versions?
@wired_n8n_auto I am precisely answer that, as this is an enterprise level issue, please consider reaching out to n8n support and raising a ticket there for better information.
Your instinct is right. Chat Hub calls the AI provider directly from the browser, it is not proxied through your n8n server. That is why Infomaniak CORS policy kills it while Mistral does not care. Use a webhook-triggered workflow instead, that runs server-side and sidesteps the whole thing.
I understand, however, obviously the chat interface is a much better user experience than using the workflows. Regardless, n8n should not have released such a dangerous feature without disclosing that the API keys are exposed in the browser. Some orgs might have high spending limits for their API keys. An attacker only has to compromise one client and then could make tens of thousands of dollars worth of API calls without there being any way to trace which client was compromised. I understand the chat hub is still in “beta,” however it is in the stable releases, and it makes me question the enterprise-readiness of n8n as a platform.