Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit e13d25c

Browse files
Tim Bertholddependabot[bot]vdakkereakker
authored
release: v5.2.0 (#375)
* feat: throw exception and log error if no private key for alias found (#264) * feat: throw exception and log error if no private key for alias found * refactor: add used keyalias to printed logs * feat: check incoming payload for valid json and securityProfile attr (#266) * feat: check incoming payload for valid json and securityProfile attr * docs: update changelog * feat: enable or disable infomodel compatibility check (#267) * feat: enable or disable infomodel compatibility check via application properties * chore: fix checkstyle error * refactor: logs message reason formats (#269) * build(deps): bump infomodel-artifacts from 4.2.0 to 4.2.1 (#270) * build(deps): bump infomodel-artifacts from 4.2.0 to 4.2.1 * docs: update readme * chore: minor javadoc refactoring * docs: add missing throws to IDSBrokerService javadoc * refactor: minor log adjustments * docs: prepare release v4.3.0 * docs: add remaining missing throws and javadoc * build: pom set version to 4.3.1 * build(deps): bump checkstyle from 8.45.1 to 9.0 (#275) * build(deps): bump checkstyle from 8.45.1 to 9.0 Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.45.1 to 9.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-8.45.1...checkstyle-9.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * docs: update changelog Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Berthold <tim.berthold@isst.fraunhofer.de> * Add new Clearinghouse Endpoint for registering PIDs (#276) * [CLEARINGHOUSE] #FEAT 'file:ClearingHouseService' {Create method specification for registering PIDs at clearinghouse} * [CLEARINGHOUSE] #CHORE 'file:ClearingHouseService' {Remove sendlogtoclrearinghouse with random pid generation} * [CLEARINGHOUSE] #FEAT 'file:ClearingHouseService' {Implement method for sending pid request} * [CLEARINGHOUSE] #FIX 'file:ClearingHouseService' {Add PID to path, create RequestMessage Template} * [MESSAGING] #FIX 'file:RequestTemplateProvider' {Fix Checkstyle} * [CLEARINGHOUSE] #FIX 'file:ClearingHouseService' {Fix Checkstyle} * [CLEARINGHOUSE] #FEAT 'file:ClearingHouseService' {Make pid registering connectorIDs varargs, allow for arbitrary numbner of connectors sharing a pid} * refactor: code adjustments * build: set new version in pom * docs: update changelog Co-authored-by: Tim Berthold <75306992+tmberthold@users.noreply.github.com> Co-authored-by: Tim Berthold <tim.berthold@isst.fraunhofer.de> * docs: update changelog * fix: new clearinghouse process endpoint setting * fix: response codes outside 200-299 provoke IOExceptions (#278) * fix: response codes outside 200-299 provoke IOExceptions * docs: update changelog, add links * refactor: remove not yet supported useIDSCP and useLDP (#279) * build(deps): bump maven-javadoc-plugin from 3.3.0 to 3.3.1 (#281) * build(deps): bump maven-javadoc-plugin from 3.3.0 to 3.3.1 Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](apache/maven-javadoc-plugin@maven-javadoc-plugin-3.3.0...maven-javadoc-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * docs: update changelog Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Berthold <tim.berthold@isst.fraunhofer.de> * chore: update infomodel artifacts 4.2.1 -> 4.2.3 (#289) * chore: update infomodel artifacts 4.2.1 -> 4.2.3 * docs: update changelog * docs: update readme * feat: log-debug outgoing messages (#286) * feat: log-debug outgoing messages * chore: fix checkstyle * chore: fix javadoc * docs: update changelog * feat: check if keystore-location is null on init (#291) * feat: check if keystore-location is null on init * chore: refactor javadoc * feat: validity check for proxy hostname (#285) * feat: Proxy-Config, if no hostname set, issue warn message and try sending without proxy * docs: update changelog * chore: add check for proxy port * test: fix ConfigProducerTest testProvider * chore: update test comment Co-authored-by: eakker <erik.van.den.akker@isst.fraunhofer.de> * chore: update org.junit.jupiter dependencies (#295) * chore: update org.junit.jupiter dependencies * chore: update changelog * docs: prepare release v5.0.0 * build(deps): bump spring dependencies (#302) * build(deps): bump spring-web from 5.3.9 to 5.3.10 (#301) Bumps [spring-web](https://github.com/spring-projects/spring-framework) from 5.3.9 to 5.3.10. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.9...v5.3.10) --- updated-dependencies: - dependency-name: org.springframework:spring-web dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-webmvc from 5.3.9 to 5.3.10 (#300) Bumps [spring-webmvc](https://github.com/spring-projects/spring-framework) from 5.3.9 to 5.3.10. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.9...v5.3.10) --- updated-dependencies: - dependency-name: org.springframework:spring-webmvc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump spring-test from 5.3.9 to 5.3.10 (#299) Bumps [spring-test](https://github.com/spring-projects/spring-framework) from 5.3.9 to 5.3.10. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.9...v5.3.10) --- updated-dependencies: - dependency-name: org.springframework:spring-test dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-tx from 5.3.9 to 5.3.10 (#298) Bumps [spring-tx](https://github.com/spring-projects/spring-framework) from 5.3.9 to 5.3.10. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.9...v5.3.10) --- updated-dependencies: - dependency-name: org.springframework:spring-tx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-core from 5.3.9 to 5.3.10 (#297) Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.3.9 to 5.3.10. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.9...v5.3.10) --- updated-dependencies: - dependency-name: org.springframework:spring-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): spring dependency maintenance * build(pom): bump version to 5.0.1 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(pom): exclude jena-core 4.1.0 use 4.2.0 instead (#303) * build(pom): exclude jena-core 4.1.0 use 4.2.0 instead * docs: update changelog * docs: update changelog * build: update infomodel-artifacts to v4.2.4 (#307) * build(pom): update infomodel-artifacts to v4.2.4 * docs(changelog): add infomodel maintenance * docs(changelog): fix link in infomodel maintenance * docs(readme): update used infomodel artifacts * build(pom): increase messaging-services to v5.0.2 * build(deps): bump junit-jupiter dependencies from 5.8.0 to 5.8.1 (#311) * build(deps-dev): bump junit-jupiter-engine from 5.8.0 to 5.8.1 (#310) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.8.0 to 5.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump junit-jupiter from 5.8.0 to 5.8.1 (#309) Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.8.0 to 5.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump junit-jupiter-api from 5.8.0 to 5.8.1 (#308) Bumps [junit-jupiter-api](https://github.com/junit-team/junit5) from 5.8.0 to 5.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): add org.junit.jupiter updates Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-boot-starter dependencies from 2.5.4 to 2.5.5 (#314) * build(deps): bump spring-boot-starter from 2.5.4 to 2.5.5 (#313) Bumps [spring-boot-starter](https://github.com/spring-projects/spring-boot) from 2.5.4 to 2.5.5. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.4...v2.5.5) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump spring-boot-starter-test from 2.5.4 to 2.5.5 (#312) Bumps [spring-boot-starter-test](https://github.com/spring-projects/spring-boot) from 2.5.4 to 2.5.5. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.4...v2.5.5) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): bump spring-boot-starter dependencies Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump checkstyle from 9.0 to 9.0.1 (#319) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.0 to 9.0.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-9.0...checkstyle-9.0.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump mockwebserver from 4.9.1 to 4.9.2 (#318) Bumps [mockwebserver](https://github.com/square/okhttp) from 4.9.1 to 4.9.2. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](square/okhttp@parent-4.9.1...parent-4.9.2) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:mockwebserver dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: vdakker <75307507+vdakker@users.noreply.github.com> * build(deps): bump okhttp from 4.9.1 to 4.9.2 (#317) * build(deps): bump okhttp from 4.9.1 to 4.9.2 Bumps [okhttp](https://github.com/square/okhttp) from 4.9.1 to 4.9.2. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](square/okhttp@parent-4.9.1...parent-4.9.2) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add updates to CHANGELOG.md * chore: add pull request info to CHANGELOG.md Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: vdakker <75307507+vdakker@users.noreply.github.com> * build(deps): bump lombok from 1.18.20 to 1.18.22 (#320) * build(deps): bump lombok from 1.18.20 to 1.18.22 Bumps [lombok](https://github.com/projectlombok/lombok) from 1.18.20 to 1.18.22. - [Release notes](https://github.com/projectlombok/lombok/releases) - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](projectlombok/lombok@v1.18.20...v1.18.22) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add pull request info to CHANGELOG.md Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: vdakker <75307507+vdakker@users.noreply.github.com> * chore: upgrade spring 5.3.10 -> 5.3.11 (#326) * chore: upgrade spring 5.3.10 -> 5.3.11 * chore: upgrade PR info in CHANGELOG.md * feat: add log error codes (#332) * feat: add log error codes for error-level * feat: add log error codes for warn-level * feat: add log error codes for info-level * feat: add log error codes for debug-level * chore: fix checkstyle warning * docs: update changelog * build: update infomodel-artifacts to v4.2.5 (#330) * build(deps): infomodel artifacts 4.2.5 * docs(readme): update infomodel artifacts * docs: update changelog * Add check for referredConnector in MessageDispatcher (#329) * feat: add check for referredConnector in MessageDispatcher * chore: add referred.check flag defaulting to false * chore: fix checkstyle * chore: fix checkstyle * docs: edit CHANGELOG.md * chore: update changelog and pom to new minor version Co-authored-by: Tim Berthold <tim.berthold@isst.fraunhofer.de> * chore: remove log-codes from log-info level * docs(readme): adapted description for log-codes * docs(changelog): adjustments to the descriptions and setting of a release date * docs(changelog): fix typos in dependency maintenance * refactor(MessageDispatcher): include issuerConnector and referringConnector URI in Rejectionmessage * docs(changelog): update description for referringConnector validation * build(deps): update spring dependencies (#341) * build(deps): bump spring-boot-starter from 2.5.5 to 2.5.6 (#340) Bumps [spring-boot-starter](https://github.com/spring-projects/spring-boot) from 2.5.5 to 2.5.6. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.5...v2.5.6) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-core from 5.3.11 to 5.3.12 (#339) Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.3.11 to 5.3.12. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.11...v5.3.12) --- updated-dependencies: - dependency-name: org.springframework:spring-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-webmvc from 5.3.11 to 5.3.12 (#338) Bumps [spring-webmvc](https://github.com/spring-projects/spring-framework) from 5.3.11 to 5.3.12. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.11...v5.3.12) --- updated-dependencies: - dependency-name: org.springframework:spring-webmvc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump spring-boot-starter-test from 2.5.5 to 2.5.6 (#337) Bumps [spring-boot-starter-test](https://github.com/spring-projects/spring-boot) from 2.5.5 to 2.5.6. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.5...v2.5.6) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-tx from 5.3.11 to 5.3.12 (#336) Bumps [spring-tx](https://github.com/spring-projects/spring-framework) from 5.3.11 to 5.3.12. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.11...v5.3.12) --- updated-dependencies: - dependency-name: org.springframework:spring-tx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-web from 5.3.11 to 5.3.12 (#335) Bumps [spring-web](https://github.com/spring-projects/spring-framework) from 5.3.11 to 5.3.12. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.11...v5.3.12) --- updated-dependencies: - dependency-name: org.springframework:spring-web dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump spring-test from 5.3.11 to 5.3.12 (#334) Bumps [spring-test](https://github.com/spring-projects/spring-framework) from 5.3.11 to 5.3.12. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.11...v5.3.12) --- updated-dependencies: - dependency-name: org.springframework:spring-test dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): add spring updates * build(pom): set revision to 5.1.1 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(AisecTokenManagerService): log response body if DAT request fails (#342) * feat(AisecTokenManagerService): print response body at DAT request failure * docs(changelog): add as enhancement * build(deps): update infomodel artifacts to v4.2.6 (#343) * build(deps): update infomodel artifacts to v4.2.6 * docs(readme): update infomodel artifacts to v4.2.6 * docs(changelog): update infomodel artifacts to v4.2.6 * docs(changelog): add release date for v5.1.1 * build(deps): bump checkstyle from 9.0.1 to 9.1 (#347) * build(deps): bump checkstyle from 9.0.1 to 9.1 Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.0.1 to 9.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-9.0.1...checkstyle-9.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * docs(changelog): add dependency maintenance * build: update revision to 5.1.2 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Berthold <75306992+tmberthold@users.noreply.github.com> * build(deps): infomodel artifacts 4.2.7 (#350) * build(deps): bump interaction from 4.2.6 to 4.2.7 (#348) Bumps interaction from 4.2.6 to 4.2.7. --- updated-dependencies: - dependency-name: de.fraunhofer.iais.eis.ids:interaction dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump infomodel-serializer from 4.2.6 to 4.2.7 (#349) Bumps infomodel-serializer from 4.2.6 to 4.2.7. --- updated-dependencies: - dependency-name: de.fraunhofer.iais.eis.ids:infomodel-serializer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): infomodel artifact java 4.2.7 * test: adapt major changes in test setups * docs(changelog): update infomodel maintenance * docs(readme): update IDS-Infomodel-Artifacts Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: log claimsexception-message if securityprofile could not be verified (#352) * feat: log claimsexception-message if securityprofile could not verified * docs(changelog): add enhancement * refactor(DapsValidator): adjusted log message * docs(changelog): update SecurityProfile enhancement * refactor(DapsValidator): code refactoring and removing of trailing : at end of profile names * feat(AisecTokenManagerService): optional additional logging of DAPS response (#353) * feat(AisecTokenManagerService): optional additional logging of DAPS response * refactor(AisecTokenManagerService): log syntax * build(pom): set revision to 5.2.0 * docs(changelog): add text for new option * feat: cache DAT expiration and make DAT caching deactivatable and DAPS offset adjustable (#354) * feat(AisecTokenManagerService): new app.props var to configure DAPS time offset for nbf and isa in JWT to DAPS * docs(changelog): add daps.time.offset * fix(TokenProviderService): save DAT expiration on receipt instead of reading the claims each time * docs(changelog): add text for expiration date caching * feat(TokenProviderService): new app.props var to enable or disable caching of DAPS DAT * docs(changelog): add new app.props and log enhancements * refactor(TokenProviderService): only log cached DAT expiration info if DAT cached * chore: fix checkstyle * docs(changelog): add PR references * build(deps): spring updates (#360) * build(deps-dev): bump spring-test from 5.3.12 to 5.3.13 (#359) Bumps [spring-test](https://github.com/spring-projects/spring-framework) from 5.3.12 to 5.3.13. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.12...v5.3.13) --- updated-dependencies: - dependency-name: org.springframework:spring-test dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-tx from 5.3.12 to 5.3.13 (#358) Bumps [spring-tx](https://github.com/spring-projects/spring-framework) from 5.3.12 to 5.3.13. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.12...v5.3.13) --- updated-dependencies: - dependency-name: org.springframework:spring-tx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-webmvc from 5.3.12 to 5.3.13 (#357) Bumps [spring-webmvc](https://github.com/spring-projects/spring-framework) from 5.3.12 to 5.3.13. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.12...v5.3.13) --- updated-dependencies: - dependency-name: org.springframework:spring-webmvc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-web from 5.3.12 to 5.3.13 (#356) Bumps [spring-web](https://github.com/spring-projects/spring-framework) from 5.3.12 to 5.3.13. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.12...v5.3.13) --- updated-dependencies: - dependency-name: org.springframework:spring-web dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-core from 5.3.12 to 5.3.13 (#355) Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.3.12 to 5.3.13. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v5.3.12...v5.3.13) --- updated-dependencies: - dependency-name: org.springframework:spring-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): add spring updates Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): update spring dependencies (#363) * build(deps-dev): bump spring-boot-starter-test from 2.5.6 to 2.5.7 (#362) Bumps [spring-boot-starter-test](https://github.com/spring-projects/spring-boot) from 2.5.6 to 2.5.7. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.6...v2.5.7) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-boot-starter from 2.5.6 to 2.5.7 (#361) Bumps [spring-boot-starter](https://github.com/spring-projects/spring-boot) from 2.5.6 to 2.5.7. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.6...v2.5.7) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): add spring-starter updates Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump okhttp from 4.9.2 to 4.9.3 (#372) * build(deps): bump okhttp from 4.9.2 to 4.9.3 Bumps [okhttp](https://github.com/square/okhttp) from 4.9.2 to 4.9.3. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](square/okhttp@parent-4.9.2...parent-4.9.3) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * docs(changelog): okhttp update Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Berthold <75306992+tmberthold@users.noreply.github.com> * build(deps-dev): bump mockwebserver from 4.9.2 to 4.9.3 (#371) * build(deps-dev): bump mockwebserver from 4.9.2 to 4.9.3 Bumps [mockwebserver](https://github.com/square/okhttp) from 4.9.2 to 4.9.3. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](square/okhttp@parent-4.9.2...parent-4.9.3) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:mockwebserver dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * docs(changelog): mockwebserver update Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Berthold <75306992+tmberthold@users.noreply.github.com> * build(deps): update spring dependencies (#373) * build(deps-dev): bump spring-boot-starter-test from 2.5.7 to 2.6.0 (#370) Bumps [spring-boot-starter-test](https://github.com/spring-projects/spring-boot) from 2.5.7 to 2.6.0. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.7...v2.6.0) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump spring-boot-starter from 2.5.7 to 2.6.0 (#369) Bumps [spring-boot-starter](https://github.com/spring-projects/spring-boot) from 2.5.7 to 2.6.0. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v2.5.7...v2.6.0) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(spring): force reset Path-Matching-Strategy for Spring MVC * docs(changelog): add spring updates Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor: rename new application properties (#374) * refactor: rename new application properties * docs(changelog): rename new application properties * chore: fix typo in new properties * docs(changelog): add release date Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: vdakker <75307507+vdakker@users.noreply.github.com> Co-authored-by: eakker <erik.van.den.akker@isst.fraunhofer.de>
1 parent 52bab69 commit e13d25c

File tree

10 files changed

+160
-83
lines changed

10 files changed

+160
-83
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,37 @@
99
# Changelog
1010
All notable changes to this project will be documented in this file.
1111

12+
## Version [5.2.0] 2021-11-24
13+
14+
### Minor Change: New application.properties flags
15+
- `daps.enable.log.jwt=true/false`, to enable DAPS response logging including the JWT. Default if not set is `false` (logging not enabled). ([PR 353](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/353))
16+
- `daps.enable.cache.dat=true/false`, enables or disables caching of DAPS DAT. Default if not set is `true` (caching enabled). ([PR 354](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/354))
17+
- `daps.time.offset.seconds=<INTEGER>`, to freely configure a possible time difference between the system of the connector and the DAPS. The entered interger value is subtracted from the current time in the form of seconds and the `isa` and `nbf` are set in the JWT from the connector to the DAPS with the adjusted time. Default if not set is `10` (current time minus 10 seconds). ([PR 354](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/354))
18+
19+
### Patch Change: Enhancements
20+
- If the validation of the SecurityProfile is performed and is not successful, the reason is now also output in the logs. Possible reasons: no security profile given in DAT; registered security profile at DAPS does not match given security profile in message. ([PR 352](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/352))
21+
- When a DAPS DAT is received, the expiry time is cached directly when the DAT is received instead of being read from the claims for each message to be sent. Prevents an error-log-message from the JWT parser. ([Issue 351](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/issues/351))
22+
- When using a cached DAPS DAT for sending a message, the expiration date is now logged at info-level, e.g. `Using cached DAPS DAT. [expiration=(Thu Nov 11 13:08:13 CET 2021)]` ([PR 354](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/354))
23+
24+
### Patch Change: Infomodel Maintenance
25+
- Used Dependency Version: 4.2.7 ([PR 350](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/350))
26+
- Used Artifacts: java, infomodel-serializer, interaction
27+
- Note: There can be major changes depending on the setup, identified by us could be following:
28+
- Configmodel: value of `ids:hasDefaultEndpoint` `@id` needs to be different from values of `ids:curator` `@id` and `ids:maintainer` `@id`, was allowed before (e.g. for testing).
29+
- Serializer: `tokenvalue` of `DynamicAttributeToken` must not contain an empty string anymore (e.g. for testing or also in incoming requests), otherwise the serializer throws an `IOException` during deserializing -> `The following mandatory field(s) of DynamicAttributeToken are not filled or invalid: ids:tokenValue. [...]`. This change has no impact on the functionality of the `TEST_DEPLOYMENT`: if no DAT can be fetched, we use a dummy value as `tokenvalue` and thus no empty string. However, if, for whatever reason, requests are received with an empty `tokenvalue` in `TEST_DEPLOYMENT`, the serializer will now throw an `IOException`.
30+
31+
### Patch Change: Dependency Maintenance
32+
- Upgrade: org.springframework.boot:spring-boot-starter-test 2.5.6 -> 2.6.0 ([PR 363](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/363), [PR 373](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/373))
33+
- Upgrade: org.springframework.boot:spring-boot-starter 2.5.6 -> 2.6.0 ([PR 363](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/363), [PR 373](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/373))
34+
- Upgrade: org.springframework:spring-webmvc 5.3.12 -> 5.3.13 ([PR 360](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/360))
35+
- Upgrade: org.springframework:spring-core 5.3.12 -> 5.3.13 ([PR 360](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/360))
36+
- Upgrade: org.springframework:spring-web 5.3.12 -> 5.3.13 ([PR 360](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/360))
37+
- Upgrade: org.springframework:spring-test 5.3.12 -> 5.3.13 ([PR 360](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/360))
38+
- Upgrade: org.springframework:spring-tx 5.3.12 -> 5.3.13 ([PR 360](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/360))
39+
- Upgrade: com.puppycrawl.tools:checkstyle 9.0.1 -> 9.1 ([PR 347](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/347))
40+
- Upgrade: com.squareup.okhttp3:mockwebserver 4.9.2 -> 4.9.3 ([PR 371](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/371))
41+
- Upgrade: com.squareup.okhttp3:okhttp 4.9.2 -> 4.9.3 ([PR 372](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/372))
42+
1243
## Version [5.1.1] 2021-10-26
1344

1445
### Patch Change: Enhancements

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ The following IDS-Infomodel-Artifacts are used as dependencies.
2525

2626
| Group | Artifact | Version |
2727
| ------ | ------ | ------ |
28-
| de.fraunhofer.iais.eis.ids.infomodel | java | 4.2.6 |
29-
| de.fraunhofer.iais.eis.ids | infomodel-serializer | 4.2.6 |
30-
| de.fraunhofer.iais.eis.ids | interaction | 4.2.6 |
28+
| de.fraunhofer.iais.eis.ids.infomodel | java | 4.2.7 |
29+
| de.fraunhofer.iais.eis.ids | infomodel-serializer | 4.2.7 |
30+
| de.fraunhofer.iais.eis.ids | interaction | 4.2.7 |
3131

3232
## Overview: Supported IDS-Message protocols
3333

core/src/main/java/de/fraunhofer/ids/messaging/core/daps/DapsValidator.java

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ public boolean checkClaims(final Jws<Claims> claims,
132132
extraAttributes.get("securityProfile").toString());
133133
} catch (ClaimsException e) {
134134
if (log.isWarnEnabled()) {
135-
log.warn("Security profile does not match selfdescription!"
136-
+ " [code=(IMSCOW0033)]");
135+
log.warn("SecurityProfile could not be successfully verified!"
136+
+ " [message=({}), code=(IMSCOW0033)]", e.getMessage());
137137
}
138138
return false;
139139
}
@@ -142,7 +142,8 @@ public boolean checkClaims(final Jws<Claims> claims,
142142
return DapsVerifier.verify(claims);
143143
} catch (ClaimsException e) {
144144
if (log.isWarnEnabled()) {
145-
log.warn("Claims could not be successfully verified! [code=(IMSCOW0034)]");
145+
log.warn("Claims could not be successfully verified! [message=({}),"
146+
+ " code=(IMSCOW0034)]", e.getMessage());
146147
}
147148
return false;
148149
}
@@ -191,36 +192,26 @@ public boolean checkDat(final DynamicAttributeToken token) {
191192
private void verifySecurityProfile(final String registered,
192193
final String given)
193194
throws ClaimsException {
194-
//Replace full URIs (if present) by prefixed values.
195-
//This simplifies the potential number of values these strings can have
196-
var adjustedRegistered = registered;
197-
var adjustedGiven = given;
198-
199195
if (registered == null) {
200196
throw new ClaimsException("Security profile violation."
201-
+ " No security profile given in DAT!");
202-
}
203-
204-
if (registered.startsWith("https://w3id.org/idsa/code/")) {
205-
adjustedRegistered = registered.replace("https://w3id.org/idsa/code/", "idsc:");
197+
+ " No security profile given in DAT!");
206198
}
207199

208-
if (given.startsWith("https://w3id.org/idsa/code/")) {
209-
adjustedGiven = given.replace("https://w3id.org/idsa/code/", "idsc:");
210-
}
200+
final var adjustedRegistered = registered.replace("https://w3id.org/idsa/code/", "idsc:");
201+
final var adjustedGiven = given.replace("https://w3id.org/idsa/code/", "idsc:");
211202

212203
String[] includedProfiles;
213204
switch (adjustedRegistered) {
214205
case "idsc:BASE_CONNECTOR_SECURITY_PROFILE":
215206
case "idsc:BASE_SECURITY_PROFILE":
216207
includedProfiles = baseSecProfVals;
217208
break;
218-
case "idsc:TRUST_SECURITY_PROFILE:":
219-
case "idsc:TRUSTED_CONNECTOR_SECURITY_PROFILE:":
209+
case "idsc:TRUST_SECURITY_PROFILE":
210+
case "idsc:TRUSTED_CONNECTOR_SECURITY_PROFILE":
220211
includedProfiles = trustSecProfVals;
221212
break;
222-
case "idsc:TRUST_PLUS_SECURITY_PROFILE:":
223-
case "idsc:TRUSTED_CONNECTOR_PLUS_SECURITY_PROFILE:":
213+
case "idsc:TRUST_PLUS_SECURITY_PROFILE":
214+
case "idsc:TRUSTED_CONNECTOR_PLUS_SECURITY_PROFILE":
224215
includedProfiles = plusTrustSecProfVals;
225216
break;
226217
default:

core/src/main/java/de/fraunhofer/ids/messaging/core/daps/TokenProviderService.java

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
import java.util.Map;
2424
import java.util.Objects;
2525

26-
import de.fraunhofer.iais.eis.ConnectorDeployMode;
2726
import de.fraunhofer.iais.eis.DynamicAttributeToken;
2827
import de.fraunhofer.iais.eis.DynamicAttributeTokenBuilder;
2928
import de.fraunhofer.iais.eis.TokenFormat;
3029
import de.fraunhofer.ids.messaging.core.config.ClientProvider;
3130
import de.fraunhofer.ids.messaging.core.config.ConfigContainer;
32-
import io.jsonwebtoken.Claims;
3331
import lombok.extern.slf4j.Slf4j;
3432
import okhttp3.Request;
3533
import org.jose4j.jwk.JsonWebKeySet;
@@ -66,6 +64,11 @@ public class TokenProviderService implements DapsTokenProvider, DapsPublicKeyPro
6664
*/
6765
private String currentJwt;
6866

67+
/**
68+
* The expiration date of the cached DAT.
69+
*/
70+
private Date expiration;
71+
6972
/**
7073
* The public keys.
7174
*/
@@ -77,6 +80,12 @@ public class TokenProviderService implements DapsTokenProvider, DapsPublicKeyPro
7780
@Value("${daps.token.url}")
7881
private String dapsTokenUrl;
7982

83+
/**
84+
* Used to switch DAT caching on and off.
85+
*/
86+
@Value("#{new Boolean('${daps.enable.cache.dat:true}')}")
87+
private Boolean cacheDat;
88+
8089
/**
8190
* The Daps key url kid.
8291
*/
@@ -127,18 +136,36 @@ public String provideDapsToken()
127136
ConnectorMissingCertExtensionException,
128137
DapsConnectionException,
129138
DapsEmptyResponseException {
130-
if (this.currentJwt == null || isExpired(currentJwt)) {
139+
if (!cacheDat || currentJwt == null || isExpired()) {
131140
if (log.isDebugEnabled()) {
132141
log.debug("Requesting a new DAT Token from DAPS! [code=(IMSCOD0101), url=({})]",
133142
dapsTokenUrl);
134143
}
135144

136145
currentJwt = tokenManagerService.acquireToken(dapsTokenUrl);
146+
cacheExpiration();
137147
}
138148

139149
return currentJwt;
140150
}
141151

152+
/**
153+
* Will cache the expiration date of the acquired DAPS DAT.
154+
*/
155+
private void cacheExpiration() {
156+
try {
157+
final var token = new DynamicAttributeTokenBuilder()
158+
._tokenFormat_(TokenFormat.JWT)
159+
._tokenValue_(currentJwt)
160+
.build();
161+
final var claims = DapsValidator.getClaims(token, this.publicKeys).getBody();
162+
expiration = claims.getExpiration();
163+
} catch (Exception e) {
164+
//Will force acquire a new token next message request.
165+
expiration = null;
166+
}
167+
}
168+
142169
/**
143170
* Return the Public Key from the DAPS JWKS.
144171
*
@@ -207,27 +234,22 @@ private void getPublicKeys() {
207234
}
208235

209236
/**
210-
* @param jwt The jwt to check expiration.
211237
* @return True if jwt expired.
212238
*/
213-
private boolean isExpired(final String jwt) {
214-
final var token = new DynamicAttributeTokenBuilder()
215-
._tokenFormat_(TokenFormat.JWT)
216-
._tokenValue_(jwt)
217-
.build();
218-
219-
Claims claims;
220-
try {
221-
claims = DapsValidator.getClaims(token, this.publicKeys).getBody();
222-
} catch (ClaimsException e) {
223-
if (configContainer.getConfigurationModel().getConnectorDeployMode()
224-
!= ConnectorDeployMode.TEST_DEPLOYMENT && log.isWarnEnabled()) {
225-
log.warn("Could not parse JWT! Treat JWT as having expired."
226-
+ " [code=(IMSCOW0040)]");
239+
private boolean isExpired() {
240+
final var expired = expiration == null || expiration.before(Date.from(Instant.now()));
241+
242+
if (currentJwt != null) {
243+
//Will only log if DAT was successfully acquired.
244+
if (expired && log.isInfoEnabled()) {
245+
log.info("Cached DAPS DAT expired or no expiration set. [expiration=({})]",
246+
expiration);
247+
} else if (log.isInfoEnabled()) {
248+
log.info("Using cached DAPS DAT. [expiration=({})]",
249+
expiration);
227250
}
228-
229-
return true;
230251
}
231-
return claims.getExpiration().before(Date.from(Instant.now()));
252+
253+
return expired;
232254
}
233255
}

core/src/main/java/de/fraunhofer/ids/messaging/core/daps/aisec/AisecTokenManagerService.java

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.bouncycastle.asn1.x509.SubjectKeyIdentifier;
4646
import org.jetbrains.annotations.NotNull;
4747
import org.json.JSONObject;
48+
import org.springframework.beans.factory.annotation.Value;
4849
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
4950
import org.springframework.stereotype.Component;
5051

@@ -66,9 +67,16 @@ public class AisecTokenManagerService implements TokenManagerService {
6667
public static final int ONE_DAY_IN_SECONDS = 86_400;
6768

6869
/**
69-
* Seconds to subtract for the issued at value.
70+
* Default offset to be used for DAPS and Connector nbf and issued at dates.
71+
* Must also be declared here for special use cases.
7072
*/
71-
public static final int SECONDS_TO_SUBTRACT = 10;
73+
public static final int DEFAULT_TIME_OFFSET = 10;
74+
75+
/**
76+
* Seconds to subtract for the issued at and not before in the JWT to the DAPS.
77+
*/
78+
@Value("#{new Integer('${daps.time.offset.seconds:10}')}")
79+
private Integer offset;
7280

7381
/**
7482
* The ClientProvider.
@@ -80,6 +88,12 @@ public class AisecTokenManagerService implements TokenManagerService {
8088
*/
8189
private final ConfigContainer configContainer;
8290

91+
/**
92+
* Used to switch logging the DAPS response on and off.
93+
*/
94+
@Value("#{new Boolean('${daps.enable.log.jwt:false}')}")
95+
private Boolean logDapsResponse;
96+
8397
/***
8498
* Beautifies Hex strings and will generate a result later used to
8599
* create the client id (XX:YY:ZZ).
@@ -147,7 +161,11 @@ public String acquireToken(final String dapsUrl)
147161
dynamicAttributeToken = getDAT(jwtString);
148162

149163
if (jwtResponse.isSuccessful() && log.isInfoEnabled()) {
150-
log.info("Successfully received DAT from DAPS.");
164+
if (logDapsResponse) {
165+
log.info("Successfully received DAT from DAPS. [response=({})]", jwtString);
166+
} else {
167+
log.info("Successfully received DAT from DAPS.");
168+
}
151169
}
152170
} catch (IOException e) {
153171
handleIOException(e);
@@ -347,15 +365,27 @@ private String getRequestToken(final String targetAudience,
347365
private JwtBuilder getJwtBuilder(final String targetAudience,
348366
final String connectorFingerprint,
349367
final Date expiryDate) {
368+
369+
if (offset == null) {
370+
offset = DEFAULT_TIME_OFFSET;
371+
}
372+
373+
if (log.isDebugEnabled()) {
374+
log.debug("JWT for DAPS request: using offset seconds for issuedAt and notBefore"
375+
+ " [offset=({}), code=(IMSCOD0143)]", offset);
376+
}
377+
378+
final var timeWithOffset = Date.from(Instant.now().minusSeconds(offset));
379+
350380
return Jwts.builder()
351381
.setIssuer(connectorFingerprint)
352382
.setSubject(connectorFingerprint)
353383
.claim("@context", "https://w3id.org/idsa/contexts/context.jsonld")
354384
.claim("@type", "ids:DatRequestToken")
355385
.setExpiration(expiryDate)
356-
.setIssuedAt(Date.from(Instant.now().minusSeconds(SECONDS_TO_SUBTRACT)))
386+
.setIssuedAt(timeWithOffset)
357387
.setAudience(targetAudience)
358-
.setNotBefore(Date.from(Instant.now().minusSeconds(SECONDS_TO_SUBTRACT)));
388+
.setNotBefore(timeWithOffset);
359389
}
360390

361391
/**

core/src/test/resources/configmodel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"ids:hasDefaultEndpoint" : {
2929
"@type": "ids:ConnectorEndpoint",
30-
"@id": "https://example.com",
30+
"@id": "https://example2.com",
3131
"ids:accessURL": {
3232
"@id": "https://localhost:8080/api/ids/data"
3333
}

messaging/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@
5050
<dependency>
5151
<groupId>org.springframework</groupId>
5252
<artifactId>spring-web</artifactId>
53-
<version>5.3.12</version>
53+
<version>5.3.13</version>
5454
</dependency>
5555

5656
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
5757
<!-- License: Apache License, Version 2.0 -->
5858
<dependency>
5959
<groupId>org.springframework</groupId>
6060
<artifactId>spring-webmvc</artifactId>
61-
<version>5.3.12</version>
61+
<version>5.3.13</version>
6262
</dependency>
6363

6464
<!-- https://mvnrepository.com/artifact/org.springframework/spring-tx -->
6565
<!-- License: Apache License, Version 2.0 -->
6666
<dependency>
6767
<groupId>org.springframework</groupId>
6868
<artifactId>spring-tx</artifactId>
69-
<version>5.3.12</version>
69+
<version>5.3.13</version>
7070
</dependency>
7171
</dependencies>
7272

0 commit comments

Comments
 (0)