Skip to content

initial scaffolding for SDK encryption#37

Open
Lance-Drane wants to merge 9 commits intocandidate-0.9.0from
30-add-encryption
Open

initial scaffolding for SDK encryption#37
Lance-Drane wants to merge 9 commits intocandidate-0.9.0from
30-add-encryption

Conversation

@Lance-Drane
Copy link
Collaborator

@Lance-Drane Lance-Drane commented Oct 2, 2025

Needs to be completed before done:

  • - basic scaffolding for encryption (Lance)
  • - encryption implementation (Marshall/Jesse/Andrew/etc.)
  • - e2e / integration test examples (Lance/Marshall/Jesse/Andrew/etc.)

(I don't really care too much about unit tests, but you can unit test the encryption function itself if you want)

To add the capability endpoints for a Service (which, IIRC, is just the get_public_key function), add it to IntersectSdkCoreCapability (https://github.com/INTERSECT-SDK/python-sdk/blob/candidate-0.9.0/src/intersect_sdk/capability/universal_capability/universal_capability.py), it should be annotated with @intersect_message . If we need additional state in the capability, we can modify the constructor for this capability and potentially the service as well.

Then you can call the capability with intersect_sdk.<YOUR_FUNCTION_NAME_HERE> as the operation from clients.

The actual encrypt/decrypt functions I would prefer to be separated out into utility functions in another file somewhere under the _internal directory, because both the Service and the Client will use them and users also have no reason to ever use this function themselves. I have marked the areas which need the inserted functions with #TODO comments, there should be one of each in client.py and two of each in service.py.

Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
@marshallmcdonnell marshallmcdonnell changed the title Draft: initial scaffolding for SDK encryption initial scaffolding for SDK encryption Feb 6, 2026
@marshallmcdonnell
Copy link
Collaborator

UPDATE:

  • I finally took a stab at adding the encryption into the SDK for this PR!
  • Mainly, added the encryption module to hold data models and utility functions for encryption and decryption
  • I am WIP for the service.py and client.py adding in the encryption and decryption TODO spots
    • The decryption is relatively simple since it is just to receive an encrypted message and, using local key pair stuff, decrypt the message; I am probably messing it up where I also try to cast it to the unencrypted data model, though
    • The more challenging one is the encryption, since this requires client or service to first send a message to get the public key, receive it, and then do the encryption
      • In all honestly, the current state is me throwing LLM coding agent at it first to get an idea of how to start; doesn't seem to work so I'll start working on that

One thing that is sort of blocking me:

  • I have unit tests passing but need integration and end-to-end testing
  • Trying to use the docker compose, I cannot get the rabbitmq and minio to work now for me (getting connection refused and such); it might be a network thing locally for me but also noticed we are now on RabbitMQ 4, so not sure if that could also be a culprit
  • Digging into that now!

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.

2 participants