-
Notifications
You must be signed in to change notification settings - Fork 86
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
Feature/insert manager #213
Conversation
Is it possible to extract the _Has some rebrandings and adjustments regarding time handling (extends unify-timehandling PR) Done now. |
811a8d4
to
2f12f1f
Compare
With the new pipeline we try to sanitise input on insert. Since due to various possible issues (and for easier debugging) we could insert keys with validity exceeding the current bucket (e.g. a key submitted today with todays keydate and rolling period 144), we additionally filter for such keys on release. Adding the rules for filtering into the SQL query should decrease the risk of accidentally releasing keys too early (e.g. bugs during insert, manipulating JWTs or other yet unknown problems). Further, this should also allow for easier testing and debugging with a query ignoring all filters. To minmise merge conflicts, this PR depends on #213 Linted and rebased - original is at #f881f566b53a335f56661041b22c3872e145a8bd
With the new pipeline we try to sanitise input on insert. Since due to various possible issues (and for easier debugging) we could insert keys with validity exceeding the current bucket (e.g. a key submitted today with todays keydate and rolling period 144), we additionally filter for such keys on release. Adding the rules for filtering into the SQL query should decrease the risk of accidentally releasing keys too early (e.g. bugs during insert, manipulating JWTs or other yet unknown problems). Further, this should also allow for easier testing and debugging with a query ignoring all filters. To minmise merge conflicts, this PR depends on #213 Linted and rebased - original is at #f881f566b53a335f56661041b22c3872e145a8bd
073f77e
to
3a7bf65
Compare
3a7bf65
to
41aec0d
Compare
41aec0d
to
c921d44
Compare
c921d44
to
32df702
Compare
Some notes while trying to extract a
|
32df702
to
9cabe4d
Compare
9cabe4d
to
0ce2d65
Compare
5bb23a1
to
3ade912
Compare
This PR simplifies the controller logic by introducing a new class InsertManager. InsertManager holds a list of possible Filters which filter keys based on OS, AppVersion or features activated. The Filters are added at startup in the WSBaseConfig and allow for Filter activation by Profile or Property. Additionally, the InsertManager can be configured with modifiers. Modifiers can be used to modify keys before inserting into the datbase. Replaces the previous g811a8d461394eecd25bd190c01b933cc177b7d05, according to #226
3ade912
to
0c9f57b
Compare
…g in class-variable
39616da
to
7c0d208
Compare
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.
Made a pass on all filters. Looking good. The documentation and structure really helps :). See separate notes for tiny inconsistency and some requests for a few more specific lines of documentation.
...ain/java/org/dpppt/backend/sdk/ws/insertmanager/insertionmodifier/OldAndroid0RPModifier.java
Show resolved
Hide resolved
...ain/java/org/dpppt/backend/sdk/ws/insertmanager/insertionmodifier/OldAndroid0RPModifier.java
Outdated
Show resolved
Hide resolved
...rg/dpppt/backend/sdk/ws/insertmanager/insertionmodifier/IOSLegacyProblemRPLT144Modifier.java
Outdated
Show resolved
Hide resolved
...main/java/org/dpppt/backend/sdk/ws/insertmanager/insertionfilters/KeysMatchingJWTFilter.java
Outdated
Show resolved
Hide resolved
...main/java/org/dpppt/backend/sdk/ws/insertmanager/insertionfilters/KeysMatchingJWTFilter.java
Outdated
Show resolved
Hide resolved
...k-ws/src/main/java/org/dpppt/backend/sdk/ws/insertmanager/insertionfilters/Base64Filter.java
Outdated
Show resolved
Hide resolved
...kend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/insertmanager/README.md
Show resolved
Hide resolved
This PR updates the comments of the filters and modifiers to follow 'plain English': http://www.plainenglish.co.uk/how-to-write-in-plain-english.html Also changed ValidationUtils.checkForDelayedKeyDateClaim and its use in the KeysMatchingJWTFilter which was wrong.
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.
See #239
...rg/dpppt/backend/sdk/ws/insertmanager/insertionmodifier/IOSLegacyProblemRPLT144Modifier.java
Outdated
Show resolved
Hide resolved
...ain/java/org/dpppt/backend/sdk/ws/insertmanager/insertionmodifier/OldAndroid0RPModifier.java
Outdated
Show resolved
Hide resolved
...n/java/org/dpppt/backend/sdk/ws/insertmanager/insertionfilters/ValidRollingPeriodFilter.java
Outdated
Show resolved
Hide resolved
...ain/java/org/dpppt/backend/sdk/ws/insertmanager/insertionmodifier/OldAndroid0RPModifier.java
Show resolved
Hide resolved
InsertManager cleanup
Simplify Exception Handling in controller and make InsertException abstract.
Split JWTClaims filter for Exposed and ExposedNextDay
...end-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/config/WSBaseConfig.java
Show resolved
Hide resolved
...kend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/insertmanager/README.md
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
This PR simplifies the controller logic by introducing a new class InsertManager.
InsertManager holds a list of possible Filters which filter keys based on OS, AppVersion or features activated.
The Filters are added at startup in the WSBaseConfig and allow for Filter activation by Profile or Property.
Additionally, the InsertManager can be configured with modifiers.
Modifiers can be used to modify keys before inserting into the datbase.
Replaces the previous g811a8d461394eecd25bd190c01b933cc177b7d05, according to #226
@ineiti wants to:
insertmanager/README.md
with the new filter-queues - didn't see it was there :(