#1 2025-05-22 11:34:52

youssef
Member
Registered: 2024-08-05
Posts: 19

Authentication Failed (403 – Invalid Signature)

Authentication Failed (403 – Invalid Signature) When Switching from SQLite3 to PostgreSQL
Hello,

I'm encountering an issue with mORMot when switching the backend database from SQLite3 to PostgreSQL. The application uses TRestHttpClient to connect to the server and defines services using the following pattern:

HttpClient.SetUser('MyUser', 'MyPassword');
HttpClient.ServiceDefine([IMyServiceInterface], sicShared); // Error displayed here
HttpClient.Services[IMyServiceInterface].Get(MyServiceInstance);

This setup works flawlessly when the server uses SQLite3 as its database engine. However, when I change the backend to PostgreSQL, I get the following error:

403 Forbidden: Authentication Failed - Invalid signature (0)
TServiceFactoryClient.Create(): IMyServiceInterface not supported by server

Additional Details:
The exact same code and model are used in both cases

No changes were made to the interface, service registration, or authentication logic

The user credentials are correct and worked previously

The issue appeared after switching the backend database engine only

The error appears at the ServiceDefine(...) call


What I've Checked:
PostgreSQL server is running and reachable

The schema appears correct, including the authuser table

The SetUser(...) call returns true (or was returning previously)

Everything works again if I switch back to SQLite

Offline

Board footer

Powered by FluxBB