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 to v1.9.0 #573

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 24, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/MicahParks/keyfunc require minor v1.2.2 -> v1.9.0

Release Notes

MicahParks/keyfunc

v1.9.0: Multiple JWK Set support

Compare Source

The purpose of this release is to add support for multiple JWK Sets. Through the use of the new keyfunc.GetMultiple function, package users can now specify multiple remote JWK Set resources and produce one jwt.Keyfunc.

It is not recommended to use the RefreshUnknownKID field on keyfunc.Option field when using multiple JWK Sets.

Thank you to @​aklinkert for this feature request!

Related issues:

Related pull requests:

v1.8.0: Allow manual refresh of a remote JWKS resource

Compare Source

The purpose of this release is to add a method to manually refresh the remote JWKS resource. This can bypass the rate limit, if the option is set.

Please see the new .Refresh method.

Related issues:

Related pull requests:

v1.7.0: Allow JWKS JSON to be made into Given Keys

Compare Source

The purpose of this release is to add a function that can transform raw JWKS JSON into map[string]keyfunc.GivenKey. This supports the use case where JWKS JSON is given, but a remote resource is also needed via keyfunc.Get. The map[string]keyfunc.GivenKey can be passed via the GivenKeys field in the keyfunc.Options argument.

Thank you to @​sean-rn for this contribution!

Related issues:

Related pull requests:

v1.6.0: Specify signing algorithm for given keys

Compare Source

The purpose of this release is to allow package users to specify which signing algorithms in JWT headers are required for which given keys. Keys from a remote JWK Set had their algorithm checked in release 1.5.2. For discussion, please see the related issue.

Thank you to our new contributor, @​sean-rn!

Please note the following functions have been deprecated and replaced:

  • NewGivenCustom --> NewGivenCustomWithOptions
  • NewGivenECDSA --> NewGivenECDSAWithOptions
  • NewGivenEdDSA --> NewGivenEdDSAWithOptions
  • NewGivenHMAC --> NewGivenHMACWithOptions
  • NewGivenRSA --> NewGivenRSAWithOptions

This is a consequence of not providing options for given keys in the initial implementation.

Related issues:

Related pull requests:

v1.5.3: Handle invalid ECDSA curve in JWK

Compare Source

The purpose of this pull request is to add a a default switch case for ECDSA curve selection. Previously, if an invalid or empty crv JWK parameter was given for an ECDSA key, there would be a nil pointer dereference panic. You can find more information about valid crv ECDSA JWK parameters in this RFC: https://www.rfc-editor.org/rfc/rfc7518#section-6.2.1.1

Thank you to our new contributor, @​btoews!

Related pull requests:

v1.5.2: Confirm JWK algorithm

Compare Source

The purpose of this release is to confirm the alg parameter in a JWK matches the alg in a JWT's header before returning that JWK's public key for signature verification. For discussion, please see the related issue.

Thank you, @​sermojohn for opening this issue!

Related issues:

Related pull requests:

v1.5.1: JSON Web Keys restricted by "use" parameter

Compare Source

The purpose of this PR is to restrict what keys are returned by the .Keyfunc method based on their JWK's "use" parameter's value.

Two new keyfunc.Options fields have been added:

  • JWKUseWhitelist
  • JWKUseNoWhitelist

The default behavior of this package has changed to enhance the security of this package. The new default behavior will return keyfunc.ErrJWKUseWhitelist if a JWT has been signed by a parsed JWK whose "use" parameter value is not "sig", the empty string "", or a JWK with no "use" parameter. If your use case involved a custom JWK "use" parameter value, you will need to specify your custom value(s) in the new JWKUseWhitelist field on the keyfunc.Options data structure.

The previous default behavior would not cause an error if a JWK's "use" parameter's value was "enc", which would be an improper JWK for signing a JWT. See https://tools.ietf.org/html/rfc7517#section-4.2

Thank you to our new contributor, @​trevorlyman!

Relevant pull requests:

Relevant issues:

v1.5.0

Compare Source

v1.4.0: Check HTTP status code

Compare Source

The purpose of this release is to change the default behavior of the ResponseExtractor to use the keyfunc.ResponseExtractorStatusOK function. Changing the default behavior is being treated as a bug fix. This release also fixes a bug within keyfunc.ResponseExtractorStatusOK, which didn't close the HTTP response body (resource leak) that only affected v1.3.0, which is now retracted in the go.mod.

This release also contains:

  • A new function, ResponseExtractorStatusAny. This is a helper function that uses the old behavior of ignoring the HTTP status code in when extracting the JWKS JSON from the response.
  • A new method, .Len. This method returns the number of keys in the JWKS.

Relevant pull requests:

Relevant issues:

v1.3.0: Add response extractor

Compare Source

Edit: This release has been retracted due to a bug in ResponseExtractorStatusOK not closing the response body. Please upgrade to v1.4.0.

The purpose of this release is to allow for custom HTTP response extractors. A response extractor is responsible for consuming an *http.Response and producing the raw JWK Set JSON. It is also responsible for closing the body of the *http.Response.

I plan on following up this release with v1.3.1 soon. This upcoming release will change the default behavior of how the package handles HTTP response codes, returning a non-nil error in cases such as a 500 HTTP response code.

New additions:

  • keyfunc.Options has a new field named ResponseExtractor that, when provided, is responsible for the behavior described above.
  • keyfunc.ResponseExtractorStatusOK is a helper function to fit into the ResponseExtractor field in keyfunc.Options.

Relevant pull requests:

Relevant issues:


Configuration

📅 Schedule: Branch creation - "before 12pm on Tuesday,before 12pm on Friday" (UTC), Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR is behind base branch, 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.

@renovate renovate bot added the renovate label Mar 24, 2023
@renovate renovate bot force-pushed the renovate/git.luolix.top-micahparks-keyfunc-1.x branch 2 times, most recently from e912f2d to da69481 Compare March 27, 2023 17:32
@renovate renovate bot force-pushed the renovate/git.luolix.top-micahparks-keyfunc-1.x branch from da69481 to 310a90d Compare March 28, 2023 08:31
@hannesg hannesg merged commit bb9458f into main Mar 28, 2023
@hannesg hannesg deleted the renovate/git.luolix.top-micahparks-keyfunc-1.x branch March 28, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant