Skip to content

Commit

Permalink
Merge pull request #2293 from bmtcril/bmtcril/pii_annotations
Browse files Browse the repository at this point in the history
Cleaning up PII annotations
  • Loading branch information
macdiesel authored Jan 17, 2025
2 parents 9779f3e + e26d23b commit 1eb513c
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 41 deletions.
56 changes: 28 additions & 28 deletions .annotation_safe_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,52 @@
# ".. choice_annotation:": foo, bar, baz

canvas.HistoricalCanvasEnterpriseCustomerConfiguration:
".. no_pii:": ""
".. no_pii:": ""
consent.HistoricalDataSharingConsent:
".. pii:": "The username field inherited from DataSharingConsent contains PII"
".. pii_types:": username
".. pii_retirement:": consumer_api
".. pii:": "The username field inherited from DataSharingConsent contains PII"
".. pii_types:": username
".. pii_retirement:": consumer_api
degreed.HistoricalDegreedEnterpriseCustomerConfiguration:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalDefaultEnterpriseEnrollmentIntention:
".. no_pii:": ""
enterprise.HistoricalDefaultEnterpriseEnrollmentRealization:
".. no_pii:": ""
enterprise.HistoricalEnrollmentNotificationEmailTemplate:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCourseEnrollment:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCustomer:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCustomerCatalog:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCustomerEntitlement:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseAnalyticsUser:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalPendingEnterpriseCustomerUser:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalPendingEnterpriseCustomerAdminUser:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalLicensedEnterpriseCourseEnrollment:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalPendingEnrollment:
".. no_pii:": ""
".. no_pii:": ""
moodle.HistoricalMoodleEnterpriseCustomerConfiguration:
".. no_pii:": ""
enterprise.EnterpriseCourseEntitlement:
".. no_pii:": ""
enterprise.EnterpriseCustomerSsoConfiguration:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCourseEntitlement:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCustomerInviteKey:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCustomerSsoConfiguration:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseCustomerUser:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseGroup:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalEnterpriseGroupMembership:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalLearnerCreditEnterpriseCourseEnrollment:
".. no_pii:": ""
".. no_pii:": ""
enterprise.HistoricalSystemWideEnterpriseUserRoleAssignment:
".. no_pii:": ""
".. no_pii:": ""
23 changes: 11 additions & 12 deletions .pii_annotations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ safelist_path: .annotation_safe_list.yml

# Local models are all fully annotated, but non-local models are not annotated
# because this repo does not contain an IDA/Django project (which, according to
# our own PII annotating policy, doesn't require non-local annotations). 75%
# our own PII annotating policy, doesn't require non-local annotations). 84.7%
# coverage represents all local models, and is the current theoretical maximum
# coverage.
# TODO: PLAT-2422
coverage_target: 75.0
coverage_target: 84.7

annotations:
".. no_pii:":
"pii_group":
- ".. pii:":
- ".. pii_types:":
choices: [id, name, username, email_address, other]
- ".. pii_retirement:":
choices: [retained, local_api, consumer_api, third_party]
".. no_pii:":
"pii_group":
- ".. pii:":
- ".. pii_types:":
choices: [id, name, username, email_address, other]
- ".. pii_retirement:":
choices: [retained, local_api, consumer_api, third_party]
extensions:
python:
- py
python:
- py
4 changes: 4 additions & 0 deletions enterprise/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,8 @@ def get_queryset(self):
class EnterpriseCourseEntitlement(TimeStampedModel):
"""
Store the information about the entitlement of an enterprise user for a course
.. no_pii:
"""

objects = EnterpriseCourseEntitlementManager()
Expand Down Expand Up @@ -4256,6 +4258,8 @@ def __repr__(self):
class EnterpriseCustomerSsoConfiguration(TimeStampedModel, SoftDeletableModel):
"""
Stores records of individual customer integrations with the SSO orchestration api.
.. no_pii:
"""
all_objects = models.Manager()

Expand Down
2 changes: 2 additions & 0 deletions integrated_channels/blackboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def __repr__(self):
class BlackboardEnterpriseCustomerConfiguration(EnterpriseCustomerPluginConfiguration):
"""
The Enterprise-specific configuration we need for integrating with Blackboard.
.. no_pii:
"""

decrypted_client_id = EncryptedCharField(
Expand Down
2 changes: 2 additions & 0 deletions integrated_channels/canvas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class CanvasEnterpriseCustomerConfiguration(EnterpriseCustomerPluginConfiguratio
The Enterprise-specific configuration we need for integrating with Canvas.
Based on: https://canvas.instructure.com/doc/api/file.oauth.html#oauth2-flow-3
.. no_pii:
"""

decrypted_client_id = EncryptedCharField(
Expand Down
8 changes: 7 additions & 1 deletion integrated_channels/integrated_channel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ def update_content_transmission_catalog(self, user):
class GenericEnterpriseCustomerPluginConfiguration(EnterpriseCustomerPluginConfiguration):
"""
A generic implementation of EnterpriseCustomerPluginConfiguration which can be instantiated
.. no_pii:
"""

def __str__(self):
Expand All @@ -479,7 +481,7 @@ class ApiResponseRecord(TimeStampedModel):
"""
Api response data for learner and content metadata transmissions
.. no_pii;
.. no_pii:
"""
status_code = models.PositiveIntegerField(
help_text='The most recent remote API call response HTTP status code',
Expand Down Expand Up @@ -891,6 +893,8 @@ class OrphanedContentTransmissions(TimeStampedModel):
"""
A model to track content metadata transmissions that were successfully sent to the integrated channel but then
subsequently were orphaned by a removal of their associated catalog from the customer.
.. no_pii:
"""
class Meta:
index_together = [('integrated_channel_code', 'plugin_configuration_id', 'resolved')]
Expand All @@ -909,6 +913,8 @@ class Meta:
class IntegratedChannelAPIRequestLogs(TimeStampedModel):
"""
A model to track basic information about every API call we make from the integrated channels.
.. no_pii:
"""

enterprise_customer = models.ForeignKey(
Expand Down

0 comments on commit 1eb513c

Please sign in to comment.