- Feature: The signature of the method
convertDtoToEntity
has been extended to include anOptional<OUT> currentEntityOpt
, which contains the already persistent entity in the case of an update request. This can be used to carry out any necessary transfers of values from the database or validations. (see MIGRATION.md) - refactor:
AbstractUserController
now extendsAbstractAccessAwareController
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.3.3 to 3.3.5
- upgraded org.wiremock:wiremock-standalone from 3.9.1 to 3.9.2
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.14.0 to 7.16.0
- upgraded net.sf.okapi.lib:okapi-lib-xliff2 from 1.46.0 to 1.47.0
- Feature:
BasicRepresentation
can be used to create slim representations of entities.BasicRepresentation
is very well suited for filling embedded objects or lists of objects in other representations. - Feature: Each Controller now has a
GET .../basic
endpoint that returns a List of BasicRepresentations of the entity. Filtering via Specifications is possible - Feature:
AbstractUserController
can now filter users by using a substring of an email. - upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.12.0 to 7.14.0
- upgraded org.hibernate.orm:hibernate-jpamodelgen from 6.5.2.Final to 6.6.0.Final
- upgraded commons-logging:commons-logging from 1.3.3 to 1.3.4
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.3.2 to 3.3.3
- Feature:
AbstractUserController
now allows to test access to specific database entries before executing the actual request. This is done by using thetestAccess(<Specification>)
method provided by theAbstractUserService
. This functionality has already been implemented and tested in theAbstractAccessAwareController
. - fix: Prevent NullPointerException in OAuth2SuccessHandler/AbstractUserService when OAuth-mapped internal role is not found
- fix: Avoid calling DaoAuthenticationProvider on every request, which calls BCryptPasswordEncoder every time and causes performance problems.
- feature: The role mapping and signup behavior can now be configured individually for each OAuth provider.
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.3.0 to 3.3.2
- upgraded io.jsonwebtoken:jjwt-api from 0.12.5 to 0.12.6
- upgraded io.jsonwebtoken:jjwt-impl from 0.12.5 to 0.12.6
- upgraded io.jsonwebtoken:jjwt-jackson from 0.12.5 to 0.12.6
- upgraded org.wiremock:wiremock-standalone from 3.6.0 to 3.9.0
- upgraded com.unboundid:unboundid-ldapsdk from 7.0.0 to 7.0.1
- upgraded commons-logging:commons-logging from 1.3.2 to 1.3.3
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.10.0 to 7.12.0
- upgraded org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.5.0 to 2.6.0
- Feature: Updating the roles of a user or deleting a hole user object is only allowed, if after the request a user with at least one admin role remains in the system. (see MIGRATION.md)
- Feature: LDAP-Authentication - Enable Group Subtree Search, introduced environment variable
APP_AUTH_LDAP_GROUP_SEARCH_SUBTREE
(see MIGRATION.md) - upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.6.0 to 7.10.0
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.2.4 to 3.3.0
- upgraded org.flywaydb:flyway-core and org.flywaydb:flyway-database-postgresql from 10.11.0 to 10.15.0
- upgraded org.hibernate.orm:hibernate-jpamodelgen from 6.4.4.Final to 6.5.2.Final
- upgraded org.wiremock:wiremock-standalone from 3.5.3 to 3.6.0
- upgraded commons-logging:commons-logging from 1.3.1 to 1.3.2
- upgraded jakarta.servlet:jakarta.servlet-api from 6.0.0 to 6.1.0
- revert
The FallbackResourceResolver has been removed. URL paths that do not exist are no longer responded to with a DefaultSuccessPage.
- upgraded com.nulab-inc:zxcvbn from 1.8.2 to 1.9.0
- Fix: Boolean logic for parsing OIDC attributes corrected. Last name and first name were not correctly separated and assigned.
- Fix: Deletion of obsolete rights failed on application start if the right was assigned to a role
- Fix: NotAllowedException during RightInitialization (see MIGRATION.md)
- Fix: An expired but still existing SessionToken throws an Internal Server Error (HTTP 500)
- Fix: Role-Initialization failed if no default role was defined in the application.yaml
- Documentation and messages on password security improved
- The FallbackResourceResolver has been removed. URL paths that do not exist are no longer responded to with a DefaultSuccessPage.
- Make JPA-Table-Name-Style configurable, Allow disabling Upper-Case-Table-Names. Default is Upper-Case-Table-Names.
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.2.3 to 3.2.4
- upgraded com.unboundid:unboundid-ldapsdk from 6.0.11 to 7.0.0
- upgraded org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.3.0 to 2.5.0
- upgraded org.flywaydb:flyway-core from 10.9.1 to 10.10.0 (demo-application)
- upgraded org.flywaydb:flyway-database-postgresql from 10.9.1 to 10.10.0 (demo-application)
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.4.0 to 7.6.0
- upgraded org.eclipse.angus:jakarta.mail from 2.0.2 to 2.0.3
- fix: prevent clearing the roles of a user during patch update
- OAuth2:
- added Support for additional redirect URI after successful login
- added
allowed-redirect-urls
toapplication.yaml
to define allowed redirect URLs - fixed name mapping for OAuth2-Users
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.2.2 to 3.2.3
- previously pinned org.springframework.security:spring-security-core to 6.2.2 due to CVE-2024-22234, now unpinned
- previously pinned ch.qos.logback:logback-classic and ch.qos.logback:logback-core to 1.5.0, now unpinned
- upgraded org.wiremock:wiremock-standalone from 3.4.1 to 3.4.2
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.3.0 to 7.4.0
- upgraded org.postgresql:postgresql from 42.7.1 to 42.7.2 (solving CVE-2024-1597)
- upgraded org.hibernate.orm:hibernate-jpamodelgen from 6.4.3.Final to 6.4.4.Final
- upgraded org.flywaydb:flyway-core from 10.7.1 to 10.8.1
- upgraded org.flywaydb:flyway-database-postgresql from 10.7.1 to 10.8.1
- upgraded org.wiremock:wiremock-standalone from 3.3.1 to 3.4.1
- upgraded ch.qos.logback:logback-classic from 1.4.14 to 1.5.0
- upgraded ch.qos.logback:logback-core from 1.4.14 to 1.5.0
- pinned org.springframework.security:spring-security-core to 6.2.2 due to CVE-2024-22234, will be unpinned as soon as a new version of spring-boot-starter-parent is available
- fix: NullPointerException in DefaultRightInitializer when right description is null
- fix: time interval for deleting expired tokens
- fix: Role-Update fails in DefaultUserInitializer using UUID Model
- fix: duplicate violation during User-Initialization
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 7.2.0 to 7.3.0
- upgraded org.flywaydb:flyway-core from 10.6.0 to 10.7.1
- upgraded org.flywaydb:flyway-database-postgresql from 10.6.0 to 10.7.1
- upgraded io.jsonwebtoken:jjwt-api from 0.12.3 to 0.12.4
- upgraded io.jsonwebtoken:jjwt-impl from 0.12.3 to 0.12.4
- upgraded io.jsonwebtoken:jjwt-jackson from 0.12.3 to 0.12.4
- upgraded com.cosium.code:git-code-format-maven-plugin from 5.1 to 5.3
- upgraded com.cosium.code:google-java-format from 5.1 to 5.3
- upgraded org.hibernate.orm:hibernate-jpamodelgen from 6.4.2.Final to 6.4.3.Final
- The set of Rights inside RoleDto can either be a set of Strings or a Set of (Right-)Objects.
- upgraded io.jsonwebtoken:jjwt-api from 0.12.3 to 0.12.4
- upgraded io.jsonwebtoken:jjwt-impl from 0.12.3 to 0.12.4
- upgraded io.jsonwebtoken:jjwt-jackson from 0.12.3 to 0.12.4
- upgraded org.apache.httpcomponents.client5:httpclient5 from 5.3 to 5.3.1
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.2.1 to 3.2.2
⚠️ Due to a changed error handling ofHandlerMethodValidationException
on the part of Spring Boot, the notes in the migration guide must be observed. See MIGRATION.md for more information.
- Multi-Language-Support for Error-Messages
- fix overwriting password during user initialization
- re-implementation of
DefaultRoleInitializer.getAdditionalRoles
to allow role initialization during development
- Removed deprecated
Model.class
- Removed deprecated
NativeIdModel.class
- Removed deprecated
InvalidCredentialsException.class
. Use one of the known subclasses of AuthenticationException instead. See https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/AuthenticationException.html - Removed deprecated
UnauthorizedException.class
. Use one of the known subclasses of AuthenticationException instead. See https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/AuthenticationException.html - Removed deprecated
CurrentUserController.class
which forwarded all requests to/v1/me/*
to/v1/users/me/*
for backward compatibility reasons. - Removed
spring-boot-starter-hateoas
dependency from base library. See Migration Guide for more information. - Introduced
@ExposesEntity
annotation to replace@ExposesResourceFor
(spring-boot-starter-hateoas
) annotation. See Migration Guide for more information. - fix
/auth/renew
endpoint (CSRF) - upgraded org.apache.maven.plugins:maven-surefire-plugin from 3.2.3 to 3.2.5
- upgraded org.apache.maven.plugins:maven-failsafe-plugin from 3.2.3 to 3.2.5
- optimised Gender-appropriate language
- upgraded net.sf.okapi.lib:okapi-lib-xliff2 from 1.45.0 to 1.46.0
- Database dependencies removed from base library. See Migration Guide for more information.
- Users can now be assigned to multiple roles. The rights of the user result from the sum of the rights of the assigned roles.
- Roles and Users can now be created via environment variables. For more information see MIGRATION.md
- With regard to the environment variables, the previous root element 'essencium-backend' has been renamed to ' essencium'. For more information see MIGRATION.md
- upgraded org.flywaydb:flyway-core from 10.3.0 to 10.4.0
- upgraded org.flywaydb:flyway-database-postgresql from 10.3.0 to 10.4.0
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.2.0 to 3.2.1
- fixed NPE in LoginMailTemplate
- upgraded org.flywaydb:flyway-core from 10.1.0 to 10.3.0
- upgraded org.flywaydb:flyway-database-postgresql from 10.1.0 to 10.3.0
- bump org.hibernate.orm:hibernate-jpamodelgen from 6.4.0.Final to 6.4.1.Final
- bump io.sentry:sentry-spring-boot-starter-jakarta from 7.0.0 to 7.1.0
- fix HTTP-Error 500 if an expired refresh token is used to renew an access token
- Deprecated
UnauthorizedException
. Use implementations oforg.springframework.security.core.AuthenticationException
(https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/AuthenticationException.html) instead. - Deprecated
InvalidCredentialsException
. Use implementations oforg.springframework.security.core.AuthenticationException
(https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/AuthenticationException.html) instead. - switch to
devnull@frachtwerk.de
as default admin user
- upgraded ch.qos.logback:logback-classic from 1.4.12 to 1.4.14
- upgraded ch.qos.logback:logback-core from 1.4.12 to 1.4.14
- upgraded org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.2.0 to 2.3.0
- upgraded org.apache.httpcomponents.client5:httpclient5 from 5.2.2 to 5.2.3
- upgraded org.apache.maven.plugins:maven-javadoc-plugin from 3.6.2 to 3.6.3
- fix NPE when logging in for the first time
- introduced endpoint
/auth/oauth-registrations
to list all OAuth2 registrations so that any frontend can display them dynamically
- upgraded org.hibernate.orm:hibernate-jpamodelgen from 6.3.1.Final to 6.4.0.Final
- Introduction of the APP_DOMAIN environment variable:
- APP_DOMAIN is used to set the domain of the cookies. APP_DOMAIN contains only the domain without protocol and
port (
localhost
). - APP_URL is used for branding and redirects. APP_URL contains the protocol, domain and port (
http://localhost:8098
). - This change reverts the change of version
2.4.7
and introduces a new environment variable.
- APP_DOMAIN is used to set the domain of the cookies. APP_DOMAIN contains only the domain without protocol and
port (
- upgraded io.jsonwebtoken:jjwt-* from 0.12.2 to 0.12.3
- several changes to internal methods for token generation
- RefreshToken: In addition to the existing
accessToken
, arefreshToken
is introduced. This is only required for the creation of furtheraccessToken
at the/renew
endpoint. TherefreshToken
is set as a cookie that is only permitted for use at the refresh endpoint. - Users receive an email notification on every new login.
- upgraded org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 6.31.0 to 6.34.0
- upgraded org.apache.maven.plugins:maven-failsafe-plugin from 3.1.2 to 3.2.2
- upgraded org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2
- upgraded org.apache.maven.plugins:maven-javadoc-plugin from 3.6.0 to 3.6.2
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.1.5 to 3.2.0
- upgraded org.hibernate.orm:hibernate-jpamodelgen from 6.3.1.Final to 6.3.2.Final
- upgraded org.flywaydb:flyway-* from 9.22.3 to 10.1.0
- upgraded org.apache.httpcomponents:httpclient5 from 5.2.1 to 5.2.2
- upgraded org.postgresql:postgresql from 42.6.0 to 42.7.0
- upgraded org.wiremock:wiremock from 3.2.0 to 3.3.1 and switched to wiremock-standalone
- upgraded org.cyclonedx:cyclonedx-maven-plugin from 2.7.9 to 2.7.10
- New RegEx for Mail-Validation
- upgraded com.cosium.code:git-code-format-maven-plugin from 4.3 to 5.1
- upgraded com.cosium.code:google-java-format from 4.3 to 5.1
- upgraded io.jsonwebtoken:jjwt-jackson from 0.11.5 to 0.12.2
- upgraded io.jsonwebtoken:jjwt-impl from 0.11.5 to 0.12.2
- upgraded io.jsonwebtoken:jjwt-api from 0.11.5 to 0.12.2
- upgraded org.flywaydb:flyway-core from 9.22.2 to 9.22.3
- upgraded org.springframework.boot:spring-boot-starter-parent from 3.1.4 to 3.1.5
- upgraded io.sentry:sentry-spring-boot-starter-jakarta from 6.30.0 to 6.32.0
- upgraded org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11
- revert maven structure changes (parent pom, child pom's for each module) due to problems with maven publishing
- new maven structure (parent pom, child pom's for each module)
- dependency upgrades:
- spring-boot:
3.1.3
->3.1.4
- maven-javadoc-plugin:
3.5.0
->3.6.0
- flyway-core:
9.19.4
->9.22.2
- unboudid-ldapsdk:
6.0.9
->6.0.10
- hibernate-jpamodelgen:
6.2.7.Final
->6.3.1.Final
- spring-boot:
- bump
com.h2database:h2
from2.2.220
to2.2.224
- bump
io.sentry:sentry-spring-boot-starter-jakarta
from6.28.0
to6.29.0
- bump
org.apache.maven.plugins:maven-javadoc-plugin
from3.5.0
to3.6.0
- upgrade to Spring Boot
3.1.3
- upgrade
com.nulab-inc:zxcvbn
from1.8.0
to1.8.2
- upgrade
io.sentry:sentry-spring-boot-starter-jakarta
from6.27.0
to6.28.0
- upgrade
org.springdoc:springdoc-openapi-starter-webmvc-ui
from2.1.0
to2.2.0
- upgrade
org.yaml:snakeyaml
from2.0
to2.2
- fix typo in
docker/build_docker_image.sh
- add
loginDisabled
flag to user dto's
- Refactoring according to the new name of the project
- Cleanup Postman collection
- free choice of ID strategy (Global ID, ID per table, UUID) for entities
- Introduction of three basic implementation libraries for an easy start in application development
- essencium-backend-identity-model (using ID per table as ID strategy, on PostgreSQL)
- essencium-backend-sequence-model (using Global ID as ID strategy, on PostgreSQL)
- essencium-backend-uuid-model (using UUID as ID strategy)
- Restructuring of the role-rights model
Entity | previous structure | new structure |
---|---|---|
User | { "createdBy": null, "updatedBy": "devnull@frachtwerk.de", "createdAt": "2023-06-14T16:58:16.3574", "updatedAt": "2023-07-19T10:56:09.772018", "id": 18, "enabled": true, "email": "devnull@frachtwerk.de", "firstName": "Admin", "lastName": "User", "phone": "", "mobile": "", "locale": "en", "role": { "createdBy": null, "updatedBy": null, "createdAt": "2023-06-14T16:58:16.121704", "updatedAt": "2023-06-14T16:58:16.121704", "id": 16, "name": "ADMIN", "description": "Application Admin", "rights": [ { "id": 1, "name": "USER_DELETE", "description": "" }, ... { "id": 15, "name": "TRANSLATION_UPDATE", "description": "" } ], "protected": true, "editable": false }, "source": "local" } |
ID's can be long (numbers), as well as UUID (strings) in the future. { "id": "d1ff0efa-cd3e-4fb1-b10d-dd7de78c9d8f", "firstName": "Admin", "lastName": "User", "phone": null, "mobile": null, "email": "devnull@frachtwerk.de", "locale": "de", "role": { "name": "ADMIN", "description": "Application Admin", "rights": [ { "authority": "USER_DELETE", "description": "" }, ... { "authority": "TRANSLATION_UPDATE", "description": "" } ], "protected": true, "editable": false } } |
Role | { "createdBy": null, "updatedBy": null, "createdAt": "2023-06-14T16:58:16.121704", "updatedAt": "2023-06-14T16:58:16.121704", "id": 16, "name": "ADMIN", "description": "Application Admin", "rights": [ { "id": 1, "name": "USER_DELETE", "description": "" }, ... { "id": 15, "name": "TRANSLATION_UPDATE", "description": "" } ], "protected": true, "editable": false } |
{ "name": "ADMIN", "description": "Application Admin", "rights": [ { "authority": "USER_DELETE", "description": "" }, ... { "authority": "TRANSLATION_UPDATE", "description": "" } ], "protected": true, "editable": false } |
Right | { "id": 1, "name": "USER_DELETE", "description": "" } | { "authority": "USER_DELETE", "description": "" } |
- Upgraded Spring Boot from
3.1.0
to3.1.2
- fixes CVE-2023-34036 (spring-hateoas)
- fixes CVE-2023-34034 (spring-security-web & spring-security-config)
- fixes CVE-2023-34035 (spring-security-config)
- Upgraded
io.sentry:sentry-spring-boot-starter-jakarta
from6.25.0
to6.25.2
- Upgraded
com.lazerycode.jmeter:jmeter-maven-plugin
from3.7.0
to3.8.0
- Upgraded Spring Boot from
3.1.0
to3.1.1
- fixes CVE-2023-34981
- Upgraded
com.github.tomakehurst:wiremock
from3.0.0-beta-9
to3.0.0-beta-10
- Upgraded
com.h2database:h2
from2.1.214
to2.2.220
- Upgraded
io.sentry:sentry-spring-boot-starter-jakarta
from6.22.0
to6.25.0
- Upgraded
com.nulab-inc:zxcvbn
from1.7.0
to1.8.0
- Upgraded
org.hibernate.orm:hibernate-jpamodelgen
from6.2.4.Final
to6.2.6.Final
- fix: Immutable Map causes UnsupportedOperationException
- added GNU LGPL license header to all files
- make UserRepository and RoleService accessible by inhabitants of AbstractUserService
- AbstractUserController now allows to choose Representation-Entity. Default is User-Entity.
- Sentry-Yaml Configuration
- Adding new Post-Method for User-Feedback (Sentry)
- Upgraded Spring Boot from
3.0.6
to3.1.0
- Reconfigured
HttpSecurity
since e.g.cors()
ist deprecated and marked for removal and has to be replaced bycors(Customizer.withDefaults())
(see https://github.com/spring-projects/spring-security/releases/tag/6.1.0)
- Reconfigured
- Upgraded
com.github.tomakehurst.wiremock
from3.0.0-beta-8
to3.0.0-beta-9
- Upgraded
unboundid-ldapsdk
from6.0.8
to6.0.9
- Upgraded
jakarta.mail
from2.0.1
to2.0.2
- Upgraded
sentry-spring-boot-starter-jakarta
from6.18.1
to2.22.0
- Upgraded
specification-arg-resolver
from3.0.1
to3.1.0
- Upgraded
hibernate-jpamodelgen
from6.2.1.Final
to6.2.4.Final
- Upgraded
yclonedx-maven-plugin
from2.7.7
to2.7.9
- removed jetbrains-annotations dependency (see https://git.frachtwerk.de/web-starter/backend/-/issues/190)
- fix
createdBy
andupdatedBy
being null in PUT requests ( see https://git.frachtwerk.de/web-starter/backend/-/issues/128) - init
getAllowedMethods()
in AccessAwareController. This method provides a default set of allowed HTTP-Methods and can be overridden if needed. By default, the following methods are offered in the OPTIONS request:HttpMethod.GET, HttpMethod.HEAD, HttpMethod.POST, HttpMethod.PUT, HttpMethod.PATCH, HttpMethod.DELETE, HttpMethod.OPTIONS
( see https://git.frachtwerk.de/web-starter/backend/-/issues/177)
- fix sentry integration (wasn't sending anymore)
- dependency upgrades:
com.github.tomakehurst.wiremock
:3.0.0-beta-4
->3.0.0-beta-7
- test dependency, no breaking changes
org.springdoc.springdoc-openapi-starter-webmvc-ui
:2.0.4
->2.1.0
- several internal dependency upgrades, no breaking changes
io.sentry.sentry-spring-boot-starter
:6.16.0
->6.17.0
- several additional parameters which can be transmitted, no breaking changes
org.hibernate.orm.hibernate-jpamodelgen
:6.1.7.Final
->6.2.1.Final
- deprecation of several methods:
- deprecate GenerationTime
- deprecate @Target, @Proxy, @Polymorphism
- deprecate FilterKey and QuerySpacesHelper
- deprecated CacheModeType
- deprecate lock(entityName,...)
- SelectionQuery.setAliasSpecificLockMode() confusion
- deprecate LockRequest and buildLockRequest(), and have lock() accept LockOptions
- deprecate SessionFactory.getFilterDefinition()
- several improvements and bugfixes
- no breaking changes concerning the essencium backend
- deprecation of several methods:
- Fix: LDAP-Group-Sync
- see migration guide
- known Issue: Only one role can be assigned to a User. If a user is in multiple groups in LDAP, only one match will be accepted and mapped.
- Replace dedicated info endpoint with actuator
- Prevent default admin creation when an admin user is already present
- Set 'protected' flag for USER role to 'false'
- Make admin-user configurable in environment variables
- switched from
springfox-swagger-ui
tospringdoc-openapi-starter-webmvc-ui
- Breaking Change in documenting an API:
- Spring Boot -> 3.0.5 (https://github.com/spring-projects/spring-boot/releases/tag/v3.0.5)
javax
-packages migrated to correspondingjakarta
-packages- code formatter upgraded from
1.39
->4.2
- added
jvm.config
according to https://github.com/Cosium/git-code-format-maven-plugin
- added
- CI/CD-Pipeline-Images upgraded to openjdk-17
- Docker base image switched to
amazoncorretto:17
- Dependencies upgraded to Spring Boot 3.0.x versions
- No more support for Java versions < 17 as several dependencies require Java 17.
- Hibernate 6.1.x Breaking Changes
GenericGenerator
deprecated (see Migration)- Table- and entity-naming strategies have changed.
- Removed deprecated
RestrictToOwnedEntities
- In every project depending on this library this code snippet has to be added
in
<project-root, same as pom.xml>/.mvn/jvm.config
:
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
org.hibernate.dialect.PostgreSQL10Dialect
has to be replaced byorg.hibernate.dialect.PostgreSQLDialect
in every profile-yaml using it.- jwt-secrets have to be at least 32 char
- dependency-versions have to be checked individually
- Projects using this old code snippet have to change to the new one since
GenerationType.AUTO
isn't supported by Hibernate 6.1.x anymore:
// old code
public class NativeIdModel extends AbstractModel {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "native")
@SequenceGenerator(name = "native", sequenceName = "native", allocationSize = 1)
private Long id;
}
// new code
public abstract class SequenceIdModel extends AbstractModel {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hibernate_sequence")
@SequenceGenerator(
name = "hibernate_sequence",
sequenceName = "hibernate_sequence",
allocationSize = 1)
private Long id;
}
// If you have used `sequenceName = "native"` in your Project before, you should implement your own id using a SequenceGenerator with `sequenceName = "native"`.
- Projects using this old code snippet have to change to the new one since
"org.hibernate.type.TextType
isn't supported by Hibernate 6.1.x anymore. Additionally@Lob
is currently converted into CLOB by Hibernate which is currently unsupported by PostgreSQL.
// old
public class Example extends NativeIdModel {
@Lob
@Type(type = "org.hibernate.type.TextType")
private String string;
}
// new
public class Example extends SequenceIdModel {
@JdbcTypeCode(Types.LONGVARCHAR)
private String string;
}
javax
has dto be replaced byjakarta
- Pipeline and docker images have to be upgraded
- To keep the "FW_" table prefix, the following has to be added in
application.yaml
:
essencium-backend:
jpa:
table-prefix: "FW_"
- The default table naming strategy of hibernate and spring boot has changed. The new style uses camelCase column names.
To activate the previously used
under_score
-style the following has to be added inapplication.yaml
:
essencium-backend:
jpa:
camel-case-to-underscore: true
- cleanup pom.xml
- upgrade postgresql
42.4.1
->42.4.3
- prevent patch method from using GET-Pre- & PostProcessing of getById
- resolve several vulnerabilities in
org.yaml:snakeyaml
by upgrading1.30
->1.32
- resolve vulnerability in
com.fasterxml.jackson.core:jackson-databind
by upgrading2.13.4
->2.13.4.2
- resolve vulnerability in
org.springframework.security:spring-security-core
by upgrading5.7.4
->5.7.5
- resolve several vulnerabilities in
org.springframework.security:spring-security-oauth2-client
by upgrading5.7.4
->5.7.5
- resolve several vulnerabilities in
org.springframework.security:spring-security-web
by upgrading5.7.4
->5.7.5
org.springframework:spring-web:5.3.23
could be updated to5.3.25
, but even there CVE-2016-1000027 is documented. Upgrading to a version >=6.0.0
would solve this problem, but requires Java 17 and Spring Boot 3.0.0
- Version Upgrade
specification-arc-resolver. (https://github.com/tkaczmarzyk/specification-arg-resolver/blob/master/CHANGELOG.md). Only
upgraded to version
2.15.0
since from 2.15.1 on Spring Boot 2.7.7 is required
- Bugfix for redundant joins
- JDK 17 support
- join fetch aliases in specification paths
- support for additional Types in Converter (several time formats like
Calender
,TimeStamp
)
Introduced SpecificationBuilder
(
Specification<Customer> spec = SpecificationBuilder.specification(CustomerByOrdersSpec.class).withParams("orderItem", "Pizza").build();
)
- swagger support improved
- introduced
OnTypeMismatch.IGNORE
- introduced InTheFuture specification, that supports date-type paths
- introduced InThePast specification, that supports date-type paths
- Specification for access rights check can be called separately via
AccessAwareSpecArgResolver
For controller methods annotated e.g. with
public class SomeController {
@Secured("FILE_READ")
public void someMethod();
}
// or
public class SomeController {
@RestrictAccessToOwnedEntities(rights = {"PERSON_READ_OWN"})
@Secured({"PERSON_READ_ALL", "PERSON_READ_OWN"})
public void someMethod();
}
are annotated only the presence of these rights (and possibly _OWN
implementations) will be checked. If multiple
permissions are specified, they are OR-linked, so only one of them must be true.
In case such permissions should be AND-linked and in particular the permissions of another controller method (different
controller) should also be checked, the AccessAwareSpecArgResolver
provides the new
method
getRestrictionSpec(MethodParameter parameter, NativeWebRequest webRequest, List<Specification<Object>> baseList)
.
You get a specification with which for example the service method existsFiltered(Specification spec)
can set the
access to further objects as a condition.
see doc/access_management.md#additionally-check-annotated-access-rights-of-another-method
- set mailAddress of ContactRequest or User (if logged in) as
Sender
in contact mails. The mail will be sent with the defined mail credentials, but the mailAddress will be set asReply to
.
- Add debug receiver for rerouting all outgoing mails to one account
- Update Spring-Boot to 2.7.5 (Spring-Security 5.7.4 + Spring-Framework)
- Major Update H2 Database
- Adding BeanPostProcessor in SwaggerConfig (SpringFox is not compatible with Spring 2.6+)
- Filter out actuator controllers which don’t respect the path-matching-strategy
- Changing Path_Matching_Strategy
- enable valueInSpEL-parameter in
OwnershipSpec
. Now it's possible to use dynamic default values in Ownership-Specification:
@OwnershipSpec.And({
@OwnershipSpec(
path = "start",
constVal = "#{T(java.time.LocalDate).now()}",
valueInSpEL = true,
spec = LessThanOrEqual.class),
@OwnershipSpec(
path = "end",
constVal = "#{T(java.time.LocalDate).now()}",
valueInSpEL = true,
spec = GreaterThanOrEqual.class),
})
public class SomeController {
}
- add OAuth2FailureHandler for logging
- add Proxy configuration for OAuth2
- Update Dependencies from com.fasterxml.jackson.core
- Mails can be sent with attachment
- Fixed incompatible db default for mssql
- Fixed bug in LikeConcatenated filter specification
- add spring-beans to pom explicitly to please vulnerability scanners
- upgrade to Spring-Boot 2.5.12
- upgrade jackson core and databind versions
- fix swagger errors on startup
- extend user specification to allow filtering first- and lastname combinations like "firstname lastname", "lastname, firstname", ...
- optimize Dockerfile to run commands as custom user
- add lombok configuration to ignore lombok generated code in test coverage
- Optimize brute force protection
- allow to set the maximum failed logins limit before a user gets blocked
- only listen to log in success events from
/auth/token
endpoint
- Implement and publish specifications for
createdBy
,createdAt
,updatedBy
andupdatedAt
- Replace vulnerable log4j2 with logback (see #122)
- Clear password reset token after usage (see #117)
- Fix user enumeration bug (using password reset function) ( see #116)
- Block brute-force attacks (see #114)
- Fixed
DefaultRestController
(see #109)
- Fixed bug of translations being overwritten (see #108)
- Minor bugs and code smells (see #65)
- Moved password strength validation from frontend to backend ( see #104
- Fixed contact mail endpoint authentication (#107)
- Fixed contact mail translations (#106)
- Use of 2-digit locales (eg. "de" instead of "de_DE")
- Show JVM version as part of info endpoint
- Upgrade to Spring Boot
2.5.2
- More expressive access management (#68)
- Fixed #101
- Introduction of internationalization for emails (new user, reset password, contact mail)
- Avoid NPE on initialization of Rights
- Use of role ids in UserDTO's instead of whole role object (#86)
- User session termination (#87)
- Introduction of
RoleDto
s for more straightforward creation and updates of roles (#60)
- SLF4J Error (#49)
- When creating a user without password, a welcome mail is sent to the user containing a password reset link
- Switched to Freemarker HTML templates for mails (contact, reset password, new user welcome mail)
- removed
mail.default-sender.override
, since "fake senders" are deprecated - added
mail.branding.*
branch in profiles - migrated
mail.user.new-user.*
tomail.new-user-mail.*
in profiles - migrated
mail.user.reset-token.*
tomail.reset-token-mail.*
in profiles - migrated
mail.contact.*
tomail.contact-mail.*
in profiles
- Update right descriptions during initialization
- Validate certain config properties on startup
- For instance, you must specify
MAIL_TEMPLATE_RESET_SUBJECT
now
- For instance, you must specify
- Add translations for default role descriptions
- Return
409
status when attempting to create user with conflicting e-mail address
- Updated Spring Boot to version
2.4.2