fix: disable retryablehttp for DPoP auth and add TFE release workflow#1
Open
fix: disable retryablehttp for DPoP auth and add TFE release workflow#1
Conversation
DPoP JWT fix: - retryablehttp reuses the same request on retries, causing 'DPoP proof JWT has already been used' errors - V2 SDK's doWithRetries() now handles retries correctly with fresh DPoP JWTs - JWT is generated once in Authorize() and only regenerated on actual retries (retryCount > 0) or nonce errors TFE publishing: - Add GitHub Actions workflow for Terraform Enterprise releases - Add upload_to_tfe.py script for publishing provider to private registry - Add documentation for the TFE publishing process Cleanup: - Remove unused GitHub issue templates and workflows
007
approved these changes
Dec 18, 2025
007
left a comment
There was a problem hiding this comment.
It's working, so probably all fine¯\_(ツ)_/¯
There was a problem hiding this comment.
Does GoReleaser really not have this built-in yet?
There was a problem hiding this comment.
I think there's a "wait until we got it" structure you can/should use instead, turns it into a proper mutex?
There was a problem hiding this comment.
defer right away and let your returns handle unlocking?
- Add applyTokenToRequest() to apply cached token and DPoP headers - Add cacheNewToken() to store token and DPoP values in cache - Add setDpopHeaders() to set Authorization and DPoP headers for new tokens - Refactor PrivateKeyAuth.Authorize and JWTAuth.Authorize to use helpers - Reduces ~88 lines of duplicated code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
retryablehttpreuses the same request on retries, causing 'DPoP proof JWT has already been used' errors. The V2 SDK'sdoWithRetries()now handles retries correctly with fresh DPoP JWTs.Changes
DPoP JWT fix (
sdk/v2_requestExecutor.go)retryablehttpfor DPoP auth to prevent JWT reuse on automatic retriesAuthorize()and only regenerated on actual retries (retryCount > 0) or nonce errorsTFE Publishing
.github/workflows/release-tfe.yml- GitHub Actions workflow for TFE releasesscripts/upload_to_tfe.py- Script for publishing provider to private registrydocs/PUBLISHING_TO_TFE.md- Documentation for the TFE publishing processTest plan
🤖 Generated with Claude Code