fix(oauth): send client_id on token revocation - #249
Draft
big-kahuna-burger wants to merge 6 commits into
Draft
Conversation
mmanciop
requested changes
Aug 14, 2026
mmanciop
left a comment
Member
There was a problem hiding this comment.
I think at least parts of this change needs to go into dash0-api-client-go so that the Terraform provider can also benefit from it
Author
Agree, let me handle that |
Send client_id through the typed RevokeToken path instead of a raw form POST, and point go.mod at the sibling dash0-api-client-go checkout until that PR ships. Co-authored-by: Cursor <cursoragent@cursor.com>
addressed review comment to provide a RevokeRequest struct
Author
|
Thanks @mmanciop for guidance on how to land this and @nicolastakashi for detailed review. Addressed everything as far as I can see. Both: go test -v ./internal/oauth/
go test -v ./internal/config/ -run 'OAuthFalse|Revoke'
go test -v -tags=integration ./internal/login/ -run 'Revoke|Logout'and go test ./...
go test -tags=integration ./...
make lint-go
make buildExit with 0 - logs not shown here for brevity, but you can simply checkout and run next to a local version of api client from the upstream PR: dash0hq/dash0-api-client-go#31 |
mmanciop
marked this pull request as draft
August 18, 2026 08:42
Member
|
Converting to draft until dash0hq/dash0-api-client-go#31 ships |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Send
client_idon OAuth token revocation by going throughOAuthClient.RevokeTokeninstead of a raw form POST.Depends on dash0hq/dash0-api-client-go#31, which adds
ClientIdtoOAuthRevocationRequest. Until that ships,go.modhas a local redirect:CI cannot resolve that path and will fail. Drop the
replaceand bump the client version once PR 31 is released on upstream.Why
The authorization server now requires
client_idonPOST /oauth/revoke(RFC 7009 §2.1). Without it,logout, re-login, andconfig profiles update --oauth=falseleft the refresh token valid server-side.Also in this PR
oauth.RevokeRequestso API URL / client ID / refresh token cannot be swapped at call sitesFailNowon the server goroutineSamplingModeAdaptive/SamplingModeDisabled(needed to compile against the client PR, which is based on current client main)Tests
client_id--oauth=falserevoke path