Skip to content

ak-platform: show error descriptions and request IDs from authentik - #1943

Open
dewi-tik wants to merge 2 commits into
mainfrom
platform/error-request-id
Open

dewi-tik wants to merge 2 commits into
mainfrom
platform/error-request-id

Conversation

@dewi-tik

Copy link
Copy Markdown
Contributor

Error messages from authentik now include the reason and the request ID, so users can pass the ID to their administrator.

error_with_response and the device flow (adding a profile) now turn authentik error responses into a message like:

device token poll failed: invalid_dpop_proof: DPoP proof iat outside acceptable clock skew (request ID 7d1fc4b5…: give this to your authentik administrator)

The reason comes from error_description (OAuth errors) or detail (API errors). The request ID comes from request_id in the body or the X-authentik-id header. Responses from other servers, such as Vault, are shown as before.

Before, adding a profile on a device with a wrong clock only showed device token poll failed: invalid_request. Together with goauthentik/authentik#28225, which returns invalid_dpop_proof with the reason, users see what's wrong.

Not covered: token exchange (ak auth …), which uses the oauth2 crate's error type, and the Renewal failed badge in the app, which doesn't show an error message.

Tested: new unit tests for the message format and for a device flow error; cargo test -p ak-platform, cargo clippy -p ak-platform and cargo check -p ak-agent -p ak-cli pass.

@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.91489% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.27%. Comparing base (f080cb7) to head (572d426).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
ak-platform/src/oauth/device_flow.rs 71.42% 7 Missing and 3 partials ⚠️
ak-platform/src/http.rs 88.13% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1943      +/-   ##
==========================================
+ Coverage   48.16%   48.27%   +0.11%     
==========================================
  Files         222      222              
  Lines       25399    25458      +59     
  Branches    18483    18568      +85     
==========================================
+ Hits        12233    12290      +57     
+ Misses      12847    12846       -1     
- Partials      319      322       +3     
Flag Coverage Δ
rs-e2e-24.04 28.26% <33.92%> (-0.04%) ⬇️
rs-e2e-25.10 8.72% <1.78%> (-0.01%) ⬇️
rs-e2e-26.04 8.72% <1.78%> (-0.01%) ⬇️
rs-macos-26-ak-agent 48.70% <ø> (ø)
rs-macos-26-ak-agent-desktop 0.34% <0.00%> (-0.01%) ⬇️
rs-macos-26-ak-api-cli 100.00% <ø> (ø)
rs-macos-26-ak-api-cli-gen 67.92% <ø> (ø)
rs-macos-26-ak-browser-support 24.58% <ø> (ø)
rs-macos-26-ak-cli 27.20% <ø> (ø)
rs-macos-26-ak-flow-executor 14.81% <ø> (ø)
rs-macos-26-ak-meta 0.00% <ø> (ø)
rs-macos-26-ak-meta-macros 0.00% <ø> (ø)
rs-macos-26-ak-platform 67.20% <81.52%> (+0.63%) ⬆️
rs-macos-26-ak-platform-authz 59.33% <ø> (ø)
rs-macos-26-ak-platform-facts 80.82% <ø> (ø)
rs-macos-26-ak-platform-keyring 83.49% <ø> (ø)
rs-macos-26-ak-platform-serde-policy 90.49% <ø> (ø)
rs-macos-26-ak-sysd 38.65% <ø> (ø)
rs-ubuntu-26.04-ak-agent 48.70% <ø> (ø)
rs-ubuntu-26.04-ak-agent-desktop 0.34% <0.00%> (-0.01%) ⬇️
rs-ubuntu-26.04-ak-api-cli 100.00% <ø> (ø)
rs-ubuntu-26.04-ak-api-cli-gen 67.92% <ø> (ø)
rs-ubuntu-26.04-ak-browser-support 24.58% <ø> (ø)
rs-ubuntu-26.04-ak-cli 27.20% <ø> (ø)
rs-ubuntu-26.04-ak-flow-executor 14.81% <ø> (ø)
rs-ubuntu-26.04-ak-meta 0.00% <ø> (ø)
rs-ubuntu-26.04-ak-meta-macros 0.00% <ø> (ø)
rs-ubuntu-26.04-ak-nss 78.96% <ø> (ø)
rs-ubuntu-26.04-ak-pam 0.00% <ø> (ø)
rs-ubuntu-26.04-ak-platform 67.03% <81.52%> (+0.72%) ⬆️
rs-ubuntu-26.04-ak-platform-authz 62.00% <ø> (ø)
rs-ubuntu-26.04-ak-platform-facts 80.38% <ø> (ø)
rs-ubuntu-26.04-ak-platform-keyring 70.51% <ø> (ø)
rs-ubuntu-26.04-ak-platform-serde-policy 81.25% <ø> (ø)
rs-ubuntu-26.04-ak-sysd 37.11% <ø> (ø)
rs-ubuntu-26.04-arm-ak-agent 48.70% <ø> (ø)
rs-ubuntu-26.04-arm-ak-agent-desktop 0.34% <0.00%> (-0.01%) ⬇️
rs-ubuntu-26.04-arm-ak-api-cli 100.00% <ø> (ø)
rs-ubuntu-26.04-arm-ak-api-cli-gen 67.92% <ø> (ø)
rs-ubuntu-26.04-arm-ak-browser-support 24.58% <ø> (ø)
rs-ubuntu-26.04-arm-ak-cli 27.20% <ø> (ø)
rs-ubuntu-26.04-arm-ak-flow-executor 14.81% <ø> (ø)
rs-ubuntu-26.04-arm-ak-meta 0.00% <ø> (ø)
rs-ubuntu-26.04-arm-ak-meta-macros 0.00% <ø> (ø)
rs-ubuntu-26.04-arm-ak-nss 78.96% <ø> (ø)
rs-ubuntu-26.04-arm-ak-pam 0.00% <ø> (ø)
rs-ubuntu-26.04-arm-ak-platform 66.99% <81.52%> (+0.63%) ⬆️
rs-ubuntu-26.04-arm-ak-platform-authz 62.00% <ø> (ø)
rs-ubuntu-26.04-arm-ak-platform-facts 80.38% <ø> (ø)
rs-ubuntu-26.04-arm-ak-platform-keyring 70.51% <ø> (ø)
rs-ubuntu-26.04-arm-ak-platform-serde-policy 81.25% <ø> (ø)
rs-ubuntu-26.04-arm-ak-sysd 37.11% <ø> (ø)
rs-windows-2025-ak-agent 46.30% <ø> (ø)
rs-windows-2025-ak-agent-desktop 0.33% <0.00%> (-0.01%) ⬇️
rs-windows-2025-ak-api-cli 100.00% <ø> (ø)
rs-windows-2025-ak-api-cli-gen 67.92% <ø> (ø)
rs-windows-2025-ak-browser-support 24.58% <ø> (ø)
rs-windows-2025-ak-cli 27.20% <ø> (ø)
rs-windows-2025-ak-flow-executor 14.81% <ø> (ø)
rs-windows-2025-ak-meta 0.00% <ø> (ø)
rs-windows-2025-ak-meta-macros 0.00% <ø> (ø)
rs-windows-2025-ak-platform 63.49% <81.52%> (+0.80%) ⬆️
rs-windows-2025-ak-platform-authz 66.66% <ø> (ø)
rs-windows-2025-ak-platform-facts 78.73% <ø> (ø)
rs-windows-2025-ak-platform-keyring 85.71% <ø> (ø)
rs-windows-2025-ak-platform-serde-policy 86.62% <ø> (ø)
rs-windows-2025-ak-sysd 36.03% <ø> (ø)
rs-windows-2025-ee/wcp 43.24% <0.00%> (-0.33%) ⬇️
swift 3.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@dewi-tik dewi-tik self-assigned this Nov 27, 2026
@dewi-tik
dewi-tik requested a review from BeryJu November 27, 2026 16:15
@authentik-automation

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-1943--authentik-pkg.netlify.app

@authentik-automation
authentik-automation Bot temporarily deployed to pull request November 27, 2026 16:46 Inactive
@dewi-tik

Copy link
Copy Markdown
Contributor Author

goauthentik/authentik#28225 merged

This branch was successfully deployed

1 active deployment
pull request — 572d4267 Deployed Nov 30, 2026 by authentik-automation[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant