rustdesk / rustdesk/rustdesk-server-pro

Logging in via OIDC leads to parsing error

Open
#562 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Shell
Stars
317
Forks
119
PR merge metrics
No merged PRs in 30d

Description

Bug Description

When using Jumpcloud as an OIDC IdP, users get the following error message when logging in:

Failed to contact token endpoint, Failed to parse server response

The following error populates in the logs:

hbbs  | [2025-02-27 20:02:30.685996 +00:00] ERROR [src/oidc.rs:743] Failed to contact token endpoint, Parse(Error { path: Path { segments: [] }, original: Error("Failed to parse payload JSON: Error(\"invalid type: string \\\"true\\\", expected a boolean\", line: 1, column: 585)", line: 1, column: 1765) }, [123, 34, 97, 99, 99, 101, 115, 115, 95, 116, 111, 107, 101, 110, 34, 58, 34, 111, 114, 121, 95, 97, 116, 95, 68, 89, 78, 114, 83, 86, 52, 109, 109, 67, 99, 50, 121, 115, 71, 67, 84, 111, 55, 81, 72, 115, 87, 53, 106, 54, 113, 98, 86, 113, 52, 105, 112, 68, 103, 88, 109, 113, 56, 69, 74, 112, 81, 46, 50, 71, 70, 107, 109, 55, 56, 78, 113, 74, 100, 65, 99, 52, 122, 110, 85, 76, 85, 85, 54, 89, 56, 110, 95, 84, 90, 119, 120, 67, 121, 77, 88, 112, 88, 101, 76, 111, 90, 117, 83, 49, 111, 34, 44, 34, 101, 120, 112, 105, 114, 101, 115, 95, 105, 110, 34, 58, 51, 54, 48, 48, 44, 34, 105, 100, 95, 116, 111, 107, 101, 110, 34, 58, 34, 101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 83, 85, 122, 73, 49, 78, 105, 73, 115, 73, 109, 116, 112, 90, 67, 73, 54, 73, 110, 66, 121, 97, 88, 90, 104, 100, 71, 85, 54, 97, 72, 108, 107, 99, 109, 69, 117, 98, 51, 66, 108, 98, 109, 108, 107, 76, 109, 108, 107, 76, 88, 82, 118, 97, 50, 86, 117, 73, 105, 119, 105, 100, 72, 108, 119, 73, 106, 111, 105, 83, 108, 100, 85, 73, 110, 48, 46, 101, 121, 74, 104, 100, 70, 57, 111, 89, 88, 78, 111, 73, 106, 111, 105, 76, 85, 49, 104, 98, 50, 120, 82, 76, 88, 108, 72, 82, 51, 99, 121, 97, 50, 104, 116, 97, 72, 90, 82, 85, 49, 104, 104, 85, 83, 73, 115, 73, 109, 70, 49, 90, 67, 73, 54, 87, 121, 74, 109, 77, 84, 100, 108, 78, 109, 89, 52, 79, 67, 48, 53, 89, 122, 89, 48, 76, 84, 82, 104, 77, 106, 107, 116, 89, 106, 65, 48, 78, 83, 49, 104, 78, 87, 69, 122, 79, 84, 99, 51, 77, 106, 86, 104, 90, 71, 89, 105, 88, 83, 119, 105, 89, 88, 86, 48, 97, 70, 57, 48, 97, 87, 49, 108, 73, 106, 111, 120, 78, 122, 81, 119, 78, 106, 103, 50, 78, 84, 85, 119, 76, 67, 74, 108, 98, 87, 70, 112, 98, 67, 73, 54, 73, 109, 53, 112, 89, 50, 116, 65, 97, 87, 53, 115, 76, 109, 108, 118, 73, 105, 119, 105, 90, 87, 49, 104, 97, 87, 120, 102, 100, 109, 86, 121, 97, 87, 90, 112, 90, 87, 81, 105, 79, 105, 74, 48, 99, 110, 86, 108, 73, 105, 119, 105, 90, 88, 104, 119, 73, 106, 111, 120, 78, 122, 81, 119, 78, 106, 107, 119, 77, 84, 85, 119, 76, 67, 74, 109, 89, 87, 49, 112, 98, 72, 108, 102, 98, 109, 70, 116, 90, 83, 73, 54, 73, 108, 78, 104, 98, 110, 82, 112, 89, 87, 100, 118, 73, 105, 119, 105, 90, 50, 108, 50, 90, 87, 53, 102, 98, 109, 70, 116, 90, 83, 73, 54, 73, 107, 53, 112, 89, 50, 104, 118, 98, 71, 70, 122, 73, 105, 119, 105, 90, 51, 74, 118, 100, 88, 66, 122, 73, 106, 111, 105, 83, 107, 78, 102, 85, 108, 86, 84, 86, 69, 82, 70, 85, 48, 116, 102, 81, 85, 82, 78, 83, 85, 52, 105, 76, 67, 74, 112, 89, 88, 81, 105, 79, 106, 69, 51, 78, 68, 65, 50, 79, 68, 89, 49, 78, 84, 65, 115, 73, 109, 108, 122, 99, 121, 73, 54, 73, 109, 104, 48, 100, 72, 66, 122, 79, 105, 56, 118, 98, 50, 70, 49, 100, 71, 103, 117, 97, 87, 81, 117, 97, 110, 86, 116, 99, 71, 78, 115, 98, 51, 86, 107, 76, 109, 78, 118, 98, 83, 56, 105, 76, 67, 74, 113, 89, 49, 57, 118, 99, 109, 99, 105, 79, 105, 73, 50, 77, 50, 81, 120, 89, 122, 107, 50, 78, 106, 73, 120, 78, 109, 85, 120, 89, 122, 82, 105, 77, 109, 69, 49, 79, 71, 90, 108, 79, 71, 69, 105, 76, 67, 74, 113, 100, 71, 107, 105, 79, 105, 74, 106, 79, 68, 100, 106, 90, 84, 89, 122, 79, 67, 48, 119, 89, 87, 73, 48, 76, 84, 82, 106, 78, 68, 85, 116, 79, 71, 69, 48, 89, 121, 49, 106, 77, 68, 82, 105, 77, 87, 82, 108, 77, 84, 107, 48, 90, 87, 89, 105, 76, 67, 74, 116, 97, 87, 82, 107, 98, 71, 86, 102, 98, 109, 70, 116, 90, 83, 73, 54, 73, 105, 73, 115, 73, 109, 53, 104, 98, 87, 85, 105, 79, 105, 74, 79, 97, 87, 78, 111, 98, 50, 120, 104, 99, 121, 66, 84, 89, 87, 53, 48, 97, 87, 70, 110, 98, 121, 73, 115, 73, 109, 53, 118, 98, 109, 78, 108, 73, 106, 111, 105, 86, 109, 112, 76, 85, 50, 82, 68, 82, 85, 120, 75, 101, 85, 74, 73, 90, 87, 120, 119, 99, 108, 57, 52, 97, 109, 70, 112, 81, 83, 73, 115, 73, 110, 66, 121, 90, 87, 90, 108, 99, 110, 74, 108, 90, 70, 57, 49, 99, 50, 86, 121, 98, 109, 70, 116, 90, 83, 73, 54, 73, 109, 53, 112, 89, 50, 115, 105, 76, 67, 74, 121, 89, 88, 81, 105, 79, 106, 69, 51, 78, 68, 65, 50, 79, 68, 89, 49, 78, 68, 107, 115, 73, 110, 78, 112, 90, 67, 73, 54, 73, 109, 86, 104, 90, 68, 100, 105, 90, 106, 78, 106, 76, 84, 81, 49, 78, 68, 107, 116, 78, 68, 65, 122, 89, 83, 48, 52, 78, 50, 69, 49, 76, 84, 85, 119, 77, 122, 70, 109, 90, 84, 99, 52, 78, 71, 74, 106, 79, 83, 73, 115, 73, 110, 78, 49, 89, 105, 73, 54, 73, 106, 89, 122, 90, 68, 70, 106, 90, 71, 74, 106, 90, 106, 69, 120, 77, 68, 89, 53, 77, 68, 90, 106, 78, 106, 65, 120, 78, 122, 103, 119, 90, 67, 74, 57, 46, 105, 70, 69, 51, 105, 98, 86, 122, 105, 49, 101, 117, 65, 75, 55, 97, 70, 108, 56, 85, 109, 85, 77, 48, 105, 110, 109, 75, 97, 89, 72, 67, 50, 52, 73, 79, 116, 70, 122, 65, 89, 117, 79, 79, 54, 107, 79, 68, 114, 113, 77, 113, 95, 95, 84, 82, 90, 82, 110, 76, 105, 84, 115, 78, 72, 86, 115, 76, 65, 108, 109, 66, 80, 107, 104, 110, 45, 108, 120, 77, 107, 101, 108, 55, 115, 65, 72, 57, 68, 116, 115, 110, 51, 89, 97, 84, 104, 54, 121, 48, 114, 78, 51, 89, 106, 97, 108, 65, 117, 67, 117, 50, 106, 116, 116, 50, 113, 48, 57, 104, 77, 97, 106, 121, 86, 113, 45, 76, 51, 111, 75, 122, 77, 48, 86, 69, 67, 86, 85, 104, 121, 118, 108, 54, 49, 74, 75, 100, 53, 53, 88, 112, 98, 88, 54, 68, 65, 98, 119, 103, 70, 74, 85, 87, 72, 82, 100, 99, 72, 83, 84, 51, 83, 101, 45, 113, 48, 104, 121, 76, 120, 85, 48, 84, 49, 101, 101, 73, 118, 82, 77, 116, 70, 112, 110, 105, 87, 97, 109, 73, 87, 98, 101, 115, 80, 49, 72, 51, 113, 76, 101, 106, 74, 88, 100, 106, 55, 110, 104, 119, 106, 110, 100, 72, 48, 78, 90, 75, 50, 117, 45, 121, 101, 105, 102, 79, 82, 56, 75, 68, 66, 75, 84, 70, 110, 66, 48, 65, 84, 45, 67, 99, 55, 77, 102, 100, 48, 105, 112, 75, 120, 76, 121, 88, 53, 110, 52, 72, 101, 73, 54, 66, 106, 77, 122, 65, 120, 107, 54, 57, 51, 66, 67, 118, 67, 75, 70, 67, 51, 80, 79, 82, 114, 116, 73, 80, 88, 97, 97, 78, 79, 102, 52, 113, 45, 104, 90, 101, 122, 48, 75, 115, 57, 80, 88, 115, 86, 102, 95, 90, 110, 82, 102, 50, 74, 53, 56, 112, 119, 122, 69, 83, 55, 74, 83, 116, 53, 74, 81, 72, 116, 81, 57, 113, 113, 68, 104, 100, 72, 55, 55, 118, 98, 53, 69, 80, 77, 79, 118, 83, 72, 109, 45, 49, 66, 100, 117, 65, 108, 117, 120, 111, 57, 84, 51, 84, 70, 45, 49, 113, 122, 73, 76, 84, 71, 113, 119, 88, 69, 116, 51, 48, 68, 86, 67, 68, 69, 69, 108, 54, 55, 50, 82, 107, 108, 76, 108, 122, 97, 88, 117, 50, 114, 72, 122, 51, 55, 112, 49, 65, 52, 75, 68, 114, 67, 70, 115, 103, 48, 121, 111, 79, 49, 68, 113, 70, 116, 118, 90, 120, 106, 48, 104, 56, 122, 72, 74, 86, 97, 74, 79, 50, 73, 84, 82, 52, 57, 113, 51, 49, 99, 120, 65, 114, 69, 76, 57, 74, 54, 108, 51, 89, 112, 67, 72, 107, 120, 104, 71, 54, 106, 112, 80, 78, 116, 110, 101, 77, 104, 109, 99, 82, 50, 69, 68, 52, 117, 120, 98, 102, 56, 79, 108, 49, 122, 104, 82, 114, 48, 70, 54, 103, 112, 48, 89, 55, 90, 95, 75, 109, 45, 69, 65, 105, 100, 110, 119, 53, 122, 72, 110, 85, 86, 119, 74, 119, 103, 48, 79, 98, 115, 99, 104, 71, 100, 50, 73, 116, 54, 121, 106, 78, 115, 81, 121, 82, 115, 89, 83, 97, 109, 111, 113, 87, 56, 108, 56, 66, 55, 55, 89, 84, 108, 80, 97, 97, 98, 73, 112, 88, 101, 70, 56, 55, 85, 89, 95, 88, 56, 71, 121, 83, 68, 120, 122, 52, 75, 117, 49, 67, 82, 55, 65, 121, 55, 50, 77, 68, 90, 85, 69, 108, 113, 49, 83, 116, 121, 85, 108, 49, 79, 122, 70, 80, 71, 53, 105, 55, 118, 83, 119, 104, 121, 67, 103, 118, 48, 95, 76, 72, 45, 79, 80, 82, 66, 120, 112, 51, 52, 67, 89, 73, 112, 111, 57, 89, 88, 114, 108, 55, 90, 101, 49, 99, 69, 107, 49, 55, 57, 53, 77, 121, 49, 83, 65, 113, 108, 75, 75, 121, 90, 51, 85, 34, 44, 34, 115, 99, 111, 112, 101, 34, 58, 34, 111, 112, 101, 110, 105, 100, 32, 101, 109, 97, 105, 108, 32, 112, 114, 111, 102, 105, 108, 101, 32, 111, 102, 102, 108, 105, 110, 101, 95, 97, 99, 99, 101, 115, 115, 34, 44, 34, 116, 111, 107, 101, 110, 95, 116, 121, 112, 101, 34, 58, 34, 98, 101, 97, 114, 101, 114, 34, 125])
How to Reproduce
  • Configure an SSO application in Jumpcloud with the following configuration:
    • Client Authentication Type: Client Secret Basic
    • Redirect URIs: https://url-to-rustdesk/api/oidc/callback
    • Login URL: https://url-to-rustdesk-login/
    • Attribute Mapping:
      • Standard Scopes: Email and Profile
      • Group Attributes: optional
    • User Consent: automatically consent
  • Configure an OIDC provider in the Rustdesk console with the following:
    • Name: Jumpcloud
    • Client ID: client ID as provided from Jumpcloud console
    • Client Secret: client secret as provided from Jumpcloud console
    • Timeout: 3600
    • Custom Certificate: null
    • Issuer: https://oauth.id.jumpcloud.com/
    • Authorization Endpoint: https://oauth.id.jumpcloud.com/oauth2/auth
    • Token Endpoint: https://oauth.id.jumpcloud.com/oauth2/token
    • Userinfo Endpoint: https://oauth.id.jumpcloud.com/oauth2/userinfo
    • JWKS Endpoint: https://oauth.id.jumpcloud.com/.well-known/jwks.json
    • Enable PKCE: true
  • Attempt to login using either an SP or IdP-initiated login flow
Expected Behavior

Users are able to login and see at least their profile populated.

Operating system(s) on local (controlling) side and remote (controlled) side

Web console - Docker on Linux

RustDesk Version(s) on local (controlling) side and remote (controlled) side

N/A - issue with web console

Screenshots

Image

Additional Context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/oidc.rs around line 743 and reproduce the JumpCloud OIDC login flow using the token endpoint configuration in the issue. Trace the token response parsing failure involving a string "true" where a boolean is expected; done means users can complete login and see at least their profile populated.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.