matrix-org / matrix-org/python-signedjson

Don't expect monkeypatched nacl.signing.SigningKey instances

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
13
Forks
10
PR merge metrics
No merged PRs in 30d

Description

A nicer way to fix matrix-org/synapse#11714 (imo)

- Define a new type which holds the data `(key: nacl.signing.SigningKey, alg: str, version: str)`. Either inherit from `nacl.signing.SigningKey` or introduce a new wrapper.
- Change functions that take a `signedjson.types.SigningKey` to accept this new data type.
- Major version bump.

Contributor guide

Open the contributing guide

Research direction

Start by locating the functions that accept signedjson.types.SigningKey and review matrix-org/synapse#11714 for the monkeypatching problem. Define the proposed key data type, update those function boundaries, and verify the major-version API change is consistently represented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cryptography, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.