You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Afsalmc (via GitHub)" <gi...@apache.org> on 2023/12/02 00:46:01 UTC
[PR] Add Date Masking Buitlin Algorithm | Keep Year Only [shardingsphere]
Afsalmc opened a new pull request, #29257:
URL: https://github.com/apache/shardingsphere/pull/29257
Fixes #ISSUSE_ID.
Changes proposed in this pull request:
- Add a builtin algorithm for masking dates. This Algo keeps the original year info and replace the rest of the date information with the first day of the year.
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Date Masking Buitlin Algorithm | Keep Year Only [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed pull request #29257: Add Date Masking Buitlin Algorithm | Keep Year Only
URL: https://github.com/apache/shardingsphere/pull/29257
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Date Masking Buitlin Algorithm | Keep Year Only [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on PR #29257:
URL: https://github.com/apache/shardingsphere/pull/29257#issuecomment-1907963300
Since this pr has long time no response, I will close it. If you still want to contribute this algorithm, a better place is the ShardingSphere Plugin repository - https://github.com/apache/shardingsphere-plugin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Date Masking Buitlin Algorithm | Keep Year Only [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #29257:
URL: https://github.com/apache/shardingsphere/pull/29257#discussion_r1413066143
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/DateKeepYearOnlyAlgorithm.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.mask.algorithm.replace;
+
+import org.apache.commons.lang3.time.DateUtils;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+public class DateKeepYearOnlyAlgorithm implements MaskAlgorithm<Object, Date> {
Review Comment:
What is the DateKeepYearOnlyAlgorithm algorithm of actual usage scenarios?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Date Masking Buitlin Algorithm | Keep Year Only [shardingsphere]
Posted by "Afsalmc (via GitHub)" <gi...@apache.org>.
Afsalmc commented on code in PR #29257:
URL: https://github.com/apache/shardingsphere/pull/29257#discussion_r1413593044
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/DateKeepYearOnlyAlgorithm.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.mask.algorithm.replace;
+
+import org.apache.commons.lang3.time.DateUtils;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+public class DateKeepYearOnlyAlgorithm implements MaskAlgorithm<Object, Date> {
Review Comment:
https://www.hipaaguide.net/what-is-considered-as-phi-under-hipaa/#:~:text=What%20does%20the%20identifier%20%E2%80%9Cdates%2C%20but%20not%20years%E2%80%9D%20mean%3F
There are scenarios in which only the year is not considered PHI. Masking everything except the year allows analytics without breaching PHI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org