-
Notifications
You must be signed in to change notification settings - Fork 66
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
Introduce Resource Sharing Policy Management Component #416
base: main
Are you sure you want to change the base?
Introduce Resource Sharing Policy Management Component #416
Conversation
…licy record and shared resource attributes by resource sharing policy id
… attributes rather than deleting it from record id since that way of deletion is not currently needed.
… attributes rather than deleting it from record id since that way of deletion is not currently needed - Part 2.
…yManagement component
components/org.wso2.carbon.identity.organization.resource.sharing.policy.management/pom.xml
Show resolved
Hide resolved
components/org.wso2.carbon.identity.organization.resource.sharing.policy.management/pom.xml
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #416 +/- ##
============================================
+ Coverage 47.13% 48.57% +1.44%
- Complexity 1024 1080 +56
============================================
Files 112 115 +3
Lines 6710 6898 +188
Branches 802 810 +8
============================================
+ Hits 3163 3351 +188
Misses 3259 3259
Partials 288 288
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…aredAttributeTypes.
… 190: Software Design Studio (Winter 2018) standards[1]. [1] https://web.stanford.edu/~ouster/cgi-bin/cs190-winter18/lecture.php?topic=comments
...identity.organization.resource.sharing.policy.management/src/test/resources/dbscripts/h2.sql
Outdated
Show resolved
Hide resolved
...identity.organization.resource.sharing.policy.management/src/test/resources/dbscripts/h2.sql
Outdated
Show resolved
Hide resolved
...identity.organization.resource.sharing.policy.management/src/test/resources/dbscripts/h2.sql
Outdated
Show resolved
Hide resolved
...sharing.policy.management/src/test/resources/mokito-extensions/org.mockito.plugins.MockMaker
Outdated
Show resolved
Hide resolved
...identity.organization.resource.sharing.policy.management/src/test/resources/dbscripts/h2.sql
Outdated
Show resolved
Hide resolved
...ntity/organization/resource/sharing/policy/management/constant/ResourceSharingConstants.java
Outdated
Show resolved
Hide resolved
...ntity/organization/resource/sharing/policy/management/constant/ResourceSharingConstants.java
Outdated
Show resolved
Hide resolved
...ntity/organization/resource/sharing/policy/management/constant/ResourceSharingConstants.java
Outdated
Show resolved
Hide resolved
7b3d125
to
bd2a43f
Compare
...organization/resource/sharing/policy/management/dao/ResourceSharingPolicyHandlerDAOImpl.java
Outdated
Show resolved
Hide resolved
...organization/resource/sharing/policy/management/dao/ResourceSharingPolicyHandlerDAOImpl.java
Outdated
Show resolved
Hide resolved
...organization/resource/sharing/policy/management/dao/ResourceSharingPolicyHandlerDAOImpl.java
Outdated
Show resolved
Hide resolved
AtomicReference<ResourceSharingPolicy> resourceSharingPolicy = new AtomicReference<>(null); | ||
|
||
try { | ||
namedJdbcTemplate.executeQuery( |
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.
fetchSingle
throws ResourceSharingPolicyMgtServerException { | ||
|
||
NamedJdbcTemplate namedJdbcTemplate = getNewTemplate(); | ||
AtomicReference<ResourceSharingPolicy> resourceSharingPolicy = new AtomicReference<>(null); |
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.
Research the need of AtomicReference
* these attributes. | ||
* </p> | ||
*/ | ||
public interface ResourceSharingPolicyHandlerService { |
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.
add two new methods POST and GET to both resource and its attributes at once.
|
||
String orgIdsString = policyHoldingOrganizationIds.stream().map(id -> "'" + id + "'") | ||
.collect(Collectors.joining(",")); | ||
String query = GET_RESOURCE_SHARING_POLICIES_BY_ORG_IDS_HEAD + "(" + orgIdsString + ");"; |
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.
Write in a way to avoid to SQL injections.
|
||
@Override | ||
public boolean deleteResourceSharingPolicyRecordById(int resourceSharingPolicyId, | ||
String deleteRequestInitiatedOrgId) |
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.
deleteRequestInitiatedOrgId -> sharingPolicyInitiatedOrgId
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.
Check all places.
This PR adds a new component to manage resource-sharing policies between organizations in the WSO2 Identity Server. It enables defining, storing, and retrieving resource-sharing policies for users, applications, and identity providers.
Purpose
Goals
Approach
Release note
Documentation
Test environment
Related Issue
Introduce a Centralized Resource Sharing Policy Management Service #21815