-
Notifications
You must be signed in to change notification settings - Fork 23
Feature/token validation and authorization #255
Feature/token validation and authorization #255
Conversation
refactoring removed unnecessary class Refactoring
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.
Please fix the formatting issue and we can merge.
return true; | ||
} | ||
} | ||
} catch (JOSEException var15) { |
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.
var15
is not an appropriate variable name here. Catching and rethrowing this doesn't seem to make sense, unless you intended to add logging or some other reporting mechanism.
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.
I see that the verify
method throws exception and it's handled in the calling method, therefore removed this catch clause
src/main/java/org/eclipse/tractusx/managedidentitywallets/utils/CustomSignedJWTVerifier.java
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
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.
If you are satisfied and have no more comments, we can merge.
# [0.5.0-develop.5](v0.5.0-develop.4...v0.5.0-develop.5) (2024-02-27) ### Bug Fixes * fix integration test ([d8084ee](d8084ee)) ### Features * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * Merge PR [#255](#255) ([a0d9bdf](a0d9bdf))
🎉 This PR is included in version 0.5.0-develop.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [0.4.0-develop.9](v0.4.0-develop.8...v0.4.0-develop.9) (2024-03-08) ### Bug Fixes * add a comment to the expiryInstant ([21ac648](21ac648)) * add if statement for creating VC ([0092728](0092728)) * Add missing gradle validation PR [eclipse-tractusx#257](https://github.com/borisrizov-zf/managed-identity-wallet/issues/257) ([f9acf55](f9acf55)) * add missing JSON properties ([5330f64](5330f64)) * **ci:** update node version to 20 ([263e88b](263e88b)) * DAST scan PR [eclipse-tractusx#256](https://github.com/borisrizov-zf/managed-identity-wallet/issues/256) ([1c1f1fb](1c1f1fb)) * fix bug with token re-wrapping ([e047550](e047550)) * fix integration test ([d8084ee](d8084ee)) * **helm:** minor fixes ([49b5530](49b5530)) * **helm:** vc expiration date ([e056108](e056108)) * possible caching vulnerability in action ([eb2e38f](eb2e38f)) * **release:** add missing author, committer emails ([6d49d27](6d49d27)) * **release:** use correct syntax for github actor ([86976a6](86976a6)) * **validation:** credential signer must be equal issuer ([12abe09](12abe09)) ### Features * add api docs, option asJwt ([9dc628b](9dc628b)) * add domain objects needed by sts infrastructure ([effb480](effb480)) * add dto objects for sts infrastructure ([103e7f2](103e7f2)) * add exceptions for sts infrastructure ([b4bb9b7](b4bb9b7)) * add ignoring version ([1785080](1785080)) * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * add logic regarding jti info store and check ([6809578](6809578)) * add missing relationships to entities ([56a48eb](56a48eb)) * add service method, controller, config for scope matching ([4feebd4](4feebd4)) * add sts properties ([018d9c0](018d9c0)) * add token endpoint happy-path test ([d6c30bf](d6c30bf)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * **chart:** add extra volume/-mounts ([0f6252f](0f6252f)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * extend 'miw.security' properties ([e982919](e982919)) * **helm:** add networkPolicy for miw ([502b633](502b633)) * **helm:** allow networkPolicy to template values ([acddcff](acddcff)) * implement token endpoint ([4227f3e](4227f3e)) * improve filter, add exception handling ([579a5ec](579a5ec)) * Merge PR [eclipse-tractusx#252](https://github.com/borisrizov-zf/managed-identity-wallet/issues/252) ([8cb132b](8cb132b)) * Merge PR [eclipse-tractusx#255](https://github.com/borisrizov-zf/managed-identity-wallet/issues/255) ([a0d9bdf](a0d9bdf)) * use a spring validator for SecureTokenRequest ([accc0d2](accc0d2))
# [0.4.0-develop.9](v0.4.0-develop.8...v0.4.0-develop.9) (2024-03-08) ### Bug Fixes * add a comment to the expiryInstant ([21ac648](21ac648)) * add if statement for creating VC ([0092728](0092728)) * Add missing gradle validation PR [eclipse-tractusx#257](https://github.com/borisrizov-zf/managed-identity-wallet/issues/257) ([f9acf55](f9acf55)) * add missing JSON properties ([5330f64](5330f64)) * **ci:** update node version to 20 ([263e88b](263e88b)) * DAST scan PR [eclipse-tractusx#256](https://github.com/borisrizov-zf/managed-identity-wallet/issues/256) ([1c1f1fb](1c1f1fb)) * fix bug with token re-wrapping ([e047550](e047550)) * fix integration test ([d8084ee](d8084ee)) * **helm:** minor fixes ([49b5530](49b5530)) * **helm:** vc expiration date ([e056108](e056108)) * possible caching vulnerability in action ([eb2e38f](eb2e38f)) * **release:** add missing author, committer emails ([6d49d27](6d49d27)) * **release:** use correct syntax for github actor ([86976a6](86976a6)) * **validation:** credential signer must be equal issuer ([12abe09](12abe09)) ### Features * add api docs, option asJwt ([9dc628b](9dc628b)) * add domain objects needed by sts infrastructure ([effb480](effb480)) * add dto objects for sts infrastructure ([103e7f2](103e7f2)) * add exceptions for sts infrastructure ([b4bb9b7](b4bb9b7)) * add ignoring version ([1785080](1785080)) * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * add logic regarding jti info store and check ([6809578](6809578)) * add missing relationships to entities ([56a48eb](56a48eb)) * add service method, controller, config for scope matching ([4feebd4](4feebd4)) * add sts properties ([018d9c0](018d9c0)) * add token endpoint happy-path test ([d6c30bf](d6c30bf)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * **chart:** add extra volume/-mounts ([0f6252f](0f6252f)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * extend 'miw.security' properties ([e982919](e982919)) * **helm:** add networkPolicy for miw ([502b633](502b633)) * **helm:** allow networkPolicy to template values ([acddcff](acddcff)) * implement token endpoint ([4227f3e](4227f3e)) * improve filter, add exception handling ([579a5ec](579a5ec)) * Merge PR [eclipse-tractusx#252](https://github.com/borisrizov-zf/managed-identity-wallet/issues/252) ([8cb132b](8cb132b)) * Merge PR [eclipse-tractusx#255](https://github.com/borisrizov-zf/managed-identity-wallet/issues/255) ([a0d9bdf](a0d9bdf)) * use a spring validator for SecureTokenRequest ([accc0d2](accc0d2))
# [0.4.0-develop.9](v0.4.0-develop.8...v0.4.0-develop.9) (2024-03-08) ### Bug Fixes * add a comment to the expiryInstant ([21ac648](21ac648)) * add if statement for creating VC ([0092728](0092728)) * Add missing gradle validation PR [eclipse-tractusx#257](https://github.com/borisrizov-zf/managed-identity-wallet/issues/257) ([f9acf55](f9acf55)) * add missing JSON properties ([5330f64](5330f64)) * **ci:** update node version to 20 ([263e88b](263e88b)) * DAST scan PR [eclipse-tractusx#256](https://github.com/borisrizov-zf/managed-identity-wallet/issues/256) ([1c1f1fb](1c1f1fb)) * fix bug with token re-wrapping ([e047550](e047550)) * fix integration test ([d8084ee](d8084ee)) * **helm:** minor fixes ([49b5530](49b5530)) * **helm:** vc expiration date ([e056108](e056108)) * possible caching vulnerability in action ([eb2e38f](eb2e38f)) * **release:** add missing author, committer emails ([6d49d27](6d49d27)) * **release:** use correct syntax for github actor ([86976a6](86976a6)) * **validation:** credential signer must be equal issuer ([12abe09](12abe09)) ### Features * add api docs, option asJwt ([9dc628b](9dc628b)) * add domain objects needed by sts infrastructure ([effb480](effb480)) * add dto objects for sts infrastructure ([103e7f2](103e7f2)) * add exceptions for sts infrastructure ([b4bb9b7](b4bb9b7)) * add ignoring version ([1785080](1785080)) * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * add logging of auth failures ([ec60117](ec60117)) * add logic regarding jti info store and check ([6809578](6809578)) * add missing relationships to entities ([56a48eb](56a48eb)) * add service method, controller, config for scope matching ([4feebd4](4feebd4)) * add sts properties ([018d9c0](018d9c0)) * add token endpoint happy-path test ([d6c30bf](d6c30bf)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * **chart:** add extra volume/-mounts ([0f6252f](0f6252f)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * extend 'miw.security' properties ([e982919](e982919)) * **helm:** add networkPolicy for miw ([502b633](502b633)) * **helm:** allow networkPolicy to template values ([acddcff](acddcff)) * implement token endpoint ([4227f3e](4227f3e)) * improve filter, add exception handling ([579a5ec](579a5ec)) * Merge PR [eclipse-tractusx#252](https://github.com/borisrizov-zf/managed-identity-wallet/issues/252) ([8cb132b](8cb132b)) * Merge PR [eclipse-tractusx#255](https://github.com/borisrizov-zf/managed-identity-wallet/issues/255) ([a0d9bdf](a0d9bdf)) * upload miw jar to gh release ([a7d6aa6](a7d6aa6)) * use a spring validator for SecureTokenRequest ([accc0d2](accc0d2))
# [0.4.0-develop.9](v0.4.0-develop.8...v0.4.0-develop.9) (2024-03-08) ### Bug Fixes * add a comment to the expiryInstant ([21ac648](21ac648)) * add if statement for creating VC ([0092728](0092728)) * Add missing gradle validation PR [eclipse-tractusx#257](https://github.com/borisrizov-zf/managed-identity-wallet/issues/257) ([f9acf55](f9acf55)) * add missing JSON properties ([5330f64](5330f64)) * **ci:** update node version to 20 ([263e88b](263e88b)) * DAST scan PR [eclipse-tractusx#256](https://github.com/borisrizov-zf/managed-identity-wallet/issues/256) ([1c1f1fb](1c1f1fb)) * fix bug with token re-wrapping ([e047550](e047550)) * fix integration test ([d8084ee](d8084ee)) * **helm:** minor fixes ([49b5530](49b5530)) * **helm:** vc expiration date ([e056108](e056108)) * possible caching vulnerability in action ([eb2e38f](eb2e38f)) * **release:** add missing author, committer emails ([6d49d27](6d49d27)) * **release:** use correct syntax for github actor ([86976a6](86976a6)) * **validation:** credential signer must be equal issuer ([12abe09](12abe09)) ### Features * add api docs, option asJwt ([9dc628b](9dc628b)) * add domain objects needed by sts infrastructure ([effb480](effb480)) * add dto objects for sts infrastructure ([103e7f2](103e7f2)) * add exceptions for sts infrastructure ([b4bb9b7](b4bb9b7)) * add ignoring version ([1785080](1785080)) * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * add logging of auth failures ([ec60117](ec60117)) * add logic regarding jti info store and check ([6809578](6809578)) * add missing relationships to entities ([56a48eb](56a48eb)) * add service method, controller, config for scope matching ([4feebd4](4feebd4)) * add sts properties ([018d9c0](018d9c0)) * add token endpoint happy-path test ([d6c30bf](d6c30bf)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * **chart:** add extra volume/-mounts ([0f6252f](0f6252f)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * extend 'miw.security' properties ([e982919](e982919)) * **helm:** add networkPolicy for miw ([502b633](502b633)) * **helm:** allow networkPolicy to template values ([acddcff](acddcff)) * implement token endpoint ([4227f3e](4227f3e)) * improve filter, add exception handling ([579a5ec](579a5ec)) * Merge PR [eclipse-tractusx#252](https://github.com/borisrizov-zf/managed-identity-wallet/issues/252) ([8cb132b](8cb132b)) * Merge PR [eclipse-tractusx#255](https://github.com/borisrizov-zf/managed-identity-wallet/issues/255) ([a0d9bdf](a0d9bdf)) * use a spring validator for SecureTokenRequest ([accc0d2](accc0d2))
# [0.4.0-develop.9](v0.4.0-develop.8...v0.4.0-develop.9) (2024-03-08) ### Bug Fixes * add a comment to the expiryInstant ([21ac648](21ac648)) * add if statement for creating VC ([0092728](0092728)) * Add missing gradle validation PR [eclipse-tractusx#257](https://github.com/borisrizov-zf/managed-identity-wallet/issues/257) ([f9acf55](f9acf55)) * add missing JSON properties ([5330f64](5330f64)) * **ci:** update node version to 20 ([263e88b](263e88b)) * DAST scan PR [eclipse-tractusx#256](https://github.com/borisrizov-zf/managed-identity-wallet/issues/256) ([1c1f1fb](1c1f1fb)) * fix bug with token re-wrapping ([e047550](e047550)) * fix integration test ([d8084ee](d8084ee)) * **helm:** minor fixes ([49b5530](49b5530)) * **helm:** vc expiration date ([e056108](e056108)) * possible caching vulnerability in action ([eb2e38f](eb2e38f)) * **release:** add missing author, committer emails ([6d49d27](6d49d27)) * **release:** use correct syntax for github actor ([86976a6](86976a6)) * **validation:** credential signer must be equal issuer ([12abe09](12abe09)) ### Features * add api docs, option asJwt ([9dc628b](9dc628b)) * add domain objects needed by sts infrastructure ([effb480](effb480)) * add dto objects for sts infrastructure ([103e7f2](103e7f2)) * add exceptions for sts infrastructure ([b4bb9b7](b4bb9b7)) * add ignoring version ([1785080](1785080)) * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * add logging of auth failures ([ec60117](ec60117)) * add logic regarding jti info store and check ([6809578](6809578)) * add missing relationships to entities ([56a48eb](56a48eb)) * add service method, controller, config for scope matching ([4feebd4](4feebd4)) * add sts properties ([018d9c0](018d9c0)) * add token endpoint happy-path test ([d6c30bf](d6c30bf)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * **chart:** add extra volume/-mounts ([0f6252f](0f6252f)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * extend 'miw.security' properties ([e982919](e982919)) * **helm:** add networkPolicy for miw ([502b633](502b633)) * **helm:** allow networkPolicy to template values ([acddcff](acddcff)) * implement token endpoint ([4227f3e](4227f3e)) * improve filter, add exception handling ([579a5ec](579a5ec)) * Merge PR [eclipse-tractusx#252](https://github.com/borisrizov-zf/managed-identity-wallet/issues/252) ([8cb132b](8cb132b)) * Merge PR [eclipse-tractusx#255](https://github.com/borisrizov-zf/managed-identity-wallet/issues/255) ([a0d9bdf](a0d9bdf)) * use a spring validator for SecureTokenRequest ([accc0d2](accc0d2))
# [0.5.0](v0.4.0...v0.5.0) (2024-07-05) ### Bug Fixes * .helmdocsignore is not at project root ([a6ceba4](a6ceba4)) * add "y" parameter and remove unused imports ([72b592c](72b592c)) * add asJwt as query param and fix exceptions ([8cbb756](8cbb756)) * add asJwt as query param and fix exceptions ([ef961a5](ef961a5)) * add asJwt to controllers and services ([050358e](050358e)) * add asJwt to controllers and services ([b604f3d](b604f3d)) * add copyright to getCredentialsCommand ([2154b7f](2154b7f)) * add exceptions and fix naming ([dba48e2](dba48e2)) * add exceptions and fix naming ([531d3f7](531d3f7)) * add keyId to createPresentation ([069a7d3](069a7d3)) * Add missing gradle validation PR [#257](#257) ([f9acf55](f9acf55)) * add missing JSON properties ([5330f64](5330f64)) * add test and validation ([b3db3e0](b3db3e0)) * add test and validation ([842e437](842e437)) * add WalletKey for ES256K algorithm to DidDocument ([9eb3294](9eb3294)) * add wiremock ([4aec527](4aec527)) * adjust api docs for 'api/token' endpoint ([7190ed1](7190ed1)) * api doc folder structure ([ebd691a](ebd691a)) * api docs ([8e7b796](8e7b796)) * api docs ([760ee94](760ee94)) * change context url ([fa9ee4b](fa9ee4b)) * chart file ([8b16023](8b16023)) * chart file ([099fabb](099fabb)) * copyright updated ([9ade90e](9ade90e)) * copyright updated ([956b6af](956b6af)) * current tests ([bb0b30c](bb0b30c)) * DAST scan PR [#256](#256) ([1c1f1fb](1c1f1fb)) * did resolver ([d0522f4](d0522f4)) * direct access to WalletKeyService while signing VC removed ([e264c0f](e264c0f)) * exception names ([30a60d5](30a60d5)) * exception names ([61832ed](61832ed)) * exceptions ([fc6c077](fc6c077)) * exceptions ([1b260fa](1b260fa)) * failing test cases ([bf71a1d](bf71a1d)) * ficense header updated ([b2959e6](b2959e6)) * fix bug with token re-wrapping ([e047550](e047550)) * fix did creation in did document ([c21f7af](c21f7af)) * fix ES256K signature ([b33f8a6](b33f8a6)) * fix integration test ([d8084ee](d8084ee)) * fix kid parameter ([97437b4](97437b4)) * fix object name ([59ccdb2](59ccdb2)) * fix openapi_v001.json ([068462b](068462b)) * fix openapi_v001.json ([c30134e](c30134e)) * fix openapi_v001.json ([1910e88](1910e88)) * formatting ([e00620d](e00620d)) * formatting ([697ff85](697ff85)) * formatting issue with api json file ([b10fa38](b10fa38)) * get vc as jwt with tests ([4216e0d](4216e0d)) * javadoc, imports and throws ([af87ecb](af87ecb)) * new build location for upload action ([b6a7656](b6a7656)) * part of tests ([50ba388](50ba388)) * part of tests ([7f01263](7f01263)) * possible caching vulnerability in action ([eb2e38f](eb2e38f)) * remove new line ([31819c8](31819c8)) * remove new line ([0c5f111](0c5f111)) * remove try catch ([874e850](874e850)) * remove try catch ([b840c77](b840c77)) * revert IssueDismantlerCredentialReqeust.java ([bac5200](bac5200)) * revert IssueDismantlerCredentialReqeust.java ([14f6195](14f6195)) * sonar issues ([a7fb417](a7fb417)) * STS Token API Response ([78b7dc3](78b7dc3)) * test cases ([22e3bb8](22e3bb8)) * Test Cases ([8eda499](8eda499)) * test cases of get VC api ([1430881](1430881)) * test for jwt ([0a69f1c](0a69f1c)) * test for jwt ([8b5180a](8b5180a)) * update code with the new ssi lib main ([9497d3e](9497d3e)) * update code with the new ssi lib main ([3da1eff](3da1eff)) * update helm-docs test action ([99a1e91](99a1e91)) * update ssi agent lib version ([02b1f5a](02b1f5a)) * VP test cases ([847f123](847f123)) * VP validation tests ([09d337f](09d337f)) ### Features * adapt request and wallet service ([c911d33](c911d33)) * add api docs, option asJwt ([9dc628b](9dc628b)) * add domain objects needed by sts infrastructure ([effb480](effb480)) * add dto objects for sts infrastructure ([103e7f2](103e7f2)) * add exceptions for sts infrastructure ([b4bb9b7](b4bb9b7)) * add extra transaction ([b694d19](b694d19)) * add ignoring version ([1785080](1785080)) * add JWT verification and extend tests ([d83ce91](d83ce91)) * add JWT verification and extend tests ([5ae223d](5ae223d)) * add logging of auth failures ([ec60117](ec60117)) * add logic regarding jti info store and check ([6809578](6809578)) * add missing relationships to entities ([56a48eb](56a48eb)) * add service method, controller, config for scope matching ([4feebd4](4feebd4)) * add sts properties ([018d9c0](018d9c0)) * add token endpoint happy-path test ([d6c30bf](d6c30bf)) * added body type to /token endpoint ([6a67c92](6a67c92)) * adding draft for integration test, refactoring ([ce75056](ce75056)) * create initial class ([061faa7](061faa7)) * create initial classes with validation ([fc5db81](fc5db81)) * extend 'miw.security' properties ([e982919](e982919)) * implement token endpoint ([4227f3e](4227f3e)) * improve filter, add exception handling ([579a5ec](579a5ec)) * Merge PR [#252](#252) ([8cb132b](8cb132b)) * Merge PR [#255](#255) ([a0d9bdf](a0d9bdf)) * move src/ to a dedicated sub-project ([45ddd7b](45ddd7b)) * save dash.jar in the root project for easy re-use ([98747c8](98747c8)) * support new algorithm (WIP) ([9dd6f27](9dd6f27)) * upload miw jar to gh release ([a7d6aa6](a7d6aa6)) * use a spring validator for SecureTokenRequest ([accc0d2](accc0d2))
🎉 This issue has been resolved in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is implementation of the validation and verification of signature of the JWT tokens (SI and Access)
Closes: #244
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: