Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update module github.com/micahparks/keyfunc/v2 to v3 #213

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 2, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/MicahParks/keyfunc/v2 v2.1.0 -> v3.3.2 age adoption passing confidence

Release Notes

MicahParks/keyfunc (github.com/MicahParks/keyfunc/v2)

v3.3.2: Allow for user provided ctx during parse

Compare Source

The purpose of this release is to add a new method, .KeyfuncCtx.

This new method accepts a context.Context, then returns a jwt.Keyfunc. This user provided context.Context is used during JWK lookup in the github.com/MicahParks/jwkset package when parsing JWTs. Passing a request scoped context allows the JWT parsing and JWK retrieval to cancel according to the given context.Context behavior instead of the default context.Context, which was provided at keyfunc.Keyfunc initialization.

In practice, this is used to prevent situations where many JWTs with kid not in a remote JWK Set are attempting to be parsed over a long period of time.

Relevant issues:

Relevant pull requests:

v3.3.1

Compare Source

v3.3.0

Compare Source

v3.2.9

Compare Source

v3.2.8

Compare Source

v3.2.7

Compare Source

v3.2.6

Compare Source

v3.2.5

Compare Source

v3.2.4

Compare Source

v3.2.3: Wrap errors where appropriate

Compare Source

The purpose of this pull request is to wrap errors with errors.Join where appropriate.

Relevant issues:

Relevant pull requests:

v3.1.2: X.509 Thumbprint bug fix

Compare Source

JWK Sets have two X.509 thumbprint parameters that are optional. A bug in github.com/MicahParks/jwkset made these parameters required in circumstances that affect the keyfunc project. This release updates this dependency to the latest version.

Thank you, @​joshkaplinsky, for reporting this bug!

Please see the below release for details:
https://github.com/MicahParks/jwkset/releases/tag/v0.5.5

v3.1.1

Compare Source

v3.1.0

Compare Source

v3.0.0: V3 simplify API by using github.com/MicahParks/jwkset

Compare Source

This upgrade removes most of the code in this repository and outsources JWK and JWK Set related code to the updated github.com/MicahParks/jwkset package. The exported assets from the keyfunc project has been vastly reduced as well, with the intention of making it easier to use for the majority of use cases.

[!NOTE]
A superset of features from V1 and V2 is available.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@nicolerenee
Copy link
Member

After updating the imports to use the new v3 package the following errors happen:

vscode ➜ /workspaces/x (renovate/github.com-micahparks-keyfunc-v2-3.x) $ go test ./...
# go.infratographer.com/x/echojwtx
echojwtx/auth.go:127:20: a.KeyFuncOptions.RefreshTimeout undefined (type keyfunc.Options has no field or method RefreshTimeout)
echojwtx/auth.go:139:23: a.KeyFuncOptions.Client undefined (type keyfunc.Options has no field or method Client)
echojwtx/auth.go:140:21: a.KeyFuncOptions.Client undefined (type keyfunc.Options has no field or method Client)
echojwtx/auth.go:147:23: a.KeyFuncOptions.RefreshErrorHandler undefined (type keyfunc.Options has no field or method RefreshErrorHandler)
echojwtx/auth.go:148:21: a.KeyFuncOptions.RefreshErrorHandler undefined (type keyfunc.Options has no field or method RefreshErrorHandler)
echojwtx/auth.go:153:23: a.KeyFuncOptions.RefreshInterval undefined (type keyfunc.Options has no field or method RefreshInterval)
echojwtx/auth.go:154:21: a.KeyFuncOptions.RefreshInterval undefined (type keyfunc.Options has no field or method RefreshInterval)
echojwtx/auth.go:157:23: a.KeyFuncOptions.RefreshRateLimit undefined (type keyfunc.Options has no field or method RefreshRateLimit)
echojwtx/auth.go:158:21: a.KeyFuncOptions.RefreshRateLimit undefined (type keyfunc.Options has no field or method RefreshRateLimit)
echojwtx/auth.go:161:23: a.KeyFuncOptions.RefreshTimeout undefined (type keyfunc.Options has no field or method RefreshTimeout)
echojwtx/auth.go:161:23: too many errors

So this will require some additional work to update to this new v3 package.

keyfunc/v3 had some significant changes which moved much of the configuration and logic to the jwkset library.
As such much of the configuration moved with it and so our configuration needed to change.

This updates the code to use this new configuration method.
Tests, with only small changes continue to pass.

Signed-off-by: Mike Mason <mimason@equinix.com>
@renovate renovate bot requested a review from a team as a code owner April 3, 2024 16:02
Copy link
Contributor Author

renovate bot commented Apr 3, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

Copy link
Member

@nicolerenee nicolerenee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for getting this upgrade completed.

Given we change the API we will want to make sure when we release this it's more than a tiny version bump.

@nicolerenee nicolerenee added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit e194732 Apr 3, 2024
8 checks passed
@nicolerenee nicolerenee deleted the renovate/github.com-micahparks-keyfunc-v2-3.x branch April 3, 2024 17:55
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.

None yet

2 participants