Skip to content

Add Remote CDM mode and remove mandatory embedded.wvd requirement#6

Open
hichchiputha wants to merge 2 commits into
mainfrom
remote-cdm-mode-63743856802279517
Open

Add Remote CDM mode and remove mandatory embedded.wvd requirement#6
hichchiputha wants to merge 2 commits into
mainfrom
remote-cdm-mode-63743856802279517

Conversation

@hichchiputha
Copy link
Copy Markdown
Owner

Implemented Remote CDM mode which allows using a third-party server for license handling, removing the need for a local embedded.wvd file. Added necessary dependencies, updated session and initialization logic, and ensured the project builds without a valid wvd file. Added unit tests for the new functionality.


PR created automatically by Jules for task 63743856802279517 started by @hichchiputha

This change implements a "Remote CDM" mode that allows the CDM to operate
without a local Widevine Device (.wvd) file. Instead, it delegates the
license handling to a third-party server by exchanging JSON messages.

Changes:
- Add `serde`, `serde_json`, and `base64` dependencies.
- Add `remote_cdm` toggle to `OpenWvConfig` and enable it by default.
- Implement `RemoteRequest` and `RemoteResponse` for JSON communication.
- Update `Session` to handle Remote mode challenges and updates.
- Allow `OpenWv` initialization and instance creation without a device
  identity if Remote mode is enabled.
- Update `build.rs` to automatically create an empty `embedded.wvd` if missing,
  satisfying the compile-time `include_bytes!` requirement.
- Add unit tests for Remote CDM session creation and update.

Co-authored-by: hichchiputha <168877723+hichchiputha@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

This comprehensive update introduces a Remote CDM architecture for OpenWV,
allowing the CDM to function without a local device identity (.wvd file)
by delegating license processing to a remote server.

Key additions:
- Remote CDM protocol: Exchanges JSON messages containing init_data and
  service certificates via the host application.
- `server.py`: A Flask-based server using `pywidevine` that performs the
  actual Widevine license requests and returns content keys.
- Configuration: Added `remote_cdm` toggle in `src/config.rs`.
- Decoupling: Modified the build process to allow compilation without
  a real `embedded.wvd` file.
- Robustness: Added support for passing service certificates to the
  remote server and updated unit tests to cover the new protocol.

The Remote CDM mode ensures that sensitive device private keys are never
exposed on the client machine, satisfying the security requirements for
distributed CDM deployments.

Co-authored-by: hichchiputha <168877723+hichchiputha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant