Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unreleased

- OIDC logs focus on configuration and failures. SQLPage omits tokens, cookie values, user claims, and callback and logout query strings from OIDC diagnostics.
- Standard alert descriptions have higher text contrast.
- An `alert` without `color` uses the info color again, and its `role` attribute no longer starts with a space. ([#1697](https://github.com/sqlpage/SQLPage/issues/1697))
- New `create_new_text` and `no_results_text` properties on `select` fields translate the dropdown texts "Add …" and "No results found". The row that creates a new value is now announced by screen readers when it is the active option. ([#1699](https://github.com/sqlpage/SQLPage/issues/1699))
Expand Down
4 changes: 3 additions & 1 deletion examples/official-site/sso/single_sign_on.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ When deploying to production:
- **Provider Discovery**: If SQLPage fails to discover your provider's configuration, verify the `oidc_issuer_url` is correct and accessible by loading `{oidc_issuer_url}/.well-known/openid-configuration` in your browser.

### Debugging Tips
- Check SQLPage's logs for detailed error messages. You can enable verbose logging with the `RUST_LOG=trace` environment variable.
- On startup, SQLPage logs the callback URL to register and whether the provider advertises a logout endpoint.
- Look for warnings when a login reaches the retry limit or when a provider metadata refresh fails and SQLPage keeps using cached signing keys.
- To see individual attempts and provider response times, temporarily run SQLPage with `RUST_LOG=info,sqlpage::webserver::oidc=trace`. SQLPage's OIDC diagnostics omit tokens, session cookies, and user claims. SQLPage also omits callback and logout query strings from request traces. Check your reverse proxy's logs separately.
- Verify your OIDC provider's logs for authentication attempts
- In production, confirm your domain name matches exactly in both the OIDC provider settings and `sqlpage.json`
- If [using a reverse proxy](/your-first-sql-website/nginx.sql), ensure it's properly configured to handle the OIDC callback path.
Expand Down
9 changes: 8 additions & 1 deletion src/webserver/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ impl RootSpanBuilder for SqlPageRootSpanBuilder {
let otel_name = request_span_name(request);
let connection_info = request.connection_info();
let request_id = tracing_actix_web::root_span_macro::private::get_request_id(request);
let query = request.query_string();
let query = request
.app_data::<web::Data<AppState>>()
.and_then(|state| state.oidc_state.as_ref())
.map_or(Some(query), |oidc| {
oidc.config.query_for_telemetry(request.path(), query)
});

let span = tracing::span!(
tracing::Level::INFO,
Expand All @@ -377,7 +384,7 @@ impl RootSpanBuilder for SqlPageRootSpanBuilder {
{ otel::CLIENT_ADDRESS } = %request.connection_info().realip_remote_addr().unwrap_or(""),
{ otel::USER_AGENT_ORIGINAL } = %user_agent,
{ otel::URL_PATH } = %request.path(),
{ otel::URL_QUERY } = %request.query_string(),
{ otel::URL_QUERY } = query,
{ otel::HTTP_RESPONSE_STATUS_CODE } = tracing::field::Empty,
"otel.name" = %otel_name,
"otel.kind" = "server",
Expand Down
Loading
Loading