Repository navigation
RDKEMW-16544 [AAMP]Change sessionID from uint32 to string - #315
Open
pranaykrishna333 wants to merge 1 commit into
Open
pranaykrishna333 wants to merge 1 commit into
pranaykrishna333 wants to merge 1 commit into
Conversation
when invoking ContentProtection APIs
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Remaining integer test fixtures prevent compilation, and watermark event handling still converts opaque session IDs to integers.
6 open issues
Update expectedID to string in migrated test · New Use string expectedID in skipped test · New Convert boundary expectedID to string · New Store minimum-value expectedID as a string · New Compare default session ID with empty-string sentinel · New Prevent numeric parsing from rejecting opaque watermark session IDs · New
What changed in this PR
Migrates AAMP’s content-security session IDs to strings so Firebolt can preserve opaque identifiers, while retaining numeric IDs at the Thunder API boundary.
Changes:
- Updates session storage, manager interfaces, Firebolt calls, and logging to use strings.
- Adds validation and numeric conversion for Thunder requests.
- Migrates test fixtures and fakes, including coverage for opaque session IDs.
| File | Description |
|---|---|
| test/utests/tests/FireBoltTests/FireBoltFun.cpp | Converts Firebolt test IDs to strings. |
| test/utests/tests/ContentsecuritymanagerTests/PlayerContentSecurityManagerSes.cpp | Migrates session construction and getter tests. |
| test/utests/tests/ContentsecuritymanagerTests/PlayerContentSecurityManagerFun.cpp | Converts manager operation test inputs. |
| test/utests/tests/ContentsecuritymanagerTests/ContentSecurityManagerTests.cpp | Updates API and integration test IDs. |
| test/utests/tests/ContentsecuritymanagerTests/ContentSecurityManagerSessionTests.cpp | Updates validity expectations and adds opaque-ID coverage. |
| test/utests/fakes/FakeContentSecurityManagerSession.cpp | Aligns fake session signatures and return types. |
| test/utests/fakes/FakeContentSecurityManager.cpp | Aligns fake manager signatures. |
| test/utests/fakes/FakeContentProtectionFireBolt.cpp | Uses string IDs in Firebolt fakes. |
| externals/contentsecuritymanager/SecManagerThunder.h | Declares string-based Thunder adapter methods. |
| externals/contentsecuritymanager/SecManagerThunder.cpp | Converts string IDs to validated numeric Thunder parameters. |
| externals/contentsecuritymanager/IFirebolt/ContentProtectionFirebolt.h | Declares string-based ContentProtection methods. |
| externals/contentsecuritymanager/IFirebolt/ContentProtectionFirebolt.cpp | Preserves string IDs in Firebolt calls and responses. |
| externals/contentsecuritymanager/ContentSecurityManagerSession.h | Defines string session storage and an empty invalid sentinel. |
| externals/contentsecuritymanager/ContentSecurityManagerSession.cpp | Keys shared sessions by string ID. |
| externals/contentsecuritymanager/ContentSecurityManager.h | Migrates manager and fallback interfaces. |
| externals/contentsecuritymanager/ContentSecurityManager.cpp | Updates forwarding method signatures. |
| drm/DrmSessionManager.cpp | Formats session IDs as strings in logs. |
Review effort: Balanced
| << " and inputSummaryHash = " << 0 << std::endl; | ||
| std::cout << "Invoking getSessionID()" << std::endl; | ||
| int64_t sessionID = session.getSessionID(); | ||
| std::string sessionID = session.getSessionID(); |
| << " and inputSummaryHash = " << 0 << std::endl; | ||
| std::cout << "Invoking getSessionID()" << std::endl; | ||
| int64_t sessionID = session.getSessionID(); | ||
| std::string sessionID = session.getSessionID(); |
| << " and inputSummaryHash = " << 0 << std::endl; | ||
| std::cout << "Invoking getSessionID()" << std::endl; | ||
| int64_t sessionID = session.getSessionID(); | ||
| std::string sessionID = session.getSessionID(); |
| << " and inputSummaryHash = " << 0 << std::endl; | ||
| std::cout << "Invoking getSessionID()" << std::endl; | ||
| int64_t sessionID = session.getSessionID(); | ||
| std::string sessionID = session.getSessionID(); |
| int64_t sessionID = session.getSessionID(); | ||
| std::string sessionID = session.getSessionID(); | ||
| std::cout << "getSessionID() returned " << sessionID << std::endl; | ||
| EXPECT_EQ(sessionID, int64_t(0)); |
| MW_LOG_WARN("DRM session opened successfully with sessionId: '%s' with Response %s", drmSession->sessionId.c_str(), drmSession->openSessionResponse.c_str()); | ||
| response = drmSession->openSessionResponse; | ||
| sessionId = std::stoll(drmSession->sessionId); | ||
| sessionId = drmSession->sessionId; |
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.


[RDKEMW-16544]
[AAMP]Change sessionID from uint32 to string when invoking ContentProtection APIs