Repository navigation
Read the anonymous profile tracker from the anonymous user in the identity context - #27
Open
SujanSanjula96 wants to merge 1 commit into
Open
SujanSanjula96 wants to merge 1 commit into
SujanSanjula96 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ntity context The POST_ADD_USER handler reads the tracker from the anonymous user in the identity context. If the identity context has none, it uses the cdsProfile claim, as before. Related to wso2/identity-customer-data-service#287.
SujanSanjula96
force-pushed
the
cds-improve-unify-architecture
branch
from
November 17, 2026 23:25
6785c52 to
62643c5
Compare
VivekVinushanth
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The anonymous user unification during registration uses the
http://wso2.org/claims/cdsProfileuser claim to carry the anonymous profile tracker. A user claim is not a good carrier for a value that is only needed while the user is onboarded.Related to wso2/identity-customer-data-service#287
Goals
Take the anonymous profile tracker from the identity context, so that the flow engine registration and the legacy self registration use one approach.
Approach
IdentityEventHandler(POST_ADD_USER) reads the tracker fromIdentityContext.getAnonymousUser().getAnonymousProfileTracker().cdsProfileclaim, as before.org.wso2.carbon.identity.core.contextandorg.wso2.carbon.identity.core.context.model.Dependency: this change needs a framework release that contains wso2/carbon-identity-framework#8190. Bump
carbon.identity.framework.versionin the rootpom.xmlto that release before this PR is merged.Release note
The CDS identity event handler takes the anonymous profile tracker of a new user from the identity context, with the
cdsProfileclaim as a fallback.Automation tests
IdentityEventHandlerTestadds 4 cases (tracker from the anonymous user, fallback to the claim when the anonymous user has no tracker, fallback when there is no anonymous user, profile sync when there is no tracker). All 19 tests of the module pass.Runtime verification
Tested on a 7.4.0 snapshot pack with the related PRs applied and with a mock CDS endpoint that records the sync requests. The
profileCookievalue that CDS got forPOST_ADD_USER:anonymous_profile_trackerproperty onlycdsProfileclaim onlycdsProfileclaim as inputs in the first request onlySecurity checks
Related PRs
Test environment
JDK 21, macOS.
🤖 Generated with Claude Code