Replies: 4 comments 4 replies
-
|
Hi ! Thank you very much for reporting this. Let's try to debug this. Could you please confirm first that 0.42 and 0.43+ were tested under the exact same conditions: same Azure deployment, same hostname, same reverse proxy, same Microsoft Entra app registration, same redirect URI, from the same server and around the same time? Then could you please send privately (to contact @ ophir.dev):
LOG_LEVEL=sqlpage::webserver::oidc=debug,sqlpage=info,sqlpage::access=infoThe most useful lines are around:
The HAR and debug logs can contain sensitive cookies, authorization codes, or tokens. Please do not post these publicly. If you understand how to triage them, you can post the raw censored logs here, otherwise send them privately to contact@ophir.dev if they contain sensitive information. We are especially looking for whether the network trace repeats this pattern: / -> Microsoft login -> /sqlpage/oidc_callback -> / -> Microsoft login -> ... or whether one request, especially /sqlpage/oidc_callback, remains pending or returns an error. |
Beta Was this translation helpful? Give feedback.
-
|
We tried to reproduce this with Microsoft Entra ID and the official GitHub release binaries, but we could not reproduce the failure: both So this does not look like a simple parameter rename or a universal Entra ID regression in If you collect a HAR or verbose OIDC logs, please do not paste secrets, authorization codes, cookies, access tokens, or ID tokens publicly. You can send sensitive files privately to Local Entra repro we ranWe used a local repro, not a source build. Release artifacts:
Entra app setup:
SQLPage config used, with secrets redacted: {
"listen_on": "127.0.0.1:8080",
"database_url": "sqlite:///private/tmp/sqlpage-entra-repro/sqlpage.db?mode=rwc",
"content_security_policy": "",
"host": "localhost:8080",
"site_prefix": "/",
"oidc_issuer_url": "https://login.microsoftonline.com/<tenant-id>/v2.0",
"oidc_client_id": "<application-client-id>",
"oidc_protected_paths": ["/"]
}The client secret was passed through the environment: SQLPAGE_OIDC_CLIENT_SECRET='<redacted>'Minimal select 'text' as component, 'OIDC login worked' as contents;Run shape: RUST_LOG='sqlpage::webserver::oidc=debug,sqlpage=info,actix_web::middleware::logger=info' \
LOG_LEVEL='sqlpage::webserver::oidc=debug,sqlpage=info,sqlpage::access=info' \
SQLPAGE_OIDC_CLIENT_SECRET='<redacted>' \
./sqlpage.bin \
--web-root /private/tmp/sqlpage-entra-repro/web \
--config-file /private/tmp/sqlpage-entra-repro/config/sqlpage.jsonObserved result with
Observed result with
We specifically did not see:
Useful next diagnostics from your environment:
|
Beta Was this translation helpful? Give feedback.
-
|
I found the culprits! From the moment that I used a dynamic component or sqlpage.user_info or run some queries in the homepage index file (its for showing some stats), the query to the homepage never finishes. If I just show a listing of the available SQLPage pages (text and underlying urls), I have no issue and the homepage is processed successfully. Interesting, from the homepage with static content, if I try to open another SQLPage page (with SQL queries inside), the web request hangs as well. For some reasons, any SQL queries inside any sql files will make the browser never finished his request. |
Beta Was this translation helpful? Give feedback.
-
|
No, the Azure SQL connection-string format should not have changed between SQLPage Your latest findings point to something more specific: login seems to work, but the response hangs when SQLPage has to execute real SQL, Could you please run this small test in a non-production copy of your deployment? It should tell us whether the problem is the database query itself, Ngrok, OIDC, or your real page SQL.
select 'text' as component, 'static ok' as contents;
select 'text' as component, db_name() as contents;
"oidc_public_paths": ["/_debug_static.sql", "/_debug_db.sql"]
curl -v --max-time 30 http://127.0.0.1:8585/_debug_static.sql
curl -v --max-time 30 http://127.0.0.1:8585/_debug_db.sql
RUST_LOG='sqlpage=debug,sqlpage::webserver::database=trace,sqlx::query=trace'
LOG_LEVEL="$RUST_LOG"
If any of that contains tokens, cookies, connection strings, SQL contents, or user data, please send it privately to What we checked about the connection stringI checked the SQLPage and database-driver side. SQLPage The Azure-style username containing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using Microsoft Azure with OpenID Connect (OIDC). With version 0.42, everything works flawlessly but from the moment I upgrade to version 0.43 or higher, my homepage (index.sql) never loads and the browser keeps on spinning forever (in Chrome and Edge). I tried clearing my cookies but the issue remains. Did any parameter name changed in version 0.43?
These are the parameters I used in my sqlpage.json:
{
"database_url": "mssql://database_connection_string",
"content_security_policy": "",
"oidc_issuer_url": "https://login.microsoftonline.com/tenant_id/v2.0",
"oidc_client_id": "oidc_client_id_value",
"oidc_client_secret": "oidc_client_secret_value",
"host": "host_url",
"site_prefix": "/",
"oidc_protected_paths": ["/"]
}
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions