Skip to content

Consent events delivery, collect consent enforcement and updated dependencies from Identity to Edge Identity#173

Merged
emdobrin merged 25 commits intodevfrom
feature/consent
Mar 30, 2021
Merged

Consent events delivery, collect consent enforcement and updated dependencies from Identity to Edge Identity#173
emdobrin merged 25 commits intodevfrom
feature/consent

Conversation

@emdobrin
Copy link
Copy Markdown
Contributor

@emdobrin emdobrin commented Mar 24, 2021

Description

  • The Edge extension now enforces the collect consent settings when Consent extension is registered as follows:
    • When collect consent is yes, the experience events are collected and sent to the Edge Network.
    • When collect consent is no, the experience events are dropped and not processed. Any previously persisted events that were not sent yet will also be dropped.
    • When collect consent is pending or other unknown value, the experience events are collected and held in persistence until the collect consent settings change to yes or no.
    • When consent extension is not registered the default collect consent yes will be used.
  • The Edge extension drops support for privacy status settings in favor of collect consent settings.
  • Adds support for consent events delivery to the Edge Network when using the Consent extension and updating the consent preferences.
  • The Edge extension has a hard dependency on Edge Identity extension and does not depend on Identity extension anymore.
  • The persisted events now include the identityMap at the time of event queuing.

Related Issue

Motivation and Context

How Has This Been Tested?

  • Unit and functional testing, as well as integration testing with Consent and Edge Identity extensions.
  • Update test app with the new dependencies.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

emdobrin and others added 21 commits February 1, 2021 12:07
[AMSDK-11013] Support for sending update consent requests to Edge Network
* Read XDM shared state from IdentityEdge

* Remove unused constant

* Fix functional tests

* Add IdentityEdge to podspec dependencies

* Remove IdentityMap in favor of dictionary

* Remove AEPIdentityEdge from dependency

* Get tests passing

* Use constant

* Fix testProcessHit_noECID test

* Dynamic encoding for XDM payloads

* DynamicKey -> DynamicCodingKey

* Update consent hit to use free form dict

* Use constant for identityMap

* Consolidate line

* Use "test-ecid"

* Add test helper for building identity map

* Update to latest identity edge

* Remove request context data

* Read only IdentityMap from Identity XDM shared state
…sent (#166)

* Implement collect consent, remove privacy status

* update dependencies, fix test compile error

* format

* sample app updates for consent + identityedge

* Remove privacy status tests and add tests for events queing with consent

* Functional tests for Consent use-cases

* Mock classes for dataQueue, hitProcessor, unit tests for Edge extension class

* Set initial queue state, docs

* fix docs, update pods

* review impl
* Update Identity and Consent after extension renames

* Remove Consent shared state name as it is not used.

* Add Consent to list of test caches to clear

* Update Consent shared state name
* Add EdgeDataEntity and persist identityMap and store payloads

* Filter out expired payloads before sending hit

* Handle reset event

* Add tests

* Add empty event data check to hit processor for experience and consent events

* lint

* Store tuples of uuid's and dates instead of entire event

* Make date in network handler thread safe and update logs

* Extract ignoreStorePayloads to a functino

* Add comment about batching

* Add functional tests for clearing state store

* Add atomic test

* clean up test for atomic

* Update comments, add log
* Renaming and update dependencies

* Update dependencies

* Update identity integration tests to primary false
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2021

Codecov Report

Merging #173 (4828306) into dev (bf0cb75) will increase coverage by 0.89%.
The diff coverage is 94.10%.

@@            Coverage Diff             @@
##              dev     #173      +/-   ##
==========================================
+ Coverage   93.20%   94.09%   +0.89%     
==========================================
  Files          20       25       +5     
  Lines         721      880     +159     
==========================================
+ Hits          672      828     +156     
- Misses         49       52       +3     

nporter-adbe and others added 3 commits March 25, 2021 09:17
* Fix log

* Update NetworkResponseHandler.swift
#176)

* Check for consent registration based on hub shared state

* [AMSDK-11328] Consts, improve readability
* Enable response streaming for Consent requests.

* Add tests to verify streaming config in Consent requests
Comment on lines -43 to +46
guard let data = entity.data, let event = try? JSONDecoder().decode(Event.self, from: data) else {
guard let data = entity.data, let edgeEntity = try? JSONDecoder().decode(EdgeDataEntity.self, from: data)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to perform some migration logic for previously persisted hits.

* persist last known reset timestamp

* Fix test

* Return nil when loading from persistence, change constant name

* Add +/- to testing dates
@emdobrin emdobrin merged commit dfdab79 into dev Mar 30, 2021
@emdobrin emdobrin added the feature Adds a new feature label Jan 6, 2022
@kevinlind kevinlind deleted the feature/consent branch October 20, 2022 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants