Skip to content
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

Document security levels correctly #26

Merged
merged 1 commit into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ settings:
"max_paired_devices": 10, // Allow pairing with up to this many devices; -1 - no limit
"gatts": {
"min_sec_level": 0, // Minimum security level for all attributes of all services.
// 0 - no auth required, 1 - encryption reqd, 2 - encryption + MITM reqd
// 0 - no auth required, 1 - auth reqd, 2 - auth + encryption reqd, 3 - auth + encryption + MITM reqd
"require_pairing": false // Require taht device is paired before accessing services
}
}
Expand All @@ -29,4 +29,4 @@ settings:
Default settings allow for unrestricted access: anyone can pair with a device and access the services.
A better idea is to set `bt.gatts.require_pairing` to true, `bt.allow_pairing` to false and only enable it for a limited time via `mgos_bt_gap_set_pairing_enable` when user performs some action, e.g. presses a button.
Raising `bt.gatts.min_sec_level` to at least 1 is also advisable.
_Note_: At present, level 2 (MITM protection) is not usable as it requires device to have at least output capability during pairing, and there's no API for displaying the pairing code yet.
_Note_: At present, level 3 (MITM protection) is not usable as it requires device to have at least output capability during pairing, and there's no API for displaying the pairing code yet.
2 changes: 1 addition & 1 deletion mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ config_schema:
- ["bt.random_address", "b", false, {title: "Use random BT address"}]
- ["bt.gatt_mtu", "i", 500, {title: "Local MTU setting, used when negotiating with clients"}]
- ["bt.gatts", "o", {title: "GATTS settings"}]
- ["bt.gatts.min_sec_level", "i", 0, {title: "0 - no auth required, 1 - encryption reqd, 2 - encryption + MITM reqd"}]
- ["bt.gatts.min_sec_level", "i", 0, {title: "0 - no auth required, 1 - auth reqd, 2 - auth + encryption reqd, 3 - auth + encryption + MITM reqd"}]

conds:
- when: mos.platform == "esp32"
Expand Down