OIDC callback server doesn't display errors query params
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
While working on testing https://github.com/hashicorp/nomad/issues/19318, I discovered that at least one OIDC provider (MSFT ADFS) returns errors in a `error` query parameter of the callback URL. This results in a URL like the following:
`http://localhost:4649/oidc/callback?error=invalid_resource&error_description=MSIS9602%3a+The+received+%27resource%27+parameter+is+invalid.+The+authorization+server+can+not+find+a+registered+resource+with+the+specified+identifier.&state=st_h3QSSe5YSaai7JZydqqk&client-request-id=6497f86e-a844-4304-4300-0080030000f0`
The embedded page doesn't display this to the user in any obvious way, so we end up getting a "success" login page and then the subsequent request to complete the workflow gets an error like:
> 2024-01-08T14:45:00.649-0500 [DEBUG] http: request failed: method=PUT path=/v1/acl/oidc/complete-auth
> error=
> | RPC Error:: 400,invalid OIDC complete-auth request: 1 error occurred:
> | \t* missing code
> |
> code=400
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the OIDC callback server handling /oidc/callback and the embedded success page, then reproduce the callback URL with error and error_description query parameters shown in the issue. Done means provider errors are displayed clearly instead of showing a success login page, and the workflow does not proceed as though authentication succeeded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100