-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: Rewrite the CoffeeNet integration code for Spring Boot 2.x #67
Open
punycode
wants to merge
61
commits into
master
Choose a base branch
from
spring-2-rewrite
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Spring Boot 2.x migration will be a rewrite, so we will keep the previous code next to the new version while migrating. Since this will need a different set of Maven dependencies, the complete management POMs will be replicated into a `legacy/` subfolder.
To not collide accidentally while refactoring, the complete autoconfigure and actuator code in the `legacy/` folder has now a `.legacy` inserted into the package hierarchy.
Closed
The next release will be a REAL major version. This change was brought to you by: ``` $ ./mvnw versions:set -DnewVersion=2.0.0-SNAPSHOT -DprocessAllModules=true ```
Multiple parts of CoffeeNet contribute UI/UX components to the final application. This abstraction allows to write these in a technology-agnostic way.
punycode
force-pushed
the
spring-2-rewrite
branch
from
February 20, 2020 19:47
0be5467
to
332117b
Compare
To enable more CoffeeNet autoconfiguration possibilities, we need to hook into the process of defining global `SecurityConfigurer` beans, that are applied to instances of `WebSecurityConfigurerAdapter`.
This makes use of the feature from the previous commit, to automatically configure features on instances of `WebSecurityConfigurerAdapter`, if certain conditions are met. In this case, we auto-enable OAuth2.
Mirroring `SecurityAutoConfiguration` from Spring Boot, this class will be used only for servlet based environments. We will later add a reactive variant.
In the previous CoffeeNet iteration a profile for the currently logged in user could be retrieved via an exposed service. Most of the time this feature is needed for frontend work. Therefore we implement this reworked implementation via the Spring mechanism of a `HandlerMethodArgumentResolver`. This commit adds the needed auto-configuration as also an implementation for OAuth2/OIDC.
punycode
force-pushed
the
spring-2-rewrite
branch
from
April 18, 2020 19:45
eef0e6a
to
9b6df47
Compare
Since the `PrincipalCoffeeNetProfileMapper` is explicitly intended to work with implementation of `java.security.Principal` we can reflect this in the method signature.
The `DefaultCoffeeNetProfile` is a default implementation, that cannot instantiated or subclassed and is only constructable by a builder. We move the builder to the actual `CoffeeNetProfile` interface and hide the default implementation at the package level.
Since we want to encourage usage of JUnit 5 all across the CoffeeNet projects, we exclude it by default from the transitive dependencies of `spring-boot-starter-test`. This way JUnit 4 annotations and classes will not be available.
Since we may want to serialize the domain interfaces to JSON, we should add consistent naming for the resulting JSON keys emitted.
In prepartion for WebFlux support, we move the configuration for the `CoffeeNetProfileMapper` into the parent package.
This commit adds auto-configuration for WebFlux based applications in the same manner, that servlet based applications are instrumented. Specifically it adds auto-configuration for OAuth2 authentication on all WebFlux `ServerHttpSecurity` instances and the method argument resolution of `CoffeeNetProfile` for those applications.
punycode
force-pushed
the
spring-2-rewrite
branch
from
April 27, 2020 01:24
4e4fe2e
to
9b96f24
Compare
Enable support for WebFlux in CoffeeNet instrumentation
Closed
punycode
force-pushed
the
spring-2-rewrite
branch
4 times, most recently
from
May 24, 2020 00:39
7951d4e
to
d2ac336
Compare
To ease prototyping features with the rewrite we start publishing the `spring-2-rewrite` branch to Sonatype OSS snapshot repository too.
Instead of listing all `coffeenet-starter*` dependencies manually, we simply can add all starter artifacts by iterating over existing subprojects and adding those who match the name pattern.
We ensure in our build configuration to produce Java 8+ compatible artifacts. But Sonaqube is complaining if the Java version used for the build is 1.8, so we switch the build to actually use Java 11.
Spring Cloud Hoxton.SR5+ are now only supported on Spring Boot 2.3+.
SonarCloud Quality Gate failed. 3 Bugs |
SonarCloud Quality Gate failed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A lot of the integration code in CoffeeNet has to be revamped for a move towards Spring Boot 2.x.
The actual parts of the code base and how to address them still needs to be done. We will update the ticket description while doing so.