apache / apache/mynewt-nimble

GATTS: subscribe action security

Open
#1,092 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
893
Forks
512
Avg merge
13d 31m
Merged PRs (30d)
7

Description

It's nice that NimBLE automatically takes care of attribute security checks and kicks off encryption change procedure when a characteristic with READ_ENC or WRITE_ENC flags set.
However, it will not do this on notification mode change - even if the characteristic is marched as READ_ENC, central is allowed to subscribe to it without going through encryption change procedure, and the SUBSCRIBE event will fire.
While it is possible for the app to handle it and initiate the security procedure, it is cumbersome - context of the original SUBSCRIBE event needs to be preserved and acted upon if encryption change is successful, and discarded if not.
It would be nice if stack took care of this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the GATTS subscribe handling and comparing it with the existing READ_ENC and WRITE_ENC security checks. Inspect how the SUBSCRIBE event and encryption change procedure are coordinated. Done means subscribing to a protected characteristic triggers the security procedure before the event is accepted, while unsuccessful security leaves the subscription request discarded.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.