BBMRI-ERIC / negotiator

An Open-source access negotation system for Research Infrastructures
https://negotiator.bbmri-eric.eu
GNU Affero General Public License v3.0
3 stars 8 forks source link

Add a simple cache for OAuth2 token validation #278

Closed RadovanTomik closed 2 months ago

RadovanTomik commented 2 months ago

Negotiator pull request:

Description:

Adds a cache for userinfo and token introspection that is emptied every 5 minutes.

Checklist:

Make sure you tick all the boxes bellow if they are true or do not apply:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 19.04762% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 76.42%. Comparing base (9fac93e) to head (8253262).

Files Patch % Lines
...guration/security/auth/CustomJWTAuthConverter.java 0.00% 10 Missing :warning:
...guration/security/auth/IntrospectionValidator.java 20.00% 4 Missing :warning:
...ator/configuration/security/auth/CacheManager.java 25.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #278 +/- ## ============================================ - Coverage 76.84% 76.42% -0.43% - Complexity 870 871 +1 ============================================ Files 122 123 +1 Lines 2721 2740 +19 Branches 157 158 +1 ============================================ + Hits 2091 2094 +3 - Misses 524 540 +16 Partials 106 106 ``` | [Flag](https://app.codecov.io/gh/BBMRI-ERIC/negotiator/pull/278/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BBMRI-ERIC) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/BBMRI-ERIC/negotiator/pull/278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BBMRI-ERIC) | `76.42% <19.04%> (-0.43%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BBMRI-ERIC#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.