You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate TDB_EXTERNAL_NO_RBP and FILESYSTEM_NO_RBP in kv_config
NO_RBP (no rollback protection) is intended to not require an internal
TDB, however, DeviceKey, which we use to derive SecureStore's
encryption key, still does. Currently, no internal TDB is created with
these two configurations, meaning there's no way to store the DeviceKey
and SecureStore doesn't work.
Copy file name to clipboardExpand all lines: storage/docs/Configuration/CONFIGURATION.md
+1-117Lines changed: 1 addition & 117 deletions
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,9 @@ kvstore
27
27
├───tdb_external
28
28
│ mbed_lib.json
29
29
│
30
-
├───tdb_external_no_rbp
31
-
│ mbed_lib.json
32
-
│
33
30
├───filesystem
34
31
│ mbed_lib.json
35
32
│
36
-
├───filesystem_no_rbp
37
-
│ mbed_lib.json
38
-
│
39
33
└───tdb_internal
40
34
mbed_lib.json
41
35
```
@@ -46,9 +40,7 @@ You can find the configuration files `conf/<configuration name>`:
46
40
47
41
*`conf/tdb_internal` - storage type `TDB_INTERNAL` configuration is intended to be used when all data will be stored in internal memory only. No need for additional security features. A single TDBStore object will be allocated in internal flash.
48
42
*`conf/tdb_external` - storage type `TDB_EXTERNAL` configuration is providing full security and intended to be used when data is stored in external flash. It allocates: SecureStore, TDBStore in external flash and TDBStore in internal flash (for rollback protection - RBP).
49
-
*`conf/tdb_external_no_rbp` - storage type `TDB_EXTERNAL_NO_RBP` configuration allows security but without rollback protection. Similar to `tdb_external` but without the TDBStore in internal memory.
50
43
*`conf/filesystem` - This configuration will allocate: SecureStore, FileSystemStore, filesystem, TDBStore in internal memory and the required block devices. The allocated file system will be selected according to the COMPONENT set in `targets.json`, (FATFS for SD card and LittleFS for SPIF); however, you can set this differently by overriding the respective parameter. Use this configuration if you need the file system with a POSIX API in addition to the set/get API.
51
-
*`conf/filesystem_no_rbp` - storage type `FILESYSTEM_NO_RBP` configuration allows security like FILESYSTEM configuration but without rollback protection.
52
44
53
45
A standalone block device is allocated for each component in internal and external memory and SD cards as required for the configurations. The full size of the memory allocated for each block device is used by the respective component.
54
46
@@ -59,9 +51,7 @@ The following is a list of all storage parameters available and their descriptio
59
51
*`storage_type` - Used to select one of the predefined configurations.
60
52
*`TDB_INTERNAL`.
61
53
*`TDB_EXTERNAL`.
62
-
*`TDB_EXTERNAL_NO_RBP`.
63
54
*`FILESYSTEM`.
64
-
*`FILESYSTEM_NO_RBP`.
65
55
*`default`
66
56
If the `default` configuration is set, the system will choose the type of storage TDB_INTERNAL.
67
57
*`default_kv` - This is a string representing the path for the default KVStore instantiation. Applications can pass an empty path (only the key name) or pass the generated name for this parameter (`MBED_CONF_STORAGE_DEFAULT_KV`) as the path to use this configuration.
@@ -85,7 +75,7 @@ Below is the main storage configuration `mbed_lib.json` file:
85
75
"name": "storage",
86
76
"config": {
87
77
"storage_type": {
88
-
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM, FILESYSTEM_NO_RBP or default. If default, the storage type will be chosen according to the component defined in targets.json",
78
+
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, FILESYSTEM, or default. If default, the storage type will be chosen according to the component defined in targets.json",
89
79
"value": "NULL"
90
80
},
91
81
"default_kv": {
@@ -172,39 +162,6 @@ Below is the `TDB_EXTERNAL` configuration `mbed_lib.json`:
172
162
}
173
163
}
174
164
```
175
-
176
-
### TDB_External_no_RBP
177
-
178
-

179
-
180
-
`TDB_EXTERNAL_NO_RBF` configuration has no support for rollback protection and is therefore less secure.
181
-
182
-
The `TDB_EXTERNAL_NO_RBP` uses only one TDBStore on the external flash for all data. In this configuration, all KVStore C API calls are mapped to work with the SecureStore class. The external TDBStore works on top of the default block device; however, you can set the external TDBStore block device to any of the following block devices: SPIF, QSPIF, DATAFASH and SD.
183
-
184
-
You can enable this configuration by setting `storage_type` in storage `mbed_lib.json` to `TDB_EXTERNAL_NO_RBP`.
185
-
186
-
Below is the `TDB_EXTERNAL_NO_RBP` configuration `mbed_lib.json`:
187
-
188
-
```
189
-
{
190
-
"name": "tdb_external_no_rbp",
191
-
"config": {
192
-
"external_size": {
193
-
"help": "Size of the external block device",
194
-
"value": "NULL"
195
-
},
196
-
"external_base_address": {
197
-
"help": "If not defined the default is from address 0",
198
-
"value": "NULL"
199
-
},
200
-
"blockdevice": {
201
-
"help": "Options are default, SPIF, DATAFASH, QSPIF or FILESYSTEM",
202
-
"value": "NULL"
203
-
}
204
-
}
205
-
}
206
-
```
207
-
208
165
### FILESYSTEM
209
166
210
167

@@ -263,51 +220,6 @@ Below is the FILESYSTEM configuration `mbed_lib.json`:
263
220
264
221
If file system is not set, the default file system and block device are applied and `blockdevice`, `external_size` and `external_base_address` are ignored.
265
222
266
-
### FILESYSTEM_NO_RBP
267
-
268
-

269
-
270
-
The `FILESYSTEM_NO_RBP` configuration resembles the `EXTERNAL_NO_RBP` but uses FileSystemStore on the external flash. By default, FileSystemStore uses the default file system and the default block device. This Configuration has no support for rollback protection and is therefore less secure.
271
-
272
-
In this configuration, all KVStore C API calls are mapped to the SecureStore class. This class handles the use of the external FileSystemStore.
273
-
274
-
You can enable this configuration by setting `storage_type` in `storage mbed_lib.json` to `FILESYSTEM_NO_RBF`.
275
-
276
-
Below is the FILESYSTEM configuration `mbed_lib.json`:
277
-
278
-
```
279
-
{
280
-
"name": "filesystem_store_no_rbp",
281
-
"config": {
282
-
"filesystem": {
283
-
"help": "Options are default, FAT or LITTLE. If not specified default filesystem will be used",
284
-
"value": "NULL"
285
-
},
286
-
"blockdevice": {
287
-
"help": "Options are default, SPIF, DATAFASH, QSPIF or FILESYSTEM. If not set the default block device will be used",
288
-
"value": "NULL"
289
-
},
290
-
"external_size": {
291
-
"help": "Size in bytes of the external block device, if not specified the maximum is the default.",
292
-
"value": "NULL"
293
-
},
294
-
"external_base_address": {
295
-
"help": "If not defined the default is from address 0",
296
-
"value": "NULL"
297
-
},
298
-
"mount_point": {
299
-
"help": "Where to mount the filesystem. Ignored if the default file system is applied.",
300
-
"value": "/sd"
301
-
},
302
-
"folder_path": {
303
-
"help": "Path for the working directory where the FileSyetemStore stores the data",
304
-
"value": "/kvstore"
305
-
}
306
-
}
307
-
}
308
-
```
309
-
310
-
If file system is not set, the default file system and block device are applied and `blockdevice`, `external_size` and `external_base_address` are ignored.
Copy file name to clipboardExpand all lines: storage/kvstore/kv_config/global/mbed_lib.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"name": "storage",
3
3
"config": {
4
4
"storage_type": {
5
-
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM, FILESYSTEM_NO_RBP or default. If default, the storage type will be chosen according to the component defined in targets.json",
5
+
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, FILESYSTEM or default. If default, the storage type will be chosen according to the component defined in targets.json",
Copy file name to clipboardExpand all lines: storage/kvstore/kv_config/tdb_external_no_rbp/mbed_lib.json
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
{
2
2
"name": "storage_tdb_external_no_rbp",
3
3
"config": {
4
+
"WARNING": {
5
+
"help": "DEPRECATION WARNING: storage_tdb_external_no_rbp does not work and will be removed in the future",
6
+
"value": null
7
+
},
4
8
"blockdevice": {
5
9
"help": "Options are default, SPIF, DATAFASH, QSPIF, SD or other. If default the block device will be chosen by the defined component. If other, override get_other_blockdevice() to support block device out of Mbed OS tree.",
0 commit comments