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

authn-jwt - move cache binding point #2447

Merged
merged 2 commits into from
Dec 28, 2021
Merged

Conversation

sashaCher
Copy link
Contributor

@sashaCher sashaCher commented Dec 19, 2021

Desired Outcome

Code is ready to have a Signing key fetcher class that does not require cashing.

Implemented Changes

Reactor code area around Fetch*SigningKey classes and caching signing keys.

More details can be found in in the design document (PR #2437)

Connected Issue/Story

ONYX-15138

Definition of Done

  • Validate status and Validate and decode classes do not depend cache anymore
  • JWKS and Provider URI signing keys fetchers are working with cache
  • Cache behavior preserved (tested in appliance)

Changelog

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a
    CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code
    changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR
  • A follow-up issue to update official docs has been filed here: insert issue ID
  • This PR does not require updating any documentation

Behavior

  • This PR changes product behavior and has been reviewed by a PO, or
  • These changes are part of a larger initiative that will be reviewed later, or
  • No behavior was changed with this PR

Security

  • Security architect has reviewed the changes in this PR,
  • These changes are part of a larger initiative with a separate security review, or
  • There are no security aspects to these changes

@sashaCher sashaCher requested a review from a team December 19, 2021 12:15
@sashaCher sashaCher force-pushed the authn-jwt-move-cache-layer branch 3 times, most recently from a90b49d to cad646e Compare December 27, 2021 09:32
@sashaCher sashaCher force-pushed the authn-jwt-move-cache-layer branch 2 times, most recently from 8238730 to 14f0dc8 Compare December 27, 2021 17:24
@sashaCher sashaCher marked this pull request as ready for review December 27, 2021 17:35
@sashaCher sashaCher requested a review from a team as a code owner December 27, 2021 17:35
Copy link
Contributor

@tzheleznyak tzheleznyak left a comment

Choose a reason for hiding this comment

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

LGTM

refresh: force_read,
cache_key: signing_key_provider.signing_key_uri,
signing_key_provider: signing_key_provider
def fetch_signing_key(force_fetch: false)
Copy link

Choose a reason for hiding this comment

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

Authentication::AuthnJwt::ValidateAndDecode#fetch_signing_key has boolean parameter 'force_fetch'

@codeclimate
Copy link

codeclimate bot commented Dec 28, 2021

Code Climate has analyzed commit 73672e2 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 90.9% (0.0% change).

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants