Skip to content

Resolve miscellaneous pairing gaps - #178

Merged
maximmaxim345 merged 4 commits into
mainfrom
ap/resolve-miscellaneous-pairing-gaps
Aug 28, 2026
Merged

maximmaxim345 merged 4 commits into
mainfrom
ap/resolve-miscellaneous-pairing-gaps

Conversation

@arturpragacz

Copy link
Copy Markdown
Contributor

Resolve miscellaneous pairing gaps.

  • Reject unpaired servers early on locked-down clients
  • Ignore unrecognised pairing methods and formats on the server
  • Define CSPRNG and require it for every secret
  • Clarify printed pairing PSK to be a QR code of its token
  • Tighten unpaired-access approval rules

Reject unpaired servers early on locked-down clients
Ignore unrecognized pairing methods and formats on the server
Define CSPRNG and require it for every secret
Clarify printed pairing PSK to be a QR code of its token
Tighten unpaired-access approval rules
Comment thread messaging.md Resolved
Comment thread pairing.md Resolved
Comment thread messaging.md Resolved
Comment thread pairing.md Resolved
@arturpragacz
arturpragacz marked this pull request as draft August 28, 2026 14:48
@arturpragacz
arturpragacz marked this pull request as ready for review August 28, 2026 14:58

@maximmaxim345 maximmaxim345 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@maximmaxim345
maximmaxim345 merged commit a225a2e into main Aug 28, 2026
1 check passed
@maximmaxim345
maximmaxim345 deleted the ap/resolve-miscellaneous-pairing-gaps branch August 28, 2026 15:20
chrisuthe added a commit to Sendspin/aiosendspin that referenced this pull request Sep 16, 2026
#354)

# What does this implement/fix?

Implements spec [#179](Sendspin/spec#179) and
[#189](Sendspin/spec#189), plus the
ignore-unrecognized-identifiers rule from
[#178](Sendspin/spec#178) that shares the same
parse path.

`supported_pair_methods` in `client/hello` becomes an object keyed by
pairing method identifier rather than a list of self-describing
descriptors, the reader ignores identifiers and values it does not
recognize, and a server offered both pairing-code methods prefers
`dynamic_pairing_code` (spec #285 moved the one-method cap to the
implementation guide).

Clients on the superseded list wire keep working: the server rewrites
the shape and flags it, as it already does for unversioned support keys
and pre-rename artwork dimensions. Their tests are kept as legacy-wire
acceptance tests.

One judgement call worth a look. An unrecognized method identifier is
logged, not sent through `_flag_noncompliance`: such a client is
conformant per `pairing.md:318`, so flagging it would make a server
running `allow_noncompliant_clients=False` reject spec-compliant
clients. Offering both code methods is conformant since spec #285, so it
is logged too; the SDK client still offers only the dynamic one.

**Related issue (if applicable):**

- n/a

## Types of changes

- [x] Enhancement to an existing feature — `enhancement`

## Checklist

- [x] The code change is tested and works locally.
- [x] `pre-commit run --all-files` passes.
- [x] `pytest` passes, and tests have been added/updated under `tests/`
where applicable.
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