-
Notifications
You must be signed in to change notification settings - Fork 76
Feature 4159 handle token cache in cluster #4160
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
Conversation
89501b7
to
064d705
Compare
- introduced pre-cache - refactored self cleaning cache - added new fields - introduced builder - introduced OAuth2OpaqueTokenClusterCachePersistence - added documentation - introduced integration test + unit tests
064d705
to
d2c054c
Compare
1611fc3
to
1ca5d21
Compare
- removed unnecessary consructors, where only for test, the test was changed instead. - introduced component to provide cryptoAccessprovider for opaque token introspection response, used this comonent inside selfcleaning cache instance, but also inside cluster token cache (when transforming database entities to cache data objects)
1ca5d21
to
66c50b3
Compare
Due to PR #4187 version 2.11.0 was aready reached. Set to 2.12.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking very good to me 🚀
I just found some optional things, but nothing related to the implementation logic.
If you change the optional parts, maybe you can apply the license headers as well.
sechub-commons-core/src/main/java/com/mercedesbenz/sechub/commons/core/cache/CacheData.java
Outdated
Show resolved
Hide resolved
@@ -163,98 +270,123 @@ public OAuth2AuthenticatedPrincipal introspect(String opaqueToken) throws OAuth2 | |||
return new OAuth2IntrospectionAuthenticatedPrincipal(username, introspectionClaims, authorities); | |||
} | |||
|
|||
private OAuth2OpaqueTokenIntrospectionResponse getIntrospectionResponse(String opaqueToken, Instant now) { | |||
private OAuth2OpaqueTokenIntrospectionResponse getIntrospectionResponseFromInMemoryCache(String opaqueToken, Instant now) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method does more than fetching the introspection response fromt he in-memory cache. If it is not inside the in-memory cache the cluster cache is asked afterwards and updates the in-memory cache. Maybe give this method a more generic name?
This PR