-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In-Memory Claim Management #6007
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6007 +/- ##
============================================
+ Coverage 40.73% 40.94% +0.21%
- Complexity 14459 14607 +148
============================================
Files 1764 1767 +3
Lines 117634 118050 +416
Branches 19106 19169 +63
============================================
+ Hits 47917 48339 +422
+ Misses 62443 62426 -17
- Partials 7274 7285 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
78bc0c4
to
90268d2
Compare
PR builder started |
...data.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
PR builder completed |
PR builder started |
PR builder completed |
...adata.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataReader.java
Outdated
Show resolved
Hide resolved
...adata.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataReader.java
Outdated
Show resolved
Hide resolved
...adata.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataWriter.java
Outdated
Show resolved
Hide resolved
...adata.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataWriter.java
Outdated
Show resolved
Hide resolved
...adata.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataWriter.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/DBBasedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
components/claim-mgt/org.wso2.carbon.identity.claim.metadata.mgt/pom.xml
Outdated
Show resolved
Hide resolved
...ain/java/org/wso2/carbon/identity/claim/metadata/mgt/ClaimMetadataManagementServiceImpl.java
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...etadata.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/dao/LocalClaimDAO.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/wso2/carbon/identity/claim/metadata/mgt/SystemDefaultClaimMetadataManager.java
Show resolved
Hide resolved
b547b94
to
291bdd4
Compare
...c/test/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManagerTest.java
Outdated
Show resolved
Hide resolved
...a.mgt/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/util/ClaimMetadataUtils.java
Show resolved
Hide resolved
Can you please add sample API requests and responses before and after your fix? |
Did we consideer store procedure based DAO mentioned in [1]. Seems we need to deprecate it as we are having in memory concept, this[1] may not be needed anymore. Please verify and do the needful |
These are the changes to API responses with the changes in this PR and the supporting PRs.
Before : Allowed. HTTP Status 200 OK. After: 403 Forbidden
Before: 500 Internal Server Error - CMT-50013
After: 409 Conflict CMT-60002 Claim dialect: %s already exists
Before: 204 No Content After: 403 Forbidden
Before: 204 No Content After: 403 Forbidden
Before: Did not have a property list.
After: Has property list.
Before: 200 OK (Bug) After: 400 Bad Request
Before: 204 No Content After: 403 Forbidden
|
Thanks for pointing this out. Since scope to claim mapping stored procedure is only run if the init claim config stored procedure is run earlier, there shouldn't be an issue. New claims will continue to be supported through the in-memory implementation. Let's deprecate the stored procedures since they are not needed with this improvement. |
PR builder started |
PR builder completed |
Can you please create a git issue with the detail to deprecate this. |
Any reason to change this error code and error message. Can't we keep the existing one?
Please update the documentation with the proper responses |
eda6538
to
d0ccbdd
Compare
@nilasini No we can keep the existing one. I restored it in the code and updated the original comment. |
Created wso2/product-is#21626 |
...t/src/main/java/org/wso2/carbon/identity/claim/metadata/mgt/UnifiedClaimMetadataManager.java
Outdated
Show resolved
Hide resolved
d657a5e
to
360950f
Compare
360950f
to
3f9afca
Compare
Quality Gate passedIssues Measures |
PR builder started |
PR builder completed |
The integration test failures will be fixed with the below 2 PRs |
Proposed changes in this pull request
Class Diagram
Note: When adding updates to the database, parent entities need to be added as pre-requisites. This is intentionally handled in a non-transactional manner since it will not cause any data inconsistencies or produce stale data.
eg: When adding a claim, its dialect need to be added to the database if it is not already present. This is not handled as a single transaction.
When should this PR be merged
[Please describe any preconditions that need to be addressed before we
can merge this pull request.]
Follow up actions
[List any possible follow-up actions here; for instance, testing data
migrations, software that we need to install on staging and production
environments.]
Checklist (for reviewing)
General
Functionality
Code
Tests
Security
Documentation