-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add encryption support using cryptography to Sessions implementation #1674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant!
@rm-openai Overall, this enhancement looks good to me (except the env name). Do you have any suggestions or concerns? |
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments
to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
Thanks for the review! I removed the environment variable logic and left it up to the user to decide how to provide the encryption key. |
UpdateI believe I've resolved the CI issue. The problem was that cryptography wasn't properly included in the uv.lock file when UV_FROZEN=1 was set, causing import failures in tests and type checking. Solution
The CI should now pass since UV_FROZEN=1 will use the updated lock file that includes cryptography. |
7638f15
to
293c650
Compare
Cleaned commit history. |
Can you fix the following error with Python 3.9?
|
Thanks, this should pass now. split type imports between from typing_extensions import Literal, TypedDict, TypeGuard
from typing import Any, cast |
@seratch I have implemented all the suggestions, and tests are now passing. Could you take a final look and let me know if you have any further suggestions. Thanks! |
EncryptedSession
This PR adds EncryptedSession, a wrapper that provides transparent encryption for any session implementation with TTL-based message expiration.
Key Features
Usage
Implementation Details