eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

✨ [Authentication] Injectable `Credential.credentialType` values #4072

Closed Coduz closed 2 weeks ago

Coduz commented 1 month ago

Brief description of the PR. [e.g. Added null check on object to avoid NullPointerException]

Related Issue This PR fixes/closes {issue number}

Description of the solution adopted A more detailed description of the changes made to solve/close one or more issues. If the PR is simple and easy to understand this section can be skipped.

Screenshots If applicable, add screenshots to help explain your solution

Any side note on the changes made Description of any other change that has been made, which is not directly linked to the issue resolution [e.g. Code clean up/Sonar issue resolution]

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 30.05780% with 121 lines in your changes missing coverage. Please review.

Project coverage is 16.80%. Comparing base (d5b679e) to head (171b71c).

Files Patch % Lines
...cation/credential/shiro/CredentialServiceImpl.java 6.38% 44 Missing :warning:
...ial/handler/shiro/ApiKeyCredentialTypeHandler.java 25.92% 20 Missing :warning:
...l/handler/shiro/PasswordCredentialTypeHandler.java 33.33% 14 Missing :warning:
...tication/shiro/AuthenticationServiceShiroImpl.java 0.00% 10 Missing :warning:
...ication/credential/shiro/PasswordResetterImpl.java 14.28% 6 Missing :warning:
...ice/authentication/shiro/AuthenticationModule.java 50.00% 4 Missing :warning:
...ation/shiro/realm/UserPassAuthenticatingRealm.java 0.00% 4 Missing :warning:
...pse/kapua/service/user/steps/UserServiceSteps.java 0.00% 4 Missing :warning:
...apua/service/device/registry/steps/AclCreator.java 0.00% 2 Missing :warning:
...thentication/credential/CredentialXmlRegistry.java 0.00% 2 Missing :warning:
... and 8 more
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4072/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4072 +/- ## ============================================= + Coverage 16.78% 16.80% +0.01% Complexity 22 22 ============================================= Files 2016 2019 +3 Lines 52361 52378 +17 Branches 4419 4415 -4 ============================================= + Hits 8787 8800 +13 - Misses 43176 43180 +4 Partials 398 398 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4072?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [.../service/authentication/credential/Credential.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fauthentication%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2FCredential.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9hdXRoZW50aWNhdGlvbi9hcGkvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL2NyZWRlbnRpYWwvQ3JlZGVudGlhbC5qYXZh) | `0.00% <ø> (ø)` | | | [...uthentication/credential/CredentialAttributes.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fauthentication%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2FCredentialAttributes.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9hdXRoZW50aWNhdGlvbi9hcGkvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL2NyZWRlbnRpYWwvQ3JlZGVudGlhbEF0dHJpYnV0ZXMuamF2YQ==) | `0.00% <ø> (ø)` | | | [...ce/authentication/credential/CredentialStatus.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fauthentication%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2FCredentialStatus.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9hdXRoZW50aWNhdGlvbi9hcGkvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL2NyZWRlbnRpYWwvQ3JlZGVudGlhbFN0YXR1cy5qYXZh) | `100.00% <ø> (ø)` | | | [...ception/DuplicatedPasswordCredentialException.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fauthentication%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fexception%2FDuplicatedPasswordCredentialException.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9hdXRoZW50aWNhdGlvbi9hcGkvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL2V4Y2VwdGlvbi9EdXBsaWNhdGVkUGFzc3dvcmRDcmVkZW50aWFsRXhjZXB0aW9uLmphdmE=) | `100.00% <ø> (ø)` | | | [...hentication/exception/PasswordLengthException.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fauthentication%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fexception%2FPasswordLengthException.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9hdXRoZW50aWNhdGlvbi9hcGkvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL2V4Y2VwdGlvbi9QYXNzd29yZExlbmd0aEV4Y2VwdGlvbi5qYXZh) | `66.66% <ø> (ø)` | | | [...cation/credential/shiro/CredentialCreatorImpl.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fshiro%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2Fshiro%2FCredentialCreatorImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9zaGlyby9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL3NlcnZpY2UvYXV0aGVudGljYXRpb24vY3JlZGVudGlhbC9zaGlyby9DcmVkZW50aWFsQ3JlYXRvckltcGwuamF2YQ==) | `100.00% <ø> (ø)` | | | [...cation/credential/shiro/CredentialFactoryImpl.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fshiro%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2Fshiro%2FCredentialFactoryImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9zaGlyby9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL3NlcnZpY2UvYXV0aGVudGljYXRpb24vY3JlZGVudGlhbC9zaGlyby9DcmVkZW50aWFsRmFjdG9yeUltcGwuamF2YQ==) | `100.00% <ø> (ø)` | | | [...uthentication/credential/shiro/CredentialImpl.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fshiro%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2Fshiro%2FCredentialImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9zaGlyby9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL3NlcnZpY2UvYXV0aGVudGljYXRpb24vY3JlZGVudGlhbC9zaGlyby9DcmVkZW50aWFsSW1wbC5qYXZh) | `100.00% <100.00%> (ø)` | | | [.../credential/shiro/CredentialImplJpaRepository.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fshiro%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2Fshiro%2FCredentialImplJpaRepository.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9zaGlyby9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL3NlcnZpY2UvYXV0aGVudGljYXRpb24vY3JlZGVudGlhbC9zaGlyby9DcmVkZW50aWFsSW1wbEpwYVJlcG9zaXRvcnkuamF2YQ==) | `40.00% <100.00%> (ø)` | | | [...ion/credential/shiro/CredentialListResultImpl.java](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree&filepath=service%2Fsecurity%2Fshiro%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fauthentication%2Fcredential%2Fshiro%2FCredentialListResultImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9zZWN1cml0eS9zaGlyby9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL3NlcnZpY2UvYXV0aGVudGljYXRpb24vY3JlZGVudGlhbC9zaGlyby9DcmVkZW50aWFsTGlzdFJlc3VsdEltcGwuamF2YQ==) | `100.00% <ø> (ø)` | | | ... and [27 more](https://app.codecov.io/gh/eclipse/kapua/pull/4072?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | |